Page MenuHome

I18n: make workspaces translatable
ClosedPublic

Authored by Damien Picard (pioverfour) on Aug 19 2022, 3:12 AM.

Details

Summary

This makes workspaces more translatable:

  • New Workspace menu
    • header
    • preset menus
    • preset entries
  • workspace names upon factory file template load
  • new workspace name upon workspace addition

To properly translate those names, an extraction function for
workspace names from app templates was added as well.

(Do not do anything when loading a user-saved file!)


Diff Detail

Repository
rB Blender

Event Timeline

Damien Picard (pioverfour) requested review of this revision.Aug 19 2022, 3:12 AM
Damien Picard (pioverfour) created this revision.
Damien Picard (pioverfour) retitled this revision from I18n: make new workspaces translatable to I18n: make workspaces translatable.
Damien Picard (pioverfour) edited the summary of this revision. (Show Details)

Implement message extraction from app template blend files. This goes through all such templates, opens them in turn, and lists workspace names. They are added to the po files under the WorkSpace msgctxt.

Bastien Montagne (mont29) requested changes to this revision.Aug 22 2022, 3:55 PM

Nice addition, generally looks good from quick read, just two details noted in comments below.

release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
896

Not sure why this line is needed???

source/blender/windowmanager/intern/wm_files.c
702–707

I would only do that if it's a factory startup actually... don't think we want this behavior with user-customized own startup files?

This revision now requires changes to proceed.Aug 22 2022, 3:55 PM
Damien Picard (pioverfour) edited the summary of this revision. (Show Details)
  • Translate workspace names only on factory startup, not merely on (possibly modified) startup file
  • Remove leftover, useless line.
Damien Picard (pioverfour) marked 2 inline comments as done.Aug 22 2022, 8:50 PM
Damien Picard (pioverfour) added inline comments.
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
896

Oh right, I forgot to remove that when I thought I needed to use a blend file. Thanks!

source/blender/windowmanager/intern/wm_files.c
702–707

Right, let’s leave it as is if the startup files have been changed.

Thanks, looks good now!

This revision is now accepted and ready to land.Aug 23 2022, 11:39 AM

Note: Will commit this to master, think it's too risky/too late for 3.3 at that point.

This revision was automatically updated to reflect the committed changes.