I18n: translate Move to Collection operator menu #113224

Closed
Damien Picard wants to merge 3 commits from pioverfour:dp_i18n_move_bone_menu into blender-v4.0-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Several items are untranslated in the Move to Collection operator
menu (the armature version, ARMATURE_OT_move_to_collection). This is
because it uses custom drawing to allow the menu to be dynamically
generated.

Because of this custom drawing, some labels have to be translated
manually using CTX_IFACE_(). The translation context is "Operator"
because those messages come from an operator.

On the other hand, the destination collections themselves should not
have their name translated since they are data. The property now uses
the PROP_ENUM_NO_TRANSLATE flag for this.

Several items are untranslated in the Move to Collection operator menu (the armature version, `ARMATURE_OT_move_to_collection`). This is because it uses custom drawing to allow the menu to be dynamically generated. Because of this custom drawing, some labels have to be translated manually using `CTX_IFACE_()`. The translation context is "Operator" because those messages come from an operator. On the other hand, the destination collections themselves should not have their name translated since they are data. The property now uses the `PROP_ENUM_NO_TRANSLATE` flag for this.
Damien Picard added the
Module
User Interface
Interest
Translations
labels 2023-10-04 00:33:12 +02:00
Damien Picard added 1 commit 2023-10-04 00:33:25 +02:00
Several items are untranslated in the Move to Collection operator
menu (the armature version, `ARMATURE_OT_move_to_collection`). This is
because it uses custom drawing to allow the menu to be dynamically
generated.

Because of this custom drawing, some labels have to be translated
manually using `CTX_IFACE_()`. The translation context is "Operator"
because those messages come from an operator.
Damien Picard requested review from Bastien Montagne 2023-10-04 00:33:31 +02:00
Bastien Montagne requested changes 2023-10-04 12:35:00 +02:00
Bastien Montagne left a comment
Owner

LGTM, but think this enum is also missing the PROP_ENUM_NO_TRANSLATE property flag (line 1013 below in operator/properties definition). Since most items of the collections are actually data names, they should not be translated.

LGTM, but think this enum is also missing the `PROP_ENUM_NO_TRANSLATE` property flag (line `1013` below in operator/properties definition). Since most items of the collections are actually data names, they should not be translated.
Damien Picard added 1 commit 2023-10-04 12:39:26 +02:00
Bastien Montagne requested changes 2023-10-04 15:07:32 +02:00
Bastien Montagne left a comment
Owner

Shouldn't this be committed to 4.0 actually?

Shouldn't this be committed to 4.0 actually?
Bastien Montagne requested changes 2023-10-04 15:08:00 +02:00
@ -1008,3 +1011,3 @@
"The bone collection to move the selected bones to");
RNA_def_enum_funcs(prop, bone_collection_enum_itemf);
RNA_def_property_flag(prop, PROP_SKIP_SAVE | PROP_HIDDEN);
RNA_def_property_flag(prop, PROP_SKIP_SAVE | PROP_HIDDEN | PROP_ENUM_NO_TRANSLATE);

Would be good to add comment about why this is needed.

Would be good to add comment about why this is needed.
Damien Picard changed title from I18n: translate Move to Collection operator menu to I18n: translate Move to Collection operator menu 2023-10-04 15:20:00 +02:00
Damien Picard changed target branch from main to blender-v4.0-release 2023-10-04 15:20:02 +02:00
Damien Picard added 1 commit 2023-10-04 15:27:54 +02:00
Bastien Montagne approved these changes 2023-10-04 17:03:56 +02:00
Bastien Montagne left a comment
Owner

LGTM, with minor tweaks to comment. Will commit, since you cannot 'just' change the base reference branch in gitea, you also need to actually rebase and force-push to the PR branch for it to work.

LGTM, with minor tweaks to comment. Will commit, since you cannot 'just' change the base reference branch in gitea, you also need to actually rebase and force-push to the PR branch for it to work.
Author
Member

LGTM, with minor tweaks to comment.

Sounds good to me, thanks!

you also need to actually rebase and force-push to the PR branch for it to work.

This branch was already based on the 4.0 branch so there was no need to rebase. I forgot to choose the branch when creating the PR.

> LGTM, with minor tweaks to comment. Sounds good to me, thanks! > you also need to actually rebase and force-push to the PR branch for it to work. This branch was already based on the 4.0 branch so there was no need to rebase. I forgot to choose the branch when creating the PR.

merged as 1fa7ba125c

merged as 1fa7ba125c
Bastien Montagne closed this pull request 2023-10-04 17:19:13 +02:00
Damien Picard deleted branch dp_i18n_move_bone_menu 2023-10-04 17:28:33 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113224
No description provided.