summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/wizard/wizard_export_lang.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2009-04-06 16:06:41 +0300
committerP. Christeas <p_christ@hol.gr>2009-04-06 16:06:41 +0300
commit59c0e4889a1ed1a1b66ae9cd6e3ca6d058668a2b (patch)
tree57725be1936b9a7b538696ceda22d3e3a63c5f98 /bin/addons/base/module/wizard/wizard_export_lang.py
parentff60e8d63a1d5ccbab2920750acf4d2c1f5092b0 (diff)
parent67526cf79371477e2033c7603752feb48a160d5f (diff)
Merge commit 'origin/master' into mdv-gpl3-py26
bzr revid: p_christ@hol.gr-20090330173719-27jcy2nyw1v4w3bq bzr revid: p_christ@hol.gr-20090330173755-o3pxayaintefn150 bzr revid: p_christ@hol.gr-20090330173849-heuqfveq1xdeoe6h bzr revid: p_christ@hol.gr-20090406130641-9mrstydveuqjkkjv
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, 5 insertions, 3 deletions
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py
index 2e8be987c24..b47a86265f5 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/wizard_export_lang.py
@@ -27,7 +27,7 @@ import cStringIO
import csv
import pooler
from osv import fields,osv
-
+from tools.translate import _
class wizard_export_lang(osv.osv_memory):
@@ -60,8 +60,10 @@ class wizard_export_lang(osv.osv_memory):
elif this.format == 'tgz':
ext = this.lang and '.po' or '.pot'
this.advice = _('Save this document to a .tgz file. This archive containt UTF-8 %s files and may be uploaded to launchpad.') % (ext,)
-
- this.name = "%s.%s" % (this.lang or _('new'), this.format)
+ filename = _('new')
+ if not this.lang and len(mods) == 1:
+ filename = mods[0]
+ this.name = "%s.%s" % (this.lang or 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)