I18n: disambiguate and extract a few messages #111146

Merged
Bastien Montagne merged 3 commits from pioverfour/blender:dp_disambiguate into main 2023-09-04 16:16:36 +02:00
Member

This commit disambiguates the following messages:

  • Sequencer effect strip types: use "Sequence" context in relevant
    places, as that is already extracted as part of the
    sequencer_prop_effect_types enum, and more specific.
  • "Language" (a natural or programming language)
  • "Flat" (gender)
  • "Smooth" (action or amount -- very partial disambiguation for now
    because this is all over the place)

It also extracts these messages:

  • Newly created Freestyle data
    • LineStyle
    • LineSet
    • Modifiers
  • "Registering panel class:" error message from RNA registration
  • "Node must be run as tool" error message from tool geometry nodes

Ref #43295

This commit disambiguates the following messages: - Sequencer effect strip types: use "Sequence" context in relevant places, as that is already extracted as part of the `sequencer_prop_effect_types` enum, and more specific. - "Language" (a natural or programming language) - "Flat" (gender) - "Smooth" (action or amount -- very partial disambiguation for now because this is all over the place) It also extracts these messages: - Newly created Freestyle data - LineStyle - LineSet - Modifiers - "Registering panel class:" error message from RNA registration - "Node must be run as tool" error message from tool geometry nodes Ref #43295
Damien Picard added the
Module
User Interface
Interest
Translations
labels 2023-08-15 18:54:50 +02:00
Damien Picard requested review from Bastien Montagne 2023-08-15 18:55:05 +02:00
Bastien Montagne requested changes 2023-08-21 16:43:30 +02:00
Bastien Montagne left a comment
Owner

Generally LGTM, some minor comments below.

Generally LGTM, some minor comments below.
@ -197,6 +198,7 @@ typedef struct {
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORKSPACE, "id_workspace"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORLD, "id_world"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_FILEBROWSER, "editor_filebrowser"), \
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_PREFERENCES, "editor_preferences"), \

See comment where it's used, think this is not needed.

See comment where it's used, think this is not needed.
@ -5135,6 +5135,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop, "rna_lang_enum_properties_get_no_international", nullptr, nullptr);
# endif
RNA_def_property_ui_text(prop, "Language", "Language used for translation");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_EDITOR_PREFERENCES);

I really do not think a new context for this case is worth it... Could use instead e.g. some UI-related ID context, like BLT_I18NCONTEXT_ID_WINDOWMANAGER?

I really do not think a new context for this case is worth it... Could use instead e.g. some UI-related ID context, like `BLT_I18NCONTEXT_ID_WINDOWMANAGER`?
Author
Member

Although I understand that that is not what the system is currently designed to solve, I still try finding contexts that will make sense to translators, and I don’t think "WindowManager" does that.

But I will change to that if you request it.

Although I understand that that is not what the system is currently designed to solve, I still try finding contexts that will make sense to translators, and I don’t think "WindowManager" does that. But I will change to that if you request it.

Thing is. 'user preferences' is not a really good context either... This is related to UI, so we could have a 'UI' context, but imho 'window manager' is a good 'synonym' to UI, since UI is the only role of that ID...

Thing is. 'user preferences' is not a really good context either... This is related to UI, so we could have a 'UI' context, but imho 'window manager' is a good 'synonym' to UI, since UI is the only role of that ID...
Author
Member

Actually, I just retested and this is not going to work anyway, because the language names are extracted in another way, and are used from different places.
It will be easier to actually leave them with the default context, and add a context to messages meaning “programming language”.

Actually, I just retested and this is not going to work anyway, because the language names are extracted in another way, and are used from different places. It will be easier to actually leave them with the default context, and add a context to messages meaning “programming language”.
Author
Member

Ok so I went with adding a “Python console” context to refer to the programming instances. I hope that’s all right, I again couldn’t see an existing context that really made sense…

Ok so I went with adding a “Python console” context to refer to the programming instances. I hope that’s all right, I again couldn’t see an existing context that really made sense…
@ -122,3 +122,3 @@
return DATA_("Audio");
case SEQ_TYPE_CROSS:
return DATA_("Cross");
return CTX_DATA_(BLT_I18NCONTEXT_ID_SEQUENCE, "Cross");

Why do the above ones not need the sequence context too?

Why do the above ones not need the `sequence` context too?
pioverfour marked this conversation as resolved

@blender-bot build

@blender-bot build
Damien Picard force-pushed dp_disambiguate from 8b40e2a396 to cabc4aa3a5 2023-09-03 19:12:42 +02:00 Compare
Damien Picard added 1 commit 2023-09-04 14:13:08 +02:00
Damien Picard added 1 commit 2023-09-04 14:59:16 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
24115db19d
Disambiguate "Language" with new Python console context
Bastien Montagne approved these changes 2023-09-04 15:14:33 +02:00
Bastien Montagne left a comment
Owner

Eeh, still adding one more context in the end... But think this one makes sense then. thanks for all the fixes!

Eeh, still adding one more context in the end... But think this one makes sense then. thanks for all the fixes!

@blender-bot build

@blender-bot build
Bastien Montagne merged commit 564bbdf6e7 into main 2023-09-04 16:16:36 +02:00
Bastien Montagne deleted branch dp_disambiguate 2023-09-04 16:16:38 +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#111146
No description provided.