[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4333] trunk/py/scripts/addons/ ui_translate/update_svn.py: Various small enhancements/fixes.

Bastien Montagne montagne29 at wanadoo.fr
Wed Feb 27 17:24:27 CET 2013


Revision: 4333
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4333
Author:   mont29
Date:     2013-02-27 16:24:27 +0000 (Wed, 27 Feb 2013)
Log Message:
-----------
Various small enhancements/fixes.

Most notable difference from now on will be that all py is handled from current blender's resource dirs, no more from source dir. Better for consistency, and avoid e.g. cycles' addon to be checked twice...

Modified Paths:
--------------
    trunk/py/scripts/addons/ui_translate/update_svn.py

Modified: trunk/py/scripts/addons/ui_translate/update_svn.py
===================================================================
--- trunk/py/scripts/addons/ui_translate/update_svn.py	2013-02-26 18:59:15 UTC (rev 4332)
+++ trunk/py/scripts/addons/ui_translate/update_svn.py	2013-02-27 16:24:27 UTC (rev 4333)
@@ -110,10 +110,14 @@
             layout.label(text="Please edit the preferences of the UI Translate addon")
         else:
             split = layout.split(0.75)
-            split.template_list("UI_UL_i18n_languages", "", i18n_sett, "langs", i18n_sett, "active_lang", rows=5)
+            split.template_list("UI_UL_i18n_languages", "", i18n_sett, "langs", i18n_sett, "active_lang", rows=8)
             col = split.column()
+            col.operator("ui.i18n_updatetranslation_svn_init_settings", text="Reset Settings")
             col.operator("ui.i18n_updatetranslation_svn_settings_select_all", text="Select All").use_select = True
             col.operator("ui.i18n_updatetranslation_svn_settings_select_all", text="Deselect All").use_select = False
+            col.separator()
+            col.operator("ui.i18n_updatetranslation_svn_branches", text="Update Branches")
+            col.operator("ui.i18n_updatetranslation_svn_trunk", text="Update Trunk")
 
             if i18n_sett.active_lang >= 0 and i18n_sett.active_lang < len(i18n_sett.langs):
                 lng = i18n_sett.langs[i18n_sett.active_lang]
@@ -127,10 +131,6 @@
                 col.prop(lng, "mo_path_trunk")
             layout.separator()
             layout.prop(i18n_sett, "pot_path")
-            row = layout.row()
-            row.operator("ui.i18n_updatetranslation_svn_init_settings", text="Reset Settings")
-            row.operator("ui.i18n_updatetranslation_svn_branches", text="Update Branches")
-            row.operator("ui.i18n_updatetranslation_svn_trunk", text="Update Trunk")
 
 
 ##### Operators #####
@@ -282,6 +282,9 @@
             stats[lng.uid] = po.nbr_trans_msgs / po.nbr_msgs
             print("\n")
 
+        # Copy pot file from branches to trunk.
+        shutil.copy2(self.settings.FILE_NAME_POT, self.settings.TRUNK_PO_DIR)
+
         print("Generating languages' menu...")
         # First complete our statistics by checking po files we did not touch this time!
         po_to_uid = {os.path.basename(lng.po_path): lng.uid for lng in i18n_sett.langs}



More information about the Bf-extensions-cvs mailing list