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

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

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

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

导出官方的中文翻译为PO文件时出错



  • [测试环境]: ubuntu server 10.04 <br />[Python Version] : 2.5.2<br />[OpenERP-Client Version] : 6.0.3<br /><br />administration->translations->Load an Official Translation<br />加载官方的中文的翻译<br /><br />administration->translations->import/export->export translation<br />我想把中文翻译导出为PO文件进行修改,弹出错误提示:<br /><br /><br />Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):<br />  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch<br />    result = ExportService.getService(service_name).dispatch(method, auth, params)<br />  File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch<br />    res = fn(db, uid, *params)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper<br />    return f(self, dbname, *args, **kwargs)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute<br />    res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr<br />    return getattr(object, method)(cr, uid, *args, **kw)<br />  File "/opt/openerp/server/bin/addons/base/module/wizard/base_export_language.py", line 50, in act_getfile<br />    tools.trans_export(this.lang, mods, buf, this.format, cr)<br />  File "/opt/openerp/server/bin/tools/translate.py", line 469, in trans_export<br />    _process(format, modules, trans, buffer, lang, newlang)<br />  File "/opt/openerp/server/bin/tools/translate.py", line 434, in _process<br />    writer.write(row['modules'], row['tnrs'], src, row['translation'])<br />  File "/opt/openerp/server/bin/tools/translate.py", line 406, in write<br />    % (quote(source), quote(trad))<br />  File "/opt/openerp/server/bin/tools/translate.py", line 233, in quote<br />    assert r"\n" not in s, "Translation terms may not include escaped newlines ('\n'), please use only literal newlines! (in '%s')" % s<br />AssertionError: <unprintable AssertionError object>



  • [测试环境]: ubuntu server 10.04 <br />[Python Version] : 2.5.2<br />[OpenERP-Client Version] : 6.0.3<br /><br />administration->translations->Load an Official Translation<br />加载官方的中文的翻译<br /><br />administration->translations->import/export->export translation<br />我想把中文翻译导出为PO文件进行修改,弹出错误提示:<br /><br /><br />Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):<br />  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch<br />    result = ExportService.getService(service_name).dispatch(method, auth, params)<br />  File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch<br />    res = fn(db, uid, *params)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper<br />    return f(self, dbname, *args, **kwargs)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute<br />    res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />  File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr<br />    return getattr(object, method)(cr, uid, *args, **kw)<br />  File "/opt/openerp/server/bin/addons/base/module/wizard/base_export_language.py", line 50, in act_getfile<br />    tools.trans_export(this.lang, mods, buf, this.format, cr)<br />  File "/opt/openerp/server/bin/tools/translate.py", line 469, in trans_export<br />    _process(format, modules, trans, buffer, lang, newlang)<br />  File "/opt/openerp/server/bin/tools/translate.py", line 434, in _process<br />    writer.write(row['modules'], row['tnrs'], src, row['translation'])<br />  File "/opt/openerp/server/bin/tools/translate.py", line 406, in write<br />    % (quote(source), quote(trad))<br />  File "/opt/openerp/server/bin/tools/translate.py", line 233, in quote<br />    assert r"\n" not in s, "Translation terms may not include escaped newlines ('\n'), please use only literal newlines! (in '%s')" % s<br />AssertionError: <unprintable AssertionError object>



  • 建议导出时 少选几个模块,或者一个个导出。<br /><br />我不觉得所有模块都会需要翻译<br />如果是为了统一修改名词,建议导出为 csv,可以批量替换



  • 你应该找到这个po文件,将'\n'改成'\n', 然后update这个模块。然后再尝试导出。:)


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待