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

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

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

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

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



  • [测试环境]: ubuntu server 10.04
    [Python Version] : 2.5.2
    [OpenERP-Client Version] : 6.0.3

    administration->translations->Load an Official Translation
    加载官方的中文的翻译

    administration->translations->import/export->export translation
    我想把中文翻译导出为PO文件进行修改,弹出错误提示:


    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
        result = ExportService.getService(service_name).dispatch(method, auth, params)
      File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
        res = fn(db, uid, *params)
      File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/opt/openerp/server/bin/addons/base/module/wizard/base_export_language.py", line 50, in act_getfile
        tools.trans_export(this.lang, mods, buf, this.format, cr)
      File "/opt/openerp/server/bin/tools/translate.py", line 469, in trans_export
        _process(format, modules, trans, buffer, lang, newlang)
      File "/opt/openerp/server/bin/tools/translate.py", line 434, in _process
        writer.write(row['modules'], row['tnrs'], src, row['translation'])
      File "/opt/openerp/server/bin/tools/translate.py", line 406, in write
        % (quote(source), quote(trad))
      File "/opt/openerp/server/bin/tools/translate.py", line 233, in quote
        assert r"\n" not in s, "Translation terms may not include escaped newlines ('\n'), please use only literal newlines! (in '%s')" % s
    AssertionError: <unprintable AssertionError object>



  • [测试环境]: ubuntu server 10.04
    [Python Version] : 2.5.2
    [OpenERP-Client Version] : 6.0.3

    administration->translations->Load an Official Translation
    加载官方的中文的翻译

    administration->translations->import/export->export translation
    我想把中文翻译导出为PO文件进行修改,弹出错误提示:


    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
        result = ExportService.getService(service_name).dispatch(method, auth, params)
      File "/opt/openerp/server/bin/service/web_services.py", line 599, in dispatch
        res = fn(db, uid, *params)
      File "/opt/openerp/server/bin/osv/osv.py", line 122, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/opt/openerp/server/bin/osv/osv.py", line 176, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/opt/openerp/server/bin/osv/osv.py", line 167, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/opt/openerp/server/bin/addons/base/module/wizard/base_export_language.py", line 50, in act_getfile
        tools.trans_export(this.lang, mods, buf, this.format, cr)
      File "/opt/openerp/server/bin/tools/translate.py", line 469, in trans_export
        _process(format, modules, trans, buffer, lang, newlang)
      File "/opt/openerp/server/bin/tools/translate.py", line 434, in _process
        writer.write(row['modules'], row['tnrs'], src, row['translation'])
      File "/opt/openerp/server/bin/tools/translate.py", line 406, in write
        % (quote(source), quote(trad))
      File "/opt/openerp/server/bin/tools/translate.py", line 233, in quote
        assert r"\n" not in s, "Translation terms may not include escaped newlines ('\n'), please use only literal newlines! (in '%s')" % s
    AssertionError: <unprintable AssertionError object>



  • 建议导出时 少选几个模块,或者一个个导出。

    我不觉得所有模块都会需要翻译
    如果是为了统一修改名词,建议导出为 csv,可以批量替换



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


登录后回复
 

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