diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-27 20:24:27 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-27 20:24:27 +0400 |
commit | a8b360da54af34438adecb8c6503647f7f2e1096 (patch) | |
tree | ca3ef763602cd010a69da5d9ae8e77fb7fd4c534 /ui_translate | |
parent | 7d0be95ac3d6289423cd1cc98b72163bd5b02a38 (diff) |
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...
Diffstat (limited to 'ui_translate')
-rw-r--r-- | ui_translate/update_svn.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ui_translate/update_svn.py b/ui_translate/update_svn.py index 946e7e4f..d9fa3833 100644 --- a/ui_translate/update_svn.py +++ b/ui_translate/update_svn.py @@ -110,10 +110,14 @@ class UI_PT_i18n_update_translations_settings(bpy.types.Panel): 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 @@ class UI_PT_i18n_update_translations_settings(bpy.types.Panel): 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 @@ class UI_OT_i18n_updatetranslation_svn_trunk(bpy.types.Operator): 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} |