I18n: Extract and disambiguate a few messages #123404

Merged
Bastien Montagne merged 2 commits from pioverfour/blender:dp_disambiguate into blender-v4.2-release 2024-06-26 19:25:33 +02:00
Member

Disambiguate

  • "Thickness": use "Material" for EEVEE's thickness material setting.
  • "Generated": use "Texture" for texture coordinates, "Image" for
    image source, keep default context for animation keyframe types.

Translate

  • Split "Online access required to (check for|install) updates..."
    into 2x2 messages individually translatable.
  • "Geometry" input in bake node.
  • "New" for the Palette ID: extract it as part of the
    BLT_I18N_MSGID_MULTI_CTXT for "New".
  • Extract many custom labels defined in uiItem*
    Those labels needed a manual translation with IFACE_() or RPT_():
    • "Add Item",
    • "Blend",
    • "Cached from the first line art modifier.",
    • "Custom Curve",
    • "Custom Path",
    • "Custom Range",
    • "End",
    • "Enter a Unicode codepoint hex value",
    • "Forward Axis",
    • "Insert Unicode Character",
    • "Mid Level",
    • "Min",
    • "Mode",
    • "No Items",
    • "Object",
    • "Path",
    • "Probability",
    • "Sample Radius",
    • "Sharp edges or custom normals detected, disabling GPU subdivision",
    • "Start",
    • "Texture Mapping",
    • "Up Axis",
    • "Using both CPU and GPU subdivision".

Some issues reported by Gabriel Gazzán and Satoshi Yamasaki.

Disambiguate - "Thickness": use "Material" for EEVEE's thickness material setting. - "Generated": use "Texture" for texture coordinates, "Image" for image source, keep default context for animation keyframe types. Translate - Split "Online access required to (check for|install) updates..." into 2x2 messages individually translatable. - "Geometry" input in bake node. - "New" for the Palette ID: extract it as part of the BLT_I18N_MSGID_MULTI_CTXT for "New". - Extract many custom labels defined in uiItem* Those labels needed a manual translation with IFACE_() or RPT_(): - "Add Item", - "Blend", - "Cached from the first line art modifier.", - "Custom Curve", - "Custom Path", - "Custom Range", - "End", - "Enter a Unicode codepoint hex value", - "Forward Axis", - "Insert Unicode Character", - "Mid Level", - "Min", - "Mode", - "No Items", - "Object", - "Path", - "Probability", - "Sample Radius", - "Sharp edges or custom normals detected, disabling GPU subdivision", - "Start", - "Texture Mapping", - "Up Axis", - "Using both CPU and GPU subdivision". Some issues reported by Gabriel Gazzán and Satoshi Yamasaki.
Damien Picard added the
Interest
Translations
Module
User Interface
labels 2024-06-18 23:15:49 +02:00
Damien Picard requested review from Bastien Montagne 2024-06-18 23:16:28 +02:00
Damien Picard changed target branch from main to blender-v4.2-release 2024-06-18 23:58:29 +02:00
Damien Picard force-pushed dp_disambiguate from fd48e408ae to 61b4296d6f 2024-06-19 22:08:33 +02:00 Compare

@blender-bot build

@blender-bot build
Bastien Montagne requested changes 2024-06-24 15:21:50 +02:00
Dismissed
@ -860,2 +860,3 @@
# First, try the "multi-contexts" stuff!
_msgctxts = tuple(d.get("ctxt_raw{}".format(i)) for i in range(settings.PYGETTEXT_MAX_MULTI_CTXT))
_msgctxts = tuple(d.get("ctxt_raw{}".format(i))
for i in range(settings.PYGETTEXT_MAX_MULTI_CTXT + 1))

I do not understand this change. PYGETTEXT_MAX_MULTI_CTXT is 16, so range(16) will generate integers in the [0, 15] range, i.e. 16 values, as expected?

Also, such change should be split into a separate PR anyway.

I do not understand this change. `PYGETTEXT_MAX_MULTI_CTXT` is `16`, so `range(16)` will generate integers in the `[0, 15]` range, i.e. 16 values, as expected? Also, such change should be split into a separate PR anyway.
Author
Member

Thanks, I’ll look at it again later today. I’m not sure what the problem was right now or if this is the right solution, but I’m sure only 15 messages did get extracted.
I’ll split into another PR, it’s really not an urgent change anyway.

Thanks, I’ll look at it again later today. I’m not sure what the problem was right now or if this is the right solution, but I’m sure only 15 messages did get extracted. I’ll split into another PR, it’s really not an urgent change anyway.
Author
Member

So there is indeed an issue when 16 contexts are used, but it’s a simple regex error I didn’t notice before. I’ll open a PR targetting main when this is merged, to avoid conflicts.

So there is indeed an issue when 16 contexts are used, but it’s a simple regex error I didn’t notice before. I’ll open a PR targetting main when this is merged, to avoid conflicts.
pioverfour marked this conversation as resolved
Bastien Montagne approved these changes 2024-06-24 18:33:21 +02:00
Bastien Montagne left a comment
Owner

LGTM now. Will let it sink for a few days in case @ideasman42 wants to check the part of the changes related to the new extensions code?

LGTM now. Will let it sink for a few days in case @ideasman42 wants to check the part of the changes related to the new extensions code?
Bastien Montagne requested review from Campbell Barton 2024-06-24 18:33:32 +02:00

@blender-bot build

@blender-bot build
Author
Member

LGTM now. Will let it sink for a few days in case @ideasman42 wants to check the part of the changes related to the new extensions code?

Yes, that’s fine! I also proposed a change / revert here related to translation of extensions, if that’s accepted I can update this PR to implement it. (Or I can open another PR, whichever is more convenient.)

> LGTM now. Will let it sink for a few days in case @ideasman42 wants to check the part of the changes related to the new extensions code? Yes, that’s fine! I also proposed a change / revert [here](https://projects.blender.org/blender/blender/issues/122735#issuecomment-1221639) related to translation of extensions, if that’s accepted I can update this PR to implement it. (Or I can open another PR, whichever is more convenient.)
Campbell Barton reviewed 2024-06-25 11:27:27 +02:00
@ -1075,0 +1074,4 @@
case 'INSTALL_UPDATES':
message = rpt_("Online access required to install updates.")
case _:
message = ""

This could assert False, "Unreachable" - as it should never happen.

This could `assert False, "Unreachable"` - as it should never happen.
pioverfour marked this conversation as resolved
Campbell Barton approved these changes 2024-06-25 11:27:41 +02:00
Damien Picard force-pushed dp_disambiguate from 8cf061be24 to 9cb6c02be7 2024-06-25 16:58:19 +02:00 Compare

@blender-bot build

@blender-bot build
Bastien Montagne merged commit f739d4832e into blender-v4.2-release 2024-06-26 19:25:33 +02:00
Bastien Montagne deleted branch dp_disambiguate 2024-06-26 19:25:36 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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
3 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#123404
No description provided.