summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/wizard/wizard_export_lang.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@tinyerp.com>2010-02-16 12:06:36 +0100
committerChristophe Simonis <chs@tinyerp.com>2010-02-16 12:06:36 +0100
commit37237e134567d6bfa8fef486a3a595af648b8877 (patch)
treeea7cd33035aebf61b51f392e8b0c41b3bf6a54a5 /bin/addons/base/module/wizard/wizard_export_lang.py
parentdee2b4594842625d0c603a15fb5564dc6c4ff130 (diff)
[FIX] base: export translation: propose the right filename
bzr revid: chs@tinyerp.com-20100216110636-b1r6veimh4qgw03q
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_export_lang.py')
-rw-r--r--bin/addons/base/module/wizard/wizard_export_lang.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py
index 1e538b95cfb..b59351be61b 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/wizard_export_lang.py
@@ -19,14 +19,13 @@
#
##############################################################################
-import wizard
import tools
import base64
import cStringIO
-import csv
import pooler
from osv import fields,osv
from tools.translate import _
+from tools.misc import get_iso_codes
class wizard_export_lang(osv.osv_memory):
@@ -35,7 +34,6 @@ class wizard_export_lang(osv.osv_memory):
ids=lang_obj.search(cr, uid, ['&', ('active', '=', True), ('translatable', '=', True),])
langs=lang_obj.browse(cr, uid, ids)
return [(lang.code, lang.name) for lang in langs]
-
def act_cancel(self, cr, uid, ids, context=None):
#self.unlink(cr, uid, ids, context)
@@ -62,7 +60,9 @@ class wizard_export_lang(osv.osv_memory):
filename = _('new')
if not this.lang and len(mods) == 1:
filename = mods[0]
- this.name = "%s.%s" % (this.lang or filename, this.format)
+ if this.lang:
+ filename = get_iso_codes(this.lang)
+ this.name = "%s.%s" % (filename, this.format)
out=base64.encodestring(buf.getvalue())
buf.close()
return self.write(cr, uid, ids, {'state':'get', 'data':out, 'advice':this.advice, 'name':this.name}, context=context)