Community mailing list archives

community@mail.odoo.com

Re: override en_US terms

by
Quentin THEURET
- 03/02/2016 15:39:50
Le 02/03/2016 10:47, Alexandre Fayolle a écrit :
> I think using the "C" locale as reference would allow overriding the
> en_US translation possible using the same process as the one used to
> override the translations of other languages, and fix for instance
> https://github.com/odoo/odoo/issues/4246
>
> The current situation if I understand correctly is that if you change
> the en_US translation, you change the source string for all
> translations, which needs special casing. OTOH, if the reference string
> is the "C" locale, changing the en_US translation is exactly the same as
> changing the fr_BE translation. I think the whole code would be simpler
> and with fewer corner case issues.
>
Thanks Alexandre, I now understand well your remark.

I made a quick test on a v8. I created a file en_US.po in the i18n 
folder of 'mail' addons. This PO file is attached to this e-mail.
Then, I updated the translation on my DB with the 'Load a translation' 
wizard, then choose 'English (US)' as language and check the box 
'Overwrite Existing Terms'.
After translation update, the message on my Inbox is well replaced by 
"Test translation" as defined in the en_US.po file.
On my DB, if I run the following SQL request, the source is not changed 
: SELECT src FROM ir_translation WHERE lang = 'en_US' AND value = 
'Test translation';
Then, to complete my test, I go back to French for my interface, and the 
message in my Inbox is well displayed in French.

So, I think you can override the translation terms just by adding a 
en_US.po file in your modules but this don't work by using UI for object 
translatable fields as described in the issue you targeted.

Regards,

-- 
Quentin THEURET
https://twitter.com/kerpeo
https://twitter.com/qtheuret