From 7013931b1495f57bb6ce6d5714a2c9308bab482a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 26 Oct 2012 13:15:14 +0000 Subject: [PATCH] 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!). --- .../modules/bl_i18n_utils/update_branches.py | 17 ++++++++--------- .../scripts/modules/bl_i18n_utils/update_pot.py | 4 ++-- 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",