[Bf-translations-svn] SVN commit: /data/svn/bf-translations [134] trunk/po/tools: Updated tools ( cosmetic changes, + work-in-progress improvements on _update_msg.py).

bf-translations at blender.org bf-translations at blender.org
Fri Oct 28 11:02:51 CEST 2011


Revision: 134
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-translations&revision=134
Author:   mont29
Date:     2011-10-28 09:02:50 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
Updated tools (cosmetic changes, + work-in-progress improvements on _update_msg.py).

Modified Paths:
--------------
    trunk/po/tools/_update_msg.py
    trunk/po/tools/import_po_from_branches.py

Modified: trunk/po/tools/_update_msg.py
===================================================================
--- trunk/po/tools/_update_msg.py	2011-10-26 09:06:30 UTC (rev 133)
+++ trunk/po/tools/_update_msg.py	2011-10-28 09:02:50 UTC (rev 134)
@@ -352,6 +352,12 @@
             module_name = mod.__name__
             bpy.ops.wm.addon_enable(module=module_name)
 
+        # There are currently some problems with bpy/rna... *Very* tricky to solve!
+        # So this is a hack to make all newly added operator visible by
+        # bpy.types.OperatorProperties.__subclasses__()
+        for el in dir(bpy.types):
+            getattr(bpy.types, el)
+
     # check for strings like ": %d"
     ignore = ("%d", "%f", "%s", "%r",  # string formatting
               "*", ".", "(", ")", "-", "/", "\\", "+", ":", "#", "%"

Modified: trunk/po/tools/import_po_from_branches.py
===================================================================
--- trunk/po/tools/import_po_from_branches.py	2011-10-26 09:06:30 UTC (rev 133)
+++ trunk/po/tools/import_po_from_branches.py	2011-10-28 09:02:50 UTC (rev 134)
@@ -74,7 +74,7 @@
                     lvl = float(trans_msgs)/float(tot_msgs)
                 if lvl > threshold:
                     if state["is_broken"] and args.strict:
-                        print("{:<10}: {:>5.1%} done, but BROKEN, skipped." \
+                        print("{:<10}: {:>6.1%} done, but BROKEN, skipped." \
                               "".format(lang, lvl))
                         ret = 1
                     else:
@@ -84,20 +84,20 @@
                             t = subprocess.call([PY3, po_script, po, out_po])
                             if t:
                                 ret = t
-                            print("{:<10}: {:>5.1%} done, enough translated " \
+                            print("{:<10}: {:>6.1%} done, enough translated " \
                                   "messages, processed and copied to trunk." \
                                   "".format(lang, lvl))
                         else:
                             shutil.copy(po, TRUNK_PO_DIR)
-                            print("{:<10}: {:>5.1%} done, enough translated " \
+                            print("{:<10}: {:>6.1%} done, enough translated " \
                                   "messages, copied to trunk.".format(lang, lvl))
                 else:
                     if state["is_broken"] and args.strict:
-                        print("{:<10}: {:>5.1%} done, BROKEN and not enough " \
+                        print("{:<10}: {:>6.1%} done, BROKEN and not enough " \
                               "translated messages, skipped".format(lang, lvl))
                         ret = 1
                     else:
-                        print("{:<10}: {:>5.1%} done, not enough translated " \
+                        print("{:<10}: {:>6.1%} done, not enough translated " \
                               "messages, skipped.".format(lang, lvl))
     return ret
 



More information about the Bf-translations-svn mailing list