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账号

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

    汉化 OpenERP 6.1 的日历

    Odoo 中文翻译
    3
    6
    15202
    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.
    • O
      oldrev last edited by

      研究了一下怎么汉化 OpenERP 6.1 的日历视图,最终还是搞定了。解决的办法就是修改  openerp/addons/web_calendar/openerp.py 文件:

      {<br />&nbsp; &nbsp; &quot;name&quot;: &quot;web calendar&quot;,<br />&nbsp; &nbsp; &quot;category&quot;: &quot;Hidden&quot;,<br />&nbsp; &nbsp; &quot;description&quot;:<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; OpenERP Web calendar view.<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;&quot;,<br />&nbsp; &nbsp; &quot;version&quot;: &quot;2.0&quot;,<br />&nbsp; &nbsp; &quot;depends&quot;: &#91;&#039;web&#039;],<br />&nbsp; &nbsp; &quot;js&quot;: [<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler_debug.js&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_minical.js&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;static/lib/dhtmlxScheduler/sources/locale_cn.js&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;static/src/js/calendar.js&#039;,<br />&nbsp; &nbsp; ],<br />&nbsp; &nbsp; &quot;css&quot;: [<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_ext.css&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;static/src/css/web_calendar.css&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br />&nbsp; &nbsp; &#039;qweb&#039; : [<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;static/src/xml/*.xml&quot;,<br />&nbsp; &nbsp; ],<br />&nbsp; &nbsp; &#039;active&#039;: True<br />}<br />
      



      详情参考:
      http://oldrev.wordpress.com/2012/03/24/如何汉化-openerp-6-1-日历视图/
      上面的 wordpress 链接如果打不开可以看国内 cnblogs 镜像:
      http://www.cnblogs.com/oldrev/archive/2012/03/24/2415404.html

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

        直接用编辑器打开 openerp/addons/web_calendar/openerp.py,在系统原有的 'static/src/js/calendar.js' 行上方插入:'static/lib/dhtmlxScheduler/sources/locale_cn.js'。

        那么其他国家的岂不是要引入其他js?
        如果有更通用的办法就好了,可以给官方提个patch

        另外,登陆界面也是英文,改xml毕竟是下策。

        GoodERP -- Odoo China fork

        1 Reply Last reply Reply Quote 0
        • O
          oldrev last edited by

          [quote author=Jeff link=topic=2851.msg9593#msg9593 date=1332582362]
          直接用编辑器打开 openerp/addons/web_calendar/openerp.py,在系统原有的 'static/src/js/calendar.js' 行上方插入:'static/lib/dhtmlxScheduler/sources/locale_cn.js'。

          那么其他国家的岂不是要引入其他js?
          如果有更通用的办法就好了,可以给官方提个patch

          另外,登陆界面也是英文,改xml毕竟是下策。
          [/quote]

          没办法,locale_xxx.js 的后缀跟 OE 的又没有对应,而且在 openerp.py 里也没法取到当前登录用户的语言(或者我不知道?)。

          1 Reply Last reply Reply Quote 0
          • H
            hungriness last edited by

            汉化这个解决方案
            1、到http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/jquery.ui.datepicker-zh-CN.js下载到相关文件夹中,我的存在"static/lib/jquery.ui.timepicker/js/",中,此汉化日期
            2、将以下存成jquery.ui.timepicker-zh-CN.js中并放在同样文件夹下,此汉化时间

            /* Chinese translation for the jQuery Timepicker Addon */
            jQuery(function($) {
              $.timepicker.regional['zh-CN'] = {
                  currentText: '现在',
                  closeText: '完成',
                  ampm: false,
                  amNames: ['上午', 'AM'],
                  pmNames: ['下午', 'PM'],
                  timeFormat: 'hh:mm tt',
                  timeSuffix: '',
                  timeOnlyTitle: '选择时间',
                  timeText: '时间',
                  hourText: '时',
                  minuteText: '分',
                  secondText: '秒',
                  millisecText: '毫秒',
                  timezoneText: '时区',
              };
              $.timepicker.setDefaults($.timepicker.regional['zh-CN']);
                  });

            3、在web的__openerp__.py中 "static/lib/jquery.ui.timepicker/js/jquery-ui-timepicker-addon.js",下加入以下两行
                    "static/lib/jquery.ui.timepicker/js/jquery.ui.datepicker-zh-CN.js",
                    "static/lib/jquery.ui.timepicker/js/jquery.ui.timepicker-zh-CN.js",
            即可

            1 Reply Last reply Reply Quote 0
            • H
              hungriness last edited by

              dhtmlxgantt中找到个参数。
              web_gantt/static/src/js/gantt.js  文件中,添加以下两行,可以将月份改成中文。
              起始日期,结束日期好象还是英文。

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