2d703e9200
In !112591, nodes got the ability to group sockets into panels. The labels for these sockets are automatically shortened if they begin with the same text as their parent labels. For instance, "Transmission Weight" will be shortened to just "Weight" because it is under the "Transmission" panel. While this is a good heuristic for English, it breaks down in languages which do not have the same word order. This commit adds a `.short_label()` callback to socket declarations so that a shortened label can be explicitly declared. It also adds two regexps to the translation script so that these new fields can be extracted to the .po translation files. One extracts the label with a translation context, the other without. Only the one without context is currently in use. The current automatic shortening logic is kept and will be used only if a shortened label is not manually provided. Fixes #112970: Node socket labels under panels are not shortened when translated. Pull Request: https://projects.blender.org/blender/blender/pulls/113070 |
||
---|---|---|
.. | ||
__init__.py | ||
bl_extract_messages.py | ||
merge_po.py | ||
settings_user.py | ||
settings.py | ||
utils_cli.py | ||
utils_languages_menu.py | ||
utils_rtl.py | ||
utils_spell_check.py | ||
utils.py |