Navigation

    Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

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

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

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

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

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

    OE6.0.2 Web client 中文生效方法

    Odoo 开发与实施交流
    9
    12
    11866
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xtjie last edited by

      将文件解压缩,替换web 安装目录中的 library.zip 中的 \openobject\i18n_gettext.pyo ,就可以了.

      此文件在源代码中位置: openerp-web-6.0.2\openobject\i18n_gettext.py

      问题在文件的此函数中:

      def get_translations(locale, domain=None):
          domain = domain or "messages"

          domain_catalog = _translations.setdefault(domain, {})

        [color=green] if locale=='zh_CN' and 'zh_CN' in domain_catalog :
              return  domain_catalog['zh_CN'][/color]

          if locale in domain_catalog:  ## locale  是'zh_CN', 但这个判断语句却不起作用,还请高人能给解释解释。
              return domain_catalog[locale]
          return domain_catalog[locale.language]


      1 Reply Last reply Reply Quote 0
      • mrshelly
        mrshelly last edited by

        是因为  locale变量是个对象. 而 这个 if 语句 的 locale 期望 一个 'zh_CN' 的串.
        所以这里最好的解决办法是

        if str(locale) in domain_catalog:
                return domain_catalog[str(locale)]


        这个BUG 我已经提给官方了. 不过 他们能不能看懂我的描述 在下一个版本中 能不能修正.  就等等看了...

        1 Reply Last reply Reply Quote 0
        • M
          mihi last edited by

          好东西!正是我所需要的。

          1 Reply Last reply Reply Quote 0
          • L
            lindongy last edited by

            [quote author=mrshelly link=topic=2429.msg8086#msg8086 date=1307408028]
            是因为  locale变量是个对象. 而 这个 if 语句 的 locale 期望 一个 'zh_CN' 的串.
            所以这里最好的解决办法是

            if str(locale) in domain_catalog:
                    return domain_catalog[str(locale)]


            这个BUG 我已经提给官方了. 不过 他们能不能看懂我的描述 在下一个版本中 能不能修正.  就等等看了...
            [/quote]

            这是个问题会导致什么现象?

            1 Reply Last reply Reply Quote 0
            • mrshelly
              mrshelly last edited by

              @lindongy 当你遇到的时候, 再仔细回来看看, 你就会明白了....

              1 Reply Last reply Reply Quote 0
              • wjfonhand
                wjfonhand last edited by

                [quote author=lindongy link=topic=2429.msg8103#msg8103 date=1307537959]
                这是个问题会导致什么现象?
                [/quote]

                web界面上的一些通用的翻译项,比如 搜索,新建,删除,右上角的个人参数等链接字符还是英文。按道理你用户选了中文,这些也应该是中文。
                因为这些是独立在web服务器上的翻译项,这个bug导致每个界面上都有这些该死的英文。最终用户不会接受的。

                1 Reply Last reply Reply Quote 0
                • L
                  lindongy last edited by

                  喔,这个我还就看到了,真以为是翻译漏项。

                  1 Reply Last reply Reply Quote 0
                  • C
                    coldfire last edited by

                    谢谢努力。非常感谢。

                    1 Reply Last reply Reply Quote 0
                    • W
                      wuliuhong last edited by

                      我改了 首页还是英文 里面那些小按钮还是英文
                      是不是改了改文件 还要进行其它操作呢


                      可以了

                      1 Reply Last reply Reply Quote 0
                      • Z
                        zhuweihua last edited by

                        感谢,做个mark。

                        1 Reply Last reply Reply Quote 0
                        • C
                          ccdos last edited by

                          论坛真强大


                          一遇到问题 搜一下 就有解决方案

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post