odoo / odoo

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

It's like trying to teach a cat to speak French – translating terms here is just not happening! #115876

Open TadeuszKarpinski opened 1 year ago

TadeuszKarpinski commented 1 year ago

Impacted versions: 16.0 Steps to reproduce: Export sale_subscription csv, translate terms, import Current behavior: Terms aren't translated Expected behavior: Terms are translated Video/Screenshot link (optional):

Support ticket number submitted via odoo.com/help (optional):

HydrionBurst commented 1 year ago

Could you provide a video for it? At least which translation for which record(record's model name, record external id) you are going to translate

There may be several reasons. Could you export it as po file to check if it is a code translation (has code:)

#. module: web
#. odoo-javascript
#: code:addons/web/static/src/core/domain_selector/domain_selector_root_node.xml:0
#: code:addons/web/static/src/legacy/xml/base.xml:0
#, python-format
msgid "# Code editor"
msgstr ""

or

#. module: sale
#. odoo-python
#: code:addons/sale/models/sale_order_line.py:0
#, python-format
msgid "%(line_description)s (Canceled)"
msgstr ""
Ranamiu commented 1 year ago

Hi dears,

UPDATED image an text (apologies).

This bug keeps unsolved, please check "code" translations for "XML" and "JS" files:

Kindly find here attached screenshot.

Impacted version:

Steps to reproduce:

  1. Settings > Translations > Export a translation for a single or all modules.
  2. Donwload a .PO (same on CSV) and open using POEDIT or just a simple TXT editor (does not matter).
  3. Modify any translations line marked as "code" and addressing a JS file.
  4. Import .PO file once modified locally and saved.

Current behavior:

Expected behavior:

16-translation-2

HydrionBurst commented 1 year ago

in Odoo 16, code translations can be exported but are not expected to be customized/imported.

Reason: code translations can be treated as part of code, which are shared to all registries/databases you can only change it in the po file in the code directory like changing the source code for all registries/databases

Ranamiu commented 1 year ago

Hi @HydrionBurst,

Apprecciate your reply !

That seems to me a big flow on Odoo 16 !!

Never had this issue on older Odoo (Odoo15, 14, etc.),

Logic should be the same as per XML file and JS file.

Why JS "code" file are being fixed and XML "code" files not?

Thank you

HydrionBurst commented 1 year ago

I don't think the js is 'fixed', are you sure you can change it by importing a po file?

HydrionBurst commented 1 year ago

AAAA Dentro is used to translate model_terms:ir.ui.view,arch_db:website.snippet_options and model_terms:ir.ui.view,arch_db:website_blog.dynamic_filter_template_blog_post_card but not code:addons/web/static/src/view/fields/remaining_days/remaining_days_field.xml:0

You can see the diff because you check the view for model_terms:ir.ui.view,arch_db:website.snippet_options and model_terms:ir.ui.view,arch_db:website_blog.dynamic_filter_template_blog_post_card but not the result for code:addons/web/static/src/view/fields/remaining_days/remaining_days_field.xml:0

Ranamiu commented 1 year ago

Yes, you are right @HydrionBurst

Apologies.

On the contrary:

XML file are being translated and JS files not.

Never had this issue on older Odoo (15, 14, 13, etc.)

Odoo 16 is just so well made that translations flow seems to me a great disappointment.

How manage internationalization ??

Impossible, a big bug here

We have lots of complains here coming from end users.

Cannot use Odoo 16 this way, impossible.

HydrionBurst commented 1 year ago

Currently, for saas users, they can only propose translations from Transifex, and wait for the weekly updates of the po files.

Also I am planing to make the code translation hack/customization possible as a POC, but it can only be available for the master branch in the future @bouvyd since many customers complain about this what do you think about the feature?

Yenthe666 commented 1 year ago

Currently, for saas users, they can only propose translations from Transifex, and wait for the weekly updates of the po files.

Which is a fine sample of why this does not work. What if I have a Dutch customer that wants custom wording for some terms that are not used by the public? I cannot do this in Transifex as the whole world will get these 'weird' terms which are sector specific. In previous versions, up to V15, you could simply go to Translated Terms and modify them for one specific database. Now you cannot anymore and even exporting a .po file, modifying terms & reimporting them does not solve this.

Also I am planing to make the code translation hack/customization possible, but it can only be available for the master branch in the future @bouvyd since many customers complain about this what do you think about the feature?

It has really made things more complex and less user friendly. In the past customers could easily do it, they'd get it, all a breeze. Now? It is hard to explain to customers why it has gotten so complex and costs us so much time/challenges.

Yenthe666 commented 1 year ago

Translations were refactored by @fpodoo There is no need to "fix" it, because it is perfect from the beginning.

Lol, nice cocky response. If you would read back and would go through Odoo it's official tickets you will notice it does not. It works perfect technically if you do not want to modify/translate controller terms and if you assume everybody is a tech engineer who knows how to work with custom modules. Do tell me how you want a functional person to manage translations now.

Ranamiu commented 1 year ago

Hi @TadeuszKarpinski,

Greetings !

Kindly, might you please explain exactly which criterias do you consider in order to state:

"There is no need to "fix" it, because it is perfect from the beginning."

As shown and explained here #124124, not even all "code" translations are working fine: some do works others no. No any logic pattern there.

Might you please detail which criterias justify issues indicated in #124124 ?

Moreover, kindly, let me please know how could we consider "perfect" a user interface that let you download a file containing a translations not being modified once uploaded back.

Which standards do you consider "perfect" along a flow where a user downloads any translation and, back to upload, some terms are translated and others no?

Last but not least: how do we manage a multi-database ecosystem where translations "code" are crucial towards end-users experience depending on business segment?

Appreciate your attention

BT-jmontero commented 1 year ago

Translations of type "code" are being ignored on purpose, but I don't understand why.

https://github.com/odoo/odoo/blob/3a9b6ed6ec4fdf6131dc90f9a8502dffd8cfaa9e/odoo/tools/translate.py#L1269

Any intention to have it fixed? Right now translations coming from PY files cannot be customized because the logic in behind ignores such "rows" from the PO files.

Yenthe666 commented 1 year ago

Yeah I really don't get why this was done :) It prevents translating buttons in emails etc now too.

BT-jmontero commented 1 year ago

Just FYI, I have added some comments in this open issue:

https://github.com/odoo/odoo/issues/125524

MatissJekabsons commented 9 months ago

Yeah I really don't get why this was done :) It prevents translating buttons in emails etc now too.

And as we see... it's still the same. We are now creating in-house workaround as this "solution" is not usable in real world.... :/

kamilzmija commented 8 months ago

Issue still exits in Odoo 17, code translations are loaded only from the module in which the code is implemented, so there are 2 solutions - add translation in orginal module (stupid), inherit and overwrite code so "_tl" will be executed in our module (even more sdtupid).

Code below clearly explains it obraz

Yenthe666 commented 8 months ago

No idea who thought this was a good idea. It made it harder, less intuitive and absolutely less user friendly. I really feel like we took two steps back 😞

Ranamiu commented 7 months ago

Cannot believe ... this issue is still there, even on 17.

Still back to "Middle Ages" as far as translations, how could it be ??

Do not understand 😞😞

Velk commented 7 months ago

Same issue here, on Odoo.SH with Odoo v17, I'm making a website on Odoo for some important customers :

Is there a way to make this thing work and have a fully translated website ? I can't give them a half translated website, this is not really serious.

matteoopenf commented 6 months ago

I have a similiar problem in odoo 14, i'm not able to translate the text in js file

Yenthe666 commented 6 months ago

I have a similiar problem in odoo 14, i'm not able to translate the text in js file

That will be another issue :) In V14 all translation menu's where still there. This is probably a case where the term in the JavaScript is not marked as exportable.

matteoopenf commented 6 months ago

I have a similiar problem in odoo 14, i'm not able to translate the text in js file

That will be another issue :) In V14 all translation menu's where still there. This is probably a case where the term in the JavaScript is not marked as exportable.

ok

marcelogpereira commented 5 months ago

Do you have any alternative to be able to translate in the frontend? this solution Can be good for translations inside char and text fields, but cant understand how this solution is better than the older one... The users just lost their freedom to translate their odoo by them selfs... What was the idea, and whos the master mind behind this solution?

Foosec commented 5 months ago

We just hit this brick wall of translations as well, how is this a thing?

gergoedu commented 4 months ago

Our website is full of missing translations, and I can't seem to find any solution so far besides what kamilzmija said. ("add translation in orginal module (stupid), inherit and overwrite code so "_tl" will be executed in our module (even more sdtupid)"?). Is it really the only way to get this major problem sorted?

clxadmin commented 3 months ago

Any news for this Universal BUG ? I really want to meet these people who are responsible for this super adaptation

clxadmin commented 3 months ago

Yeah I really don't get why this was done :) It prevents translating buttons in emails etc now too.

And as we see... it's still the same. We are now creating in-house workaround as this "solution" is not usable in real world.... :/

What kind of inhouse workaround are you using? This information might be interesting for us as well :-)

xcenab commented 3 months ago

The translations in odoo is not doing it for us, it's impossible to customize and keep clean with a steady inflow of code breaking transifex code translations that break the user experience. And we can't even make a quick fix or translate custom strings.

TadeuszKarpinski commented 3 months ago

What kind of inhouse workaround are you using?

The best workaround is to not use odoo

biggboss83 commented 3 months ago

What kind of inhouse workaround are you using? This information might be interesting for us as well :-)

I suspect you could create a new sublanguage for customized translation terms or add an i18_extra folder which will override the standard translation. It doesn't solve the import issue as it still only usable by updating the code but you could have specialized translations that overwrite the standard ones.

Foosec commented 3 months ago

Any news for this Universal BUG ? I really want to meet these people who are responsible for this super adaptation

Its not really a bug, its likely a performance decision. My guess is the old way of doing it was pretty intensive for clients with hundreds or thousands of users.

Could be made togglable? I don't know, but we've coded our own way of handling translations to facilitate customer needs now

jmutsaerts commented 3 months ago

@oomsveta @HydrionBurst

To prevent this question around translation imports from coming back again and again, I propose to add a user feedback when the user executes the import via

https://github.com/odoo/odoo/blob/17.0/odoo/addons/base/wizard/base_import_language.py

For example, a response could look like this:

100 translations imported on 3 modules: module 1 module 2 module 3

40 code translations skipped (code is translated by odoo through transifex) in 2 modules: module 1 module 2

50 translations where skipped because they were empty in one module: module 3

I think, a user feedback after executing a language file would be helpful and would prevent questions about translations.

Thank you for your great work! Cheers, Joep

mcassuto commented 1 month ago

Same issue here, customer wants business-related translation of some python string (ie the eCommerce) steps. Unable to do it through the UI, must use python code to override !