I18n: disambiguate a few messages #106718

Merged
Bastien Montagne merged 2 commits from pioverfour/blender:dp_disambiguate into main 2023-04-12 15:09:32 +02:00
Member
  • "Lens" can be a transparent object used in cameras, or specifically
    its property of focal length
  • "Empty" can be an adjective meaning void, or an object type. The
    latter is already disambiguated using ID_ID
  • "New" and "Old" are adjectives that can have agreements in some
    languages
  • "Modified" is an adjective that can have agreement in some languages
  • "Clipping" can be a property of a camera, or a behavior of the
    mirror modifier
  • "Value" in HSV nodes, see #105113
  • "Area" in the Face Area geometry node, can mean a measurement or a
    window type
  • "Tab" can be a UI element or a whitespace character
  • "Volume" can mean a measurement or an object type. The latter is
    already disambiguated using ID_ID

These changes introduce two new translation contexts:
BLT_I18NCONTEXT_MODIFIER and BLT_I18NCONTEXT_TIME

It also removes BLT_I18NCONTEXT_VIRTUAL_REALITY, which I added at
one point but then couldn't find which messages I wanted to fix with
it.

Ref #43295

- "Lens" can be a transparent object used in cameras, or specifically its property of focal length - "Empty" can be an adjective meaning void, or an object type. The latter is already disambiguated using `ID_ID` - "New" and "Old" are adjectives that can have agreements in some languages - "Modified" is an adjective that can have agreement in some languages - "Clipping" can be a property of a camera, or a behavior of the mirror modifier - "Value" in HSV nodes, see #105113 - "Area" in the Face Area geometry node, can mean a measurement or a window type - "Tab" can be a UI element or a whitespace character - "Volume" can mean a measurement or an object type. The latter is already disambiguated using `ID_ID` These changes introduce two new translation contexts: `BLT_I18NCONTEXT_MODIFIER` and `BLT_I18NCONTEXT_TIME` It also removes `BLT_I18NCONTEXT_VIRTUAL_REALITY`, which I added at one point but then couldn't find which messages I wanted to fix with it. Ref #43295
Damien Picard added the
Module
User Interface
Interest
Translations
labels 2023-04-08 21:02:17 +02:00
Damien Picard requested review from Bastien Montagne 2023-04-08 21:04:52 +02:00
Damien Picard force-pushed dp_disambiguate from 89c48cab2e to 027319fe0a 2023-04-08 21:10:08 +02:00 Compare
Bastien Montagne requested changes 2023-04-12 12:18:16 +02:00
@ -319,3 +320,3 @@
col = layout.column(align=True)
col.prop(cscene, "use_surface_guiding", text="Surface")
col.prop(cscene, "use_volume_guiding", text="Volume")
col.prop(cscene, "use_volume_guiding", text="Volume", text_ctxt=i18n_contexts.id_id)

would rather use id_volume context then? Same for other cases below of course.

would rather use `id_volume` context then? Same for other cases below of course.
Author
Member

This reuses an existing message/context pair. I think the reason is that using "Volume" to disambiguate "Volume" is not really useful!

This reuses an existing message/context pair. I think the reason is that using "Volume" to disambiguate "Volume" is not really useful!
@ -15,6 +16,7 @@ class DataButtonsPanel:
class DATA_PT_empty(DataButtonsPanel, Panel):
bl_label = "Empty"
bl_translation_context = i18n_contexts.id_id

id_object context (and same for other cases below as well).

`id_object` context (and same for other cases below as well).
Author
Member

This reuses an existing message/context pair.

This reuses an existing message/context pair.
@ -197,10 +198,11 @@ typedef struct {
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_VIEW3D, "editor_view3d"), \

This should also be re-sorted below the filebrowser one then.

This should also be re-sorted below the filebrowser one then.
Author
Member

I looked at the lists and actually, IDs are not sorted the same in the defines and in BLT_I18NCONTEXTS_DESC . Should I sort them both while I’m at it? Maybe revert and do another commit?

I looked at the lists and actually, IDs are not sorted the same in the `define`s and in `BLT_I18NCONTEXTS_DESC `. Should I sort them both while I’m at it? Maybe revert and do another commit?

Sounds good, but indeed would have it as a separate 'cleanup' commit then.

Sounds good, but indeed would have it as a separate 'cleanup' commit then.
pioverfour marked this conversation as resolved
@ -170,3 +170,3 @@
uiItemR(col, ptr, "mirror_object", 0, nullptr, ICON_NONE);
uiItemR(col, ptr, "use_clip", 0, IFACE_("Clipping"), ICON_NONE);
uiItemR(col, ptr, "use_clip", 0, CTX_IFACE_(BLT_I18NCONTEXT_MODIFIER, "Clipping"), ICON_NONE);

While am not necessarily against a new 'MODIFIER' context, I think that this use case is a poor advocate for it. Clipping here (as opposed to camera clipping) is more related to geometry in general, so would rather (slightly) abuse BLT_I18NCONTEXT_ID_MESH here instead.

While am not necessarily against a new 'MODIFIER' context, I think that this use case is a poor advocate for it. Clipping here (as opposed to camera clipping) is more related to geometry in general, so would rather (slightly) abuse `BLT_I18NCONTEXT_ID_MESH` here instead.
pioverfour marked this conversation as resolved

Re existing context/massage pairs, would be interesting to know why.how these existing pairs are generated? Could be either from previous 'bad' context usage, or from some automatically generated/used contexts...

If first case, should be fixed imho, otherwise think it's fine top re-use existing pairs then indeed.

Re existing context/massage pairs, would be interesting to know why.how these existing pairs are generated? Could be either from previous 'bad' context usage, or from some automatically generated/used contexts... If first case, should be fixed imho, otherwise think it's fine top re-use existing pairs then indeed.
Author
Member

how these existing pairs are generated?

They both mostly come from various uses of rna_enum_object_type_items in properties. These disambiguate using ID_ID, apparently to distinguish at least “Light”, but it applies to all the enum items. I think this use is legit.

> how these existing pairs are generated? They both mostly come from various uses of `rna_enum_object_type_items` in properties. These disambiguate using `ID_ID`, apparently to distinguish at least “Light”, but it applies to all the enum items. I think this use is legit.
Damien Picard force-pushed dp_disambiguate from 027319fe0a to 5e8cc696fd 2023-04-12 13:23:53 +02:00 Compare
Damien Picard force-pushed dp_disambiguate from 5e8cc696fd to 60b47c7587 2023-04-12 13:38:32 +02:00 Compare

how these existing pairs are generated?

They both mostly come from various uses of rna_enum_object_type_items in properties. These disambiguate using ID_ID, apparently to distinguish at least “Light”, but it applies to all the enum items. I think this use is legit.

OK then sounds good to keep these indeed.

> > how these existing pairs are generated? > > They both mostly come from various uses of `rna_enum_object_type_items` in properties. These disambiguate using `ID_ID`, apparently to distinguish at least “Light”, but it applies to all the enum items. I think this use is legit. OK then sounds good to keep these indeed.
Bastien Montagne approved these changes 2023-04-12 14:44:32 +02:00
Bastien Montagne left a comment
Owner

LGTM now, thanks :)

LGTM now, thanks :)

@blender-bot build

@blender-bot build

Hrrrrmmm buildbot is failing on some weird apparently unrelated tests (imbuf ones), will wait a bit to see if this is also a problem in main currently

Hrrrrmmm buildbot is failing on some weird apparently unrelated tests (imbuf ones), will wait a bit to see if this is also a problem in main currently

Ah see a lot of updates in imbuf code and tests, so guess it's unrelated in the end.

Ah see a lot of updates in imbuf code and tests, so guess it's unrelated in the end.
Bastien Montagne merged commit c40ce3baae into main 2023-04-12 15:09:32 +02:00
Bastien Montagne deleted branch dp_disambiguate 2023-04-12 15:09:33 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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#106718
No description provided.