Page MenuHome

I18n: make several parts of the UI translatable
ClosedPublic

Authored by Damien Picard (pioverfour) on Jul 24 2022, 7:42 PM.

Details

Summary
  • batch rename
  • keyframe settings
  • tool name in Tool properties header
  • tool name in Tool properties Drag (fake) enum
  • new file templates
  • new preset
  • new text datablock
  • new collection datablock
  • new geometry nodes (modifier and node group)
  • new grease pencil data (layers and materials)

Ref. T43295

Diff Detail

Repository
rB Blender

Event Timeline

Damien Picard (pioverfour) requested review of this revision.Jul 24 2022, 7:42 PM
Damien Picard (pioverfour) created this revision.
Damien Picard (pioverfour) edited the summary of this revision. (Show Details)

Fix tool name translation in the Tool properties. Their context needs to be "Operator".

Bastien Montagne (mont29) requested changes to this revision.Aug 1 2022, 11:12 AM
Bastien Montagne (mont29) added inline comments.
release/scripts/startup/bl_operators/presets.py
20

This should be data_ actually.

release/scripts/startup/bl_operators/wm.py
2916

Either you call iface_ here, then you only need n_ in all the entries above defining those strings, or you do not need to call iface_ here at all?

2977

should be tip_, this more an info message than a label.

release/scripts/startup/keyingsets_builtins.py
41 ↗(On Diff #54147)

All those should not be done that way (if nothing else, because that would not update when switching translation, since those are generated on startup).

If translation is missing, it likely needs to be handled in some other drawing code area.

This revision now requires changes to proceed.Aug 1 2022, 11:12 AM
Damien Picard (pioverfour) marked 4 inline comments as done.
Damien Picard (pioverfour) edited the summary of this revision. (Show Details)

Fix issues from Bastien’s comment:

  • data_() for New Preset
  • remove iface_() for data types in batch rename (tried to use pgettext_n(), but there is no such function in Python… I implemented it but then realised it was probably stupidly done and also slightly less explicit)
  • tip_ for error message in batch rename
  • remove the built-in keying sets stuff, may revisit later

Also add some overlooked data types in the batch rename, and a material name in the Grease Pencil new data.

LGTM now, many thanks for all those updates and fixes!

This revision is now accepted and ready to land.Aug 4 2022, 3:45 PM