diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-13 12:42:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-13 12:42:54 +0300 |
commit | 02a496c61cc878e0b9fd6208c808a4537942a791 (patch) | |
tree | 2f61f535d3f7c213e1c936dd4614dbf65bfec180 /release/scripts/modules/bl_i18n_utils/settings.py | |
parent | 7bac8348bf7e70325aa902ca1c6b6cd776d74d71 (diff) |
Translations utils: add needed bits to update git repo together with svn trunk.
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/settings.py')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index 30ee3cdc7d8..1c960a217de 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -416,6 +416,15 @@ REL_TRUNK_PO_DIR = os.path.join(REL_TRUNK_DIR, "po") # The /trunk/mo path (relative to I18N_DIR). REL_TRUNK_MO_DIR = os.path.join(REL_TRUNK_DIR, "locale") + +# The path to the *git* translation repository (relative to SOURCE_DIR). +REL_GIT_I18N_DIR = os.path.join("release/datafiles/locale") + + +# The /po path of the *git* translation repository (relative to REL_GIT_I18N_DIR). +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") @@ -497,14 +506,6 @@ def _gen_get_set_path(ref, name): return _get, _set -def _gen_get_set_paths(ref, name): - def _get(self): - return [_do_get(getattr(self, ref), p) for p in getattr(self, name)] - def _set(self, value): - setattr(self, name, [_do_set(getattr(self, ref), p) for p in value]) - return _get, _set - - class I18nSettings: """ Class allowing persistence of our settings! @@ -556,6 +557,8 @@ class I18nSettings: TRUNK_DIR = property(*(_gen_get_set_path("I18N_DIR", "REL_TRUNK_DIR"))) TRUNK_PO_DIR = property(*(_gen_get_set_path("I18N_DIR", "REL_TRUNK_PO_DIR"))) TRUNK_MO_DIR = property(*(_gen_get_set_path("I18N_DIR", "REL_TRUNK_MO_DIR"))) + 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"))) 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"))) |