Back to generating a pot file into trunk/po of i18n repo (it's useful for translators...
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 26 Oct 2012 13:15:14 +0000 (13:15 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 26 Oct 2012 13:15:14 +0000 (13:15 +0000)
release/scripts/modules/bl_i18n_utils/update_branches.py
release/scripts/modules/bl_i18n_utils/update_pot.py

index 199b09aa13ad6730ef753eb4c4006fa50d401f73..4c38a2f71fb18d3812cbc5ef43d9c661b1df86ee 100755 (executable)
@@ -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")
index c4d9a2ed20aa6d0c8c0603e732c3824cc486219f..c76c28a7e5d63aefe1a5d8284c191fedf402c35a 100755 (executable)
@@ -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",