diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-07-10 20:59:57 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-07-10 20:59:57 +0400 |
commit | 891ce0209b978ba8407bbb739e12db1562ea02b6 (patch) | |
tree | 8f19e2eb64d7339eb15311ae549fe32459560f54 /ui_translate | |
parent | 49ecb6cf0da19854afcb938013d9034957b7600d (diff) |
Another fix (use po file name as "langauge" dir for mo one, instead of language code...).
Diffstat (limited to 'ui_translate')
-rw-r--r-- | ui_translate/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui_translate/__init__.py b/ui_translate/__init__.py index d5473926..048ee9db 100644 --- a/ui_translate/__init__.py +++ b/ui_translate/__init__.py @@ -177,7 +177,8 @@ class UI_OT_edittranslation(bpy.types.Operator): # 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'} |