• 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

汉化 OpenERP 6.1 的日历

已定时 已固定 已锁定 已移动 Odoo 中文翻译
6 帖子 3 发布者 15302 浏览
    • 从旧到新
    • 从新到旧
    • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • O 离线
    O 离线
    oldrev
    写于 最后由 编辑
    #1

    研究了一下怎么汉化 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 条回复 最后回复
    0
  • wjfonhandW 离线
    wjfonhandW 离线
    wjfonhand
    写于 最后由 编辑
    #2

    直接用编辑器打开 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 条回复 最后回复
    0
  • O 离线
    O 离线
    oldrev
    写于 最后由 编辑
    #3

    [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 条回复 最后回复
    0
  • H 离线
    H 离线
    hungriness
    写于 最后由 编辑
    #4

    汉化这个解决方案
    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 条回复 最后回复
    0
  • H 离线
    H 离线
    hungriness
    写于 最后由 编辑
    #5

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

    1 条回复 最后回复
    0

  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。