diff options
author | Damien Picard <pioverfour> | 2022-08-01 15:09:41 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-01 15:09:41 +0300 |
commit | 3239cea726c7409f9fc6be53c078c3087a76c233 (patch) | |
tree | 5272b99d99963bf4c200418090446e29e6a5f91e /release/scripts/modules/bl_i18n_utils/settings.py | |
parent | 543b47f1628487548888ab6f4a13e8556dc84509 (diff) |
I18n: make presets translatable
Presets are used all over the Blender UI, but were so far untranslatable.
This adds the translation code as well as a new `dump_preset_messages()` function in the message extraction. This goes over all bundled preset file names and extracts them.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15570
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/settings.py')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index 3b69f8a6bf7..8d6d4fb5d3b 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -514,6 +514,9 @@ REL_GIT_I18N_PO_DIR = os.path.join("po") # The Blender source path to check for i18n macros (relative to SOURCE_DIR). 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") + # The template messages file (relative to I18N_DIR). REL_FILE_NAME_POT = os.path.join(REL_BRANCHES_DIR, DOMAIN + ".pot") @@ -672,6 +675,7 @@ class I18nSettings: GIT_I18N_ROOT = property(*(_gen_get_set_path("SOURCE_DIR", "REL_GIT_I18N_DIR"))) 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"))) 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"))) |