Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-10-26 17:15:14 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-10-26 17:15:14 +0400
commit7013931b1495f57bb6ce6d5714a2c9308bab482a (patch)
tree574eebfab312a70de8e60d891d13a9a566a39be9 /release/scripts/modules/bl_i18n_utils
parent2821f822c52146e2e6fbcdeb70232ad2fd9a176f (diff)
Back to generating a pot file into trunk/po of i18n repo (it's useful for translators who want to start a new translation without be able to generate their own po!).
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils')
-rwxr-xr-xrelease/scripts/modules/bl_i18n_utils/update_branches.py17
-rwxr-xr-xrelease/scripts/modules/bl_i18n_utils/update_pot.py4
2 files changed, 10 insertions, 11 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/update_branches.py b/release/scripts/modules/bl_i18n_utils/update_branches.py
index 199b09aa13a..4c38a2f71fb 100755
--- a/release/scripts/modules/bl_i18n_utils/update_branches.py
+++ b/release/scripts/modules/bl_i18n_utils/update_branches.py
@@ -38,6 +38,8 @@ except:
PY3 = settings.PYTHON3_EXEC
+FILE_NAME_POT = settings.FILE_NAME_POT
+
def main():
import argparse
@@ -71,16 +73,13 @@ def main():
if t:
ret = t
- # Regenerate POTFILES.in.
-# cmd = (PY3, "./update_potinput.py")
-# t = subprocess.call(cmd)
-# if t:
-# ret = t
-
# Generate a temp pot file.
- dummy, potfile = tempfile.mkstemp(suffix=".pot",
- prefix="blender_pot_")
- os.close(dummy)
+ # Back to having a pot file in trunk/po. It's quite useful for translators that want to start
+ # a new translation and not not want to bother generating their own po from scratch!
+# dummy, potfile = tempfile.mkstemp(suffix=".pot",
+# prefix="blender_pot_")
+# os.close(dummy)
+ potfile = FILE_NAME_POT
cmd = [PY3, "./update_pot.py", "-i", msgfile, "-o", potfile]
if not args.no_checks:
cmd.append("-c")
diff --git a/release/scripts/modules/bl_i18n_utils/update_pot.py b/release/scripts/modules/bl_i18n_utils/update_pot.py
index c4d9a2ed20a..c76c28a7e5d 100755
--- a/release/scripts/modules/bl_i18n_utils/update_pot.py
+++ b/release/scripts/modules/bl_i18n_utils/update_pot.py
@@ -236,8 +236,8 @@ def merge_messages(msgs, states, messages, do_checks, spell_cache):
def main():
- parser = argparse.ArgumentParser(description="Update blender.pot file " \
- "from messages.txt")
+ parser = argparse.ArgumentParser(description="Update blender.pot file from messages.txt and source code parsing, "
+ "and performs some checks over msgids.")
parser.add_argument('-w', '--warning', action="store_true",
help="Show warnings.")
parser.add_argument('-i', '--input', metavar="File",