[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3612] trunk/py/scripts/addons/ ui_translate/__init__.py: Another fix (use po file name as "langauge" dir for mo one, instead of language code...).

Bastien Montagne montagne29 at wanadoo.fr
Tue Jul 10 18:59:58 CEST 2012


Revision: 3612
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3612
Author:   mont29
Date:     2012-07-10 16:59:57 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
Another fix (use po file name as "langauge" dir for mo one, instead of language code...).

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

Modified: trunk/py/scripts/addons/ui_translate/__init__.py
===================================================================
--- trunk/py/scripts/addons/ui_translate/__init__.py	2012-07-10 14:22:10 UTC (rev 3611)
+++ trunk/py/scripts/addons/ui_translate/__init__.py	2012-07-10 16:59:57 UTC (rev 3612)
@@ -177,7 +177,8 @@
             # Always invalidate all caches afterward!
             clear_caches(self.po_file)
         if self.update_mo:
-            bpy.ops.ui.edittranslation_update_mo(po_file=self.po_file, lang=self.lang)
+            lang = os.path.splitext(os.path.basename(self.po_file))[0]
+            bpy.ops.ui.edittranslation_update_mo(po_file=self.po_file, lang=lang)
         elif self.clean_mo:
             bpy.ops.ui.edittranslation_update_mo(clean_mo=True)
         return {'FINISHED'}



More information about the Bf-extensions-cvs mailing list