Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are some items not translated in Odoo?

I have a problem with translations in Project module. Some menu items are not translated. What could be the problem?

enter image description here

Here 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"/>

Here 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 "Проект"
like image 878
Danila Ganchar Avatar asked Nov 02 '15 10:11

Danila Ganchar


3 Answers

I've also had this problem with translations. I had updated module base a lot of times too and it worked, but sometimes it wasn't necessary. What I did is the next process:

  • Go to Settings > Translations > Load a Translation, select your language and check the box Overwrite Existing Terms, then click on Load button.

  • After that, press F5 to refresh the browser, then go to Settings > Translations > Application Terms > Synchronize Terms, select your language and click on Update. Then press again F5 to see if your terms have been updated.

Regards.

like image 157
forvas Avatar answered Sep 21 '22 08:09

forvas


Sometimes translations don't work very well. Try pressing the "Update" button in the "Base" module. This should solve the problem.

Update: 21 nov 2019

I do not know in older versions, but now there are more options in command line to update, import and export translations. The argument --i18n-overwrite might be useful in your case:

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
like image 39
ChesuCR Avatar answered Sep 17 '22 08:09

ChesuCR


Sometimes, is not enough to update the base module. I implemented a solution based on a post. What I do is clear the whole language using a query, and then reload the language again using. "Load a Translation" from config menu.

The query that made it possible, is the following, for example for es_CL:

DELETE FROM ir_translation WHERE lang = 'es_CL';

I've put this in a module, which you can use to adapt it to your needs:

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

When this module is instaled it runs the query. Then you can reload your language using the menu.

like image 45
Daniel Blanco Avatar answered Sep 21 '22 08:09

Daniel Blanco