求教:关于翻译问题
-
open.py文件:
<br />{<br /> "name": "Device Management",<br /> "version": "1.1",<br /> "category": "Device Management",<br /> 'complexity': "easy",<br /> "website": "http://www.xxx.com",<br /> 'depends': ['base','region'],<br /> 'init_xml': ['device_data.xml'],<br /> 'update_xml': [<br /> 'device_view.xml',<br /> ],<br /> 'demo_xml': [],<br /> 'test': [],<br /> 'installable': True,<br /> 'application': True,<br /> 'auto_install': False,<br /> "css": [ 'static/src/css/device.css' ],<br /> 'js': ['static/src/js/device.js'],<br />}<br />
device_data.xml文件(部分):<br /><?xml version="1.0" encoding="utf-8"?><br /><openerp><br /> <data noupdate="1"><br /> <record id="assets_category1" model="device.assets.category"><br /> <field name="name">Optical gas detector</field><br /> </record><br /> </data><br /></openerp><br />
zh_CN.po文件(部分):<br />#. module: device<br />#: model:device.assets.category,name:device.assets_category1<br />msgid "Optical gas detector"<br />msgstr "光学气体检测仪"<br />
为件么"[b]Optical gas detector[/b]"翻译不过来? -
自已来回复,
<br />class device_assets_category(osv.osv): <br /> '''Assets Category'''<br /> _name='device.assets.category'<br /> _columns={<br /> 'name':fields.char('Name',size=64,required=True,translate=True),<br /> }<br /> _sql_constraints = [<br /> ('device_assets_category_uniq', 'unique (name)', 'device assets category name must be unique.')<br /> ]<br />
加上"translatel"属性