I18n: Extract and disambiguate a few messages #122969
No reviewers
Labels
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
No due date set.
Depends on
Reference: blender/blender#122969
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pioverfour/blender:dp_disambiguate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extract
Improve
into two messages.
Disambiguate
Operator context.
as opposed to the verb to move things in space.
object to another).
Some issues reported by Satoshi Yamasaki, deathblood, and Gabriel Gazzán.
@ -264,3 +265,3 @@
if _cycles.with_openimagedenoise:
return [('OPENIMAGEDENOISE', "OpenImageDenoise",
"Use Intel OpenImageDenoise AI denoiser", 4)]
tip_("Use Intel OpenImageDenoise AI denoiser"), 4)]
This needs to be solved in another way. In fact, even existing code is not correct (see warning in https://docs.blender.org/api/master/bpy.props.html#bpy.props.EnumProperty ).
These strings are not extracted currently because my workstation/Blender build (which I use to generate the messages) do not have these advanced rendering device options.
But you do not want to get the 'source' strings (in the Enum data) translated, this should only happen when requested (usually for UI drawing).
Think the proper fix here would be to have a 'translation marker', like in C++ code, and use it to tag all of these strings (note that the label ones should also be marked for translation extraction actually). Will try to get this in today.
Actually, you already did that in !122971, so just need to land this one first and then update that PR!
@ -186,3 +186,3 @@
if module_parent_dirname(mod.__file__) == "addons_core":
sub.label(text="Core: " + bl_info["name"], translate=False)
sub.label(text=iface_("Core:") + " " + iface_(bl_info["name"]), translate=False)
I don't think the name should be translated?
That’s what we’ve been doing previously. In many cases the add-on name is like a product name not to translate, but in others it’s a straightforward description that should be translated IMO.
@ -208,2 +208,3 @@
if bl_info["description"]:
col_a.label(text="{:s}.".format(bl_info["description"]))
col_a.label(
text="{:s}.".format(iface_(bl_info["description"])),
This is closer to a tooltip than a label, so would rather use
tip_()
here?Well we’ve been making
tip_()
apply only to tooltips lately. But also I think it looks a bit weird when everything around is translated:It's even weirder for people who disable 'label' translation to keep basic UI in English, but then enable tooltip translation to get detailed translated info. Then they get a full English long & complex description...
And I'd expect cases where 'label' translation is enbaled, but 'tooltips' one is disabled, to be anecdotal at best?
@ -797,2 +800,3 @@
# The full tagline may be multiple lines (not yet supported by Blender's UI).
col_a.label(text="{:s}.".format(item_remote["tagline"]), translate=False)
col_a.label(
text="{:s}.".format(iface_(item_remote["tagline"])),
This is closer to a tooltip than a lable, so would rather use
tip_()
here?@ -2651,3 +2651,3 @@
# Weak, add/remove as properties.
op_add: BoolProperty(name="Add")
op_add: BoolProperty(name="Add", translation_context=i18n_contexts.operator_default)
op_remove: BoolProperty(name="Remove")
This one should also have the
Operator
contextDo you mean "Remove"? I can do that but then 8 other messages may need it as well.
"Add" is problematic because it can be either the math operator / blending mode or the action, but Remove doesn’t have this issue AFAIK.
I'd rather be consistent, and tag 'action' messages, especially very short ones, as such?
@ -5039,6 +5039,7 @@ static void def_sh_tex_noise(StructRNA *srna)
RNA_def_property_enum_sdna(prop, nullptr, "dimensions");
RNA_def_property_enum_items(prop, rna_enum_node_tex_dimensions_items);
RNA_def_property_ui_text(prop, "Dimensions", "Number of dimensions to output noise for");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_NODETREE);
Wonder if
BLT_I18NCONTEXT_ID_TEXTURE
would not be a better (more logical) choice here?@ -16,3 +16,3 @@
b.add_input<decl::Rotation>("Rotation");
b.add_input<decl::Vector>("Scale").default_value(float3(1)).subtype(PROP_XYZ);
b.add_output<decl::Matrix>("Transform");
b.add_output<decl::Matrix>("Transform").translation_context(BLT_I18NCONTEXT_ID_NODETREE);
Not sure I understand why this needs a context?
I would expect only need for two contexts for this word ('noun' case with default context, 'verb' case with operator context)?
At first it was because the French translation for the noun was wrong and used a verb, but then I checked some translations for a few languages and it appears that the translation is not always the same (in Chinese and Arabic, for example).
I’ll ask in the chat.
While this is open I added disambiguation for "Parent", in a new commit.
I added the Operator context for "Remove", except here where the label and description seem fishy. I’ll ask the animation module for advice.
Thanks, LGTM!
Ahhh, looks like the branch needs some merge before it can land though :)
Done!
By the way a previous pull request (!122971) wasn’t squashed before merge, is this something I need to do?
It depends, sometimes it's better to commit things in several times to separate logical aspects of a PR (e.g. adding a new feature, and using it in existing code). This helps when investigating potential issues later. ! could probably just have been split in only 2 commits, but was simpler/faster to directly commit the four, than spend some time rebasing things. ;)
@blender-bot build
I see, thanks!