diff options
author | Damien Picard <pioverfour> | 2022-08-23 12:43:39 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-23 12:54:34 +0300 |
commit | 4ac96a483bf1567d37ec0357c5430c731c4f884e (patch) | |
tree | 376ced2dae9f4b288707574be1a84d7fdf4cbfda /release/scripts/modules/bl_i18n_utils/settings.py | |
parent | 22fdb88be525fbefb77c17fe69956e1e367c747e (diff) |
I18n: make workspaces translatable
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!)
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15727
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/settings.py')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index fb60b07a657..05db4df7cd2 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -519,6 +519,10 @@ REL_POTFILES_SOURCE_DIR = os.path.join("source") # Where to search for preset names (relative to SOURCE_DIR). REL_PRESETS_DIR = os.path.join("release", "scripts", "presets") +# Where to search for templates (relative to SOURCE_DIR). +REL_TEMPLATES_DIR = os.path.join("release", "scripts", "startup", + "bl_app_templates_system") + # The template messages file (relative to I18N_DIR). REL_FILE_NAME_POT = os.path.join(REL_BRANCHES_DIR, DOMAIN + ".pot") @@ -678,6 +682,7 @@ class I18nSettings: GIT_I18N_PO_DIR = property(*(_gen_get_set_path("GIT_I18N_ROOT", "REL_GIT_I18N_PO_DIR"))) POTFILES_SOURCE_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_POTFILES_SOURCE_DIR"))) PRESETS_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_PRESETS_DIR"))) + TEMPLATES_DIR = property(*(_gen_get_set_path("SOURCE_DIR", "REL_TEMPLATES_DIR"))) FILE_NAME_POT = property(*(_gen_get_set_path("I18N_DIR", "REL_FILE_NAME_POT"))) MO_PATH_ROOT = property(*(_gen_get_set_path("I18N_DIR", "REL_MO_PATH_ROOT"))) MO_PATH_TEMPLATE = property(*(_gen_get_set_path("I18N_DIR", "REL_MO_PATH_TEMPLATE"))) |