odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
37.39k stars 24.31k forks source link

[10, 11, 12] Studio/Framework: no translation terms generated #29937

Closed Yenthe666 closed 5 years ago

Yenthe666 commented 5 years ago

Impacted versions: 10.0, 11.0, 12.0

Steps to reproduce:

  1. Go to the latest runbot (in my example V11 to demo)
  2. Install a second language, for example Dutch
  3. Go to Sales > Orders > Quotations, open studio and create a new tab with a very distinct string. For example "EasyToFindString"
  4. Try to find a source term or translation for it in the translations.

Example video: https://drive.google.com/file/d/1S9UfPosM2b2mW1P8PTSuomJjw3to8Z_Q/view

Current behavior: There are no source or translation terms generated from new items created with Odoo Studio.

Expected behavior: Automatically generated source term from which you can create translations for other languages.

Video/Screenshot link (optional):

Yenthe666 commented 5 years ago

I've did some further digging and it is actually quite interesting. You can get those terms generated. Start developer mode, open the sale order form view, go to inherited views, open the studio view that is automatically generated and click on "Edit translations" there. Now the new terms will be generated into the system. Video: Translations issues framework

This report has actually two bugs: 1) Source terms are not automatically generated (with Studio), only after editing the new view and manually clicking on "Edit Translations" 2) Not all terms are shown when using the technical feature "Technical Translation" to show translations, for example tabs their strings are not shown.

Yenthe666 commented 5 years ago

OPW 1922570

Yenthe666 commented 5 years ago

To go even further: It it not only related to Odoo studio in fact. You can reproduce it without using Studio. Steps:

  1. Go to Sales > Orders > Quotations, open the form view and activate developer mode
  2. Click on "Edit form view", go to the "Inherited views" tab and create a new view which creates a new tab into this form.
  3. Save the new view, go to the search terms and try to find the string of the newly created tab, you can't find it. Now do the same steps as above: "open the sale order form view, go to inherited views, open the studio view that is automatically generated and click on "Edit translations" there. Now the new terms will be generated into the system."
  4. Search for the terms again and you'll find them. Video: Translation issues framework
Yenthe666 commented 5 years ago

I also think that by default new generated terms should get the state "To translate" and shouldn't stay empty, as those results show up barely anywhere. It feels counterproductive.

mgeubelle commented 5 years ago

According to the @nle-odoo 's answer from opw-1922570:

The 3 methods to adds missing terms for views:

All require user input (clicking on the button), because by default we don't want to overload the user/database with empty translation that he may never have the need for.

In an unrelated previous fix, we had to choose between creating empty translation when installing a language or not, and the point of not creating empty translation was also chosen then: https://github.com/odoo/odoo/pull/28297#issuecomment-434619282

Yenthe666 commented 5 years ago

Hi,

Right, sorry I forgot to close this. After the explanation about the overload on the database it made sense. Thanks for the followup!

mgeubelle commented 5 years ago

You are welcome. I was just taking a look for Studio related opened issues.

Regards.