summaryrefslogtreecommitdiff
path: root/bin/wizard/__init__.py
diff options
context:
space:
mode:
authorChristophe Simonis <christophe@tinyerp.com>2008-12-05 14:43:32 +0100
committerChristophe Simonis <christophe@tinyerp.com>2008-12-05 14:43:32 +0100
commit75a195153fc2db09fc7e60249f939a565fd6f72e (patch)
tree8fb1ee27ebe3509a9e8fc0d90b97f6b8cdf82c81 /bin/wizard/__init__.py
parent49916d38fd95ee7cd163f5221306f8a84019ca72 (diff)
[FIX] allow selections in (old style) wizards to be translated (idea from Activity Solutions)
bzr revid: christophe@tinyerp.com-20081205134332-hkwjiy5fulyh5o2i
Diffstat (limited to 'bin/wizard/__init__.py')
-rw-r--r--bin/wizard/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py
index 44f895f352b..72be97b3958 100644
--- a/bin/wizard/__init__.py
+++ b/bin/wizard/__init__.py
@@ -116,6 +116,11 @@ class interface(netsvc.Service):
trans = translate(cr, self.wiz_name+','+state+','+field, 'wizard_field', lang)
if trans:
fields[field]['string'] = trans
+
+ if 'selection' in fields[field]:
+ trans = lambda x: translate(cr, self.wiz_name+','+state+','+field, 'selection', lang, x) or x
+ for idx, (key, val) in enumerate(fields[field]['selection']):
+ fields[field]['selection'][idx] = (key, trans(val))
# translate arch
if not isinstance(arch, UpdateableStr):