8

我在项目模块中的翻译有问题。某些菜单项未翻译。可能是什么问题呢?

在此处输入图像描述

这里project_view.xml

<!-- Top menu item -->
<menuitem name="Project"
    id="base.menu_main_pm"
    groups="group_project_manager,group_project_user"
    icon="fa-calendar"
    web_icon="project,static/description/icon.png"
    sequence="50"/>

这里ru.po

#. module: project
#: model:ir.model,name:project.model_project_project
#: model:ir.model.fields,field_description:project.field_project_task_history_cumulative_project_id
#: model:ir.model.fields,field_description:project.field_project_task_project_id
#: model:ir.model.fields,field_description:project.field_report_project_task_user_project_id
#: model:ir.ui.view,arch_db:project.edit_project
#: model:ir.ui.view,arch_db:project.view_task_form2
#: model:ir.ui.view,arch_db:project.view_task_history_search
#: model:ir.ui.view,arch_db:project.view_task_project_user_search
#: model:ir.ui.view,arch_db:project.view_task_search_form
#: model:res.request.link,name:project.req_link_project
msgid "Project"
msgstr "Проект"
4

4 回答 4

9

我也遇到过这个翻译问题。我也更新base了很多次模块并且它有效,但有时没有必要。我所做的是下一个过程:

  • 转到设置>翻译>加载翻译,选择您的语言并选中覆盖现有术语框,然后单击 加载按钮。

  • 之后,按 F5 刷新浏览器,然后转到Settings > Translations > Application Terms > Synchronize Terms,选择您的语言并单击Update。然后再次按 F5 以查看您的条款是否已更新。

问候。

于 2015-11-09T10:14:20.583 回答
3

有时翻译效果不太好。尝试按下“基础”模块中的“更新”按钮。这应该可以解决问题。

更新:2019 年 11 月 21 日

我不知道在旧版本中,但现在命令行中有更多选项可以更新、导入和导出翻译。该论点--i18n-overwrite在您的情况下可能有用:

Use these options to translate Odoo to another language. See i18n
section of the user manual. Option '-d' is mandatory. Option '-l' is
mandatory in case of importation

--load-language=LOAD_LANGUAGE
                    specifies the languages for the translations you want
                    to be loaded
-l LANGUAGE, --language=LANGUAGE
                    specify the language of the translation file. Use it
                    with --i18n-export or --i18n-import
--i18n-export=TRANSLATE_OUT
                    export all sentences to be translated to a CSV file, a
                    PO file or a TGZ archive and exit
--i18n-import=TRANSLATE_IN
                    import a CSV or a PO file with translations and exit.
                    The '-l' option is required.
--i18n-overwrite    overwrites existing translation terms on updating a
                    module or importing a CSV or a PO file.
--modules=TRANSLATE_MODULES
                    specify modules to export. Use in combination with
                    --i18n-export
于 2015-11-02T21:07:39.367 回答
2

有时,更新基本模块是不够的。我根据帖子实现了一个解决方案。我所做的是使用查询清除整个语言,然后再次使用重新加载语言。从配置菜单中“加载翻译”。

使之成为可能的查询如下,例如对于 es_CL:

从 ir_translation 中删除 lang = 'es_CL';

我把它放在一个模块中,你可以用它来适应你的需要:

https://github.com/odoo-chile/l10n_cl_clear_translation

安装此模块后,它会运行查询。然后您可以使用菜单重新加载您的语言。

于 2016-08-23T12:32:04.733 回答
1

是的,有时本地化并不完美。这是 v8 中的另一种策略,它在 v9 中仍然可以帮助您。

  • 首先,像描述的那样更新你的模块
  • 然后,从数据库中删除模块的所有翻译字符串。这是安全的,因为它们在 ru.po 文件中。
    • 转到设置 > 翻译 > 申请条款 > 翻译条款
    • 使用“模块”“包含”进行“高级搜索”以查找所有术语
    • 全部选择(可能将寻呼机设置为“无限制”)
    • 选择“更多”>“删除”
    • 确认
  • 再次更新您的模块。
  • 再次导出 ru.po 文件;它现在应该包含所有缺失的术语。

问题似乎是该模块有时会从默认(en)语言中获取一些值到目标语言中,然后禁止将该术语列为“待翻译”。

于 2015-11-06T20:02:16.277 回答