Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

求教:关于翻译问题



  • open.py文件:

    <br />{<br />&nbsp; &nbsp; &quot;name&quot;: &quot;Device Management&quot;,<br />&nbsp; &nbsp; &quot;version&quot;: &quot;1.1&quot;,<br />&nbsp; &nbsp; &quot;category&quot;: &quot;Device Management&quot;,<br />&nbsp; &nbsp; &#039;complexity&#039;: &quot;easy&quot;,<br />&nbsp; &nbsp; &quot;website&quot;: &quot;http://www.xxx.com&quot;,<br />&nbsp; &nbsp; &#039;depends&#039;: &#91;&#039;base&#039;,&#039;region&#039;],<br />&nbsp; &nbsp; &#039;init_xml&#039;: &#91;&#039;device_data.xml&#039;],<br />&nbsp; &nbsp; &#039;update_xml&#039;: [<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;device_view.xml&#039;,<br />&nbsp; &nbsp; ],<br />&nbsp; &nbsp; &#039;demo_xml&#039;: &#91;],<br />&nbsp; &nbsp; &#039;test&#039;: &#91;],<br />&nbsp; &nbsp; &#039;installable&#039;: True,<br />&nbsp; &nbsp; &#039;application&#039;: True,<br />&nbsp; &nbsp; &#039;auto_install&#039;: False,<br />&nbsp; &nbsp; &quot;css&quot;: [ &#039;static/src/css/device.css&#039; ],<br />&nbsp; &nbsp; &#039;js&#039;: &#91;&#039;static/src/js/device.js&#039;],<br />}<br />
    


    device_data.xml文件(部分):

    <br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;openerp&gt;<br />&nbsp; &nbsp; &lt;data noupdate=&quot;1&quot;&gt;<br />	&lt;record id=&quot;assets_category1&quot; model=&quot;device.assets.category&quot;&gt;<br />	&nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;Optical gas detector&lt;/field&gt;<br />	&lt;/record&gt;<br />&nbsp; &nbsp; &lt;/data&gt;<br />&lt;/openerp&gt;<br />
    


    zh_CN.po文件(部分):

    <br />#. module: device<br />#: model:device.assets.category,name:device.assets_category1<br />msgid &quot;Optical gas detector&quot;<br />msgstr &quot;光学气体检测仪&quot;<br />
    



    为件么"[b]Optical gas detector[/b]"翻译不过来?



  • 自已来回复,

    <br />class device_assets_category(osv.osv):&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &#039;&#039;&#039;Assets Category&#039;&#039;&#039;<br />&nbsp; &nbsp; _name=&#039;device.assets.category&#039;<br />&nbsp; &nbsp; _columns={<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;name&#039;:fields.char(&#039;Name&#039;,size=64,required=True,translate=True),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; _sql_constraints = [<br />&nbsp; &nbsp; &nbsp; &nbsp; (&#039;device_assets_category_uniq&#039;, &#039;unique (name)&#039;, &#039;device assets category name must be unique.&#039;)<br />&nbsp; &nbsp; ]<br />
    


    加上"translatel"属性


Log in to reply