- Mailing Lists
- Contributors
- Translations and UI
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
A methodology / best practice / Odoo / Python question
[Communication Strategy] Thank you for your time!
Translations and UI
Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following :
force context to lang = en_US and do not translate in French
(leave terms untranslated) so that it will use source terms for
French. Then activate en_GB and de_DE for translating french
source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
![]() |
Rémi CAZENAVE ------ SCOP LE FILAMENT |
by Rémi Cazenave - 10:21 - 7 Sep 2021
Follow-Ups
-
Re: Translations and UI
Thanks Moises,
I have proposed PR here : https://github.com/OCA/server-backend/pull/132
Best Regards,

Rémi CAZENAVE
------
SCOP LE FILAMENT
06.87.23.26.04
remi@le-filament.comLe 08/09/2021 à 16:17, Moises Lopez a écrit :
Hi Rémi,
If you like contribute it in OCA umbrella you can do it in
Ping me in order to review it, please@moylop260
--
On Wed 8 Sep 2021 at 4:32 a.m. Rémi CAZENAVE - Le Filament <remi@le-filament.com> wrote:
Thank you Yann, Joerg and Tom for your proposals.
I have implemented a new module based on the proposal from Yann : https://sources.le-filament.com/lefilament/base_default_lang_translate
I added a boolean on res_lang in order to select your default language. Any update performed with this language would then :
- Update translation in this language (default behaviour)
- Update source terms for all translations with the new value
- Store new value in object table in database
I also have added a function to modify state of existing translations in case a source term is modified (state changes to to_translate).
Still need to work on scripts to bring database back to a proper state, cleaning all the mess coming from default Odoo behavior :)
Of course if you believe this could be useful for OCA, I can create a PR to move it under OCA umbrella.
Best Regards,

Rémi CAZENAVE
------
SCOP LE FILAMENT
06.87.23.26.04
remi@le-filament.comLe 07/09/2021 à 13:31, Yann Papouin a écrit :
This is an old PR from launchpad that I still use in production on odoo 12.0
With this patch, the current language is considered the database one (written to tables) and always override 'en_US', but it could be easily modified to only override when the current env.context lang is 'fr*', that way the source (database language) becomes "french".
It is better to have this patch running since the first launch but a simple script could be written to override "database" data with the french one.
--
Yann PAPOUIN, Ingénieur R&D | DEC
Le mar. 7 sept. 2021 à 10:22, Rémi CAZENAVE - Le Filament <remi@le-filament.com> a écrit :
Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following : force context to lang = en_US and do not translate in French (leave terms untranslated) so that it will use source terms for French. Then activate en_GB and de_DE for translating french source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
--

Rémi CAZENAVE
------
SCOP LE FILAMENT_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Moisés López CalderónMobile: (+521) 477-752-22-30Twitter: @moylop260Twitter: @vauxoo_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Rémi Cazenave - 01:56 - 13 Sep 2021 -
Re: Translations and UI
Hi Rémi,If you like contribute it in OCA umbrella you can do it inPing me in order to review it, please@moylop260--On Wed 8 Sep 2021 at 4:32 a.m. Rémi CAZENAVE - Le Filament <remi@le-filament.com> wrote:Thank you Yann, Joerg and Tom for your proposals.
I have implemented a new module based on the proposal from Yann : https://sources.le-filament.com/lefilament/base_default_lang_translate
I added a boolean on res_lang in order to select your default language. Any update performed with this language would then :
- Update translation in this language (default behaviour)
- Update source terms for all translations with the new value
- Store new value in object table in database
I also have added a function to modify state of existing translations in case a source term is modified (state changes to to_translate).
Still need to work on scripts to bring database back to a proper state, cleaning all the mess coming from default Odoo behavior :)
Of course if you believe this could be useful for OCA, I can create a PR to move it under OCA umbrella.
Best Regards,

Rémi CAZENAVE
------
SCOP LE FILAMENT
06.87.23.26.04
remi@le-filament.comLe 07/09/2021 à 13:31, Yann Papouin a écrit :
This is an old PR from launchpad that I still use in production on odoo 12.0
With this patch, the current language is considered the database one (written to tables) and always override 'en_US', but it could be easily modified to only override when the current env.context lang is 'fr*', that way the source (database language) becomes "french".
It is better to have this patch running since the first launch but a simple script could be written to override "database" data with the french one.
--
Yann PAPOUIN, Ingénieur R&D | DEC
Le mar. 7 sept. 2021 à 10:22, Rémi CAZENAVE - Le Filament <remi@le-filament.com> a écrit :
Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following : force context to lang = en_US and do not translate in French (leave terms untranslated) so that it will use source terms for French. Then activate en_GB and de_DE for translating french source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
--

Rémi CAZENAVE
------
SCOP LE FILAMENT_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Moisés López CalderónMobile: (+521) 477-752-22-30Twitter: @moylop260Twitter: @vauxoo
by Moisés López Calderón - 04:15 - 8 Sep 2021 -
Re: Translations and UI
Thank you Yann, Joerg and Tom for your proposals.
I have implemented a new module based on the proposal from Yann : https://sources.le-filament.com/lefilament/base_default_lang_translate
I added a boolean on res_lang in order to select your default language. Any update performed with this language would then :
- Update translation in this language (default behaviour)
- Update source terms for all translations with the new value
- Store new value in object table in database
I also have added a function to modify state of existing translations in case a source term is modified (state changes to to_translate).
Still need to work on scripts to bring database back to a proper state, cleaning all the mess coming from default Odoo behavior :)
Of course if you believe this could be useful for OCA, I can create a PR to move it under OCA umbrella.
Best Regards,

Rémi CAZENAVE
------
SCOP LE FILAMENT
06.87.23.26.04
remi@le-filament.comLe 07/09/2021 à 13:31, Yann Papouin a écrit :
This is an old PR from launchpad that I still use in production on odoo 12.0
With this patch, the current language is considered the database one (written to tables) and always override 'en_US', but it could be easily modified to only override when the current env.context lang is 'fr*', that way the source (database language) becomes "french".
It is better to have this patch running since the first launch but a simple script could be written to override "database" data with the french one.
--
Yann PAPOUIN, Ingénieur R&D | DEC
Le mar. 7 sept. 2021 à 10:22, Rémi CAZENAVE - Le Filament <remi@le-filament.com> a écrit :
Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following : force context to lang = en_US and do not translate in French (leave terms untranslated) so that it will use source terms for French. Then activate en_GB and de_DE for translating french source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
--

Rémi CAZENAVE
------
SCOP LE FILAMENT_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Rémi Cazenave - 11:31 - 8 Sep 2021 -
Re: Translations and UI
This is an old PR from launchpad that I still use in production on odoo 12.0With this patch, the current language is considered the database one (written to tables) and always override 'en_US', but it could be easily modified to only override when the current env.context lang is 'fr*', that way the source (database language) becomes "french".It is better to have this patch running since the first launch but a simple script could be written to override "database" data with the french one.--
Yann PAPOUIN, Ingénieur R&D | DECLe mar. 7 sept. 2021 à 10:22, Rémi CAZENAVE - Le Filament <remi@le-filament.com> a écrit :Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following : force context to lang = en_US and do not translate in French (leave terms untranslated) so that it will use source terms for French. Then activate en_GB and de_DE for translating french source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
--

Rémi CAZENAVE
------
SCOP LE FILAMENT_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Yann Papouin - 01:30 - 7 Sep 2021 -
Re: Translations and UI
My idea:
1. Write a one-time script that will replace all current source values for translated fields for records that are noupdate=1 or dont come from the database at all, with the French translation (gets rid of all the "copy names" and replace by something meaningful)
2. Add "en_GB" for English and dont use "en_US"
3. For any translated fields in future dont allow direct edit but force the user to use OCA "web_translate_dialog", which shows the source and all the translations in view so people will have to fill something meaningful always. We have made a module for this 'web_widget_enforce_translate', can opensource it when useful (wanted to, but didnt get the time to polish it)
On 9/7/21 10:22 AM, Rémi CAZENAVE - Le Filament wrote:
Dear all,
We are struggling with dealing with translations for one of our customers using mainly advanced surveys (with Odoo 12.0).
Basically, they design all their surveys in French + they use template surveys that they duplicate for new ones, changing titles and a few labels / questions inside.
Then they need to translate these surveys in English and German, since some of them are sent to non-French speaking companies.
Because Odoo considers that sources terms are en_US, we have everywhere names in source terms like "template (copy)", which is of course not the term they need to translate in English and German but the French terms are to be translated in these languages. Also names in survey tables are the original en_US ones (with (copy) inside) which means nothing to them...
I am not sure how to address this ? I have seen a number of issues on GitHub which are marked as normal behaviour and won't fix, but of course this does not help.
I have tried a few things, and my last idea is the following : force context to lang = en_US and do not translate in French (leave terms untranslated) so that it will use source terms for French. Then activate en_GB and de_DE for translating french source in these languages.
I have tried using context="{'lang': 'en_US'}" on translated fields in views but this does not seem to be taken into account, only context in action is but this use all fields in English then (meaning labels, group strings, etc.), which is not the intended purpose.
We will probably override write() actions to force lang in context.
I suppose many of you have already faced issues with translations, any idea, remark, link is welcome !
Best Regards,
--

Rémi CAZENAVE
------
SCOP LE FILAMENT_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Tom Blauwendraat - 12:51 - 7 Sep 2021