From 891ce0209b978ba8407bbb739e12db1562ea02b6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne <montagne29@wanadoo.fr> Date: Tue, 10 Jul 2012 16:59:57 +0000 Subject: [PATCH] Another fix (use po file name as "langauge" dir for mo one, instead of language code...). --- ui_translate/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui_translate/__init__.py b/ui_translate/__init__.py index d5473926b..048ee9db7 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'} -- GitLab