-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0][MIG] mail_debrand #168
Conversation
|
||
* This module relies on the translation of the strings here in this module that | ||
must match the mail notification template translation on Odoo core, | ||
specifically the words "using" and "Odoo". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that it would be better to have these as System parameters - at least the Odoo word.
I worry the the words will creep in again in case an email is generated for a language we didn't edit the corresponding translation,.
Are you sure the translation trick also works for base english?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it can't be a parameter, as you can translate your template to any installed language, and each one should have this translated to the correct words.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still worry about the case where no translation string is provided. Can't we use a parameter string in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the parameter string. If no translation is found, the used terms are "using" and "Odoo". If you want to care about the translation, just synchronize translations in your Odoo instance, and translate the corresponding term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no translation is found, the used terms are "using" and "Odoo"
That's exactly my problem...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But plain English works as is...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let me try to make you understand:
- With English language (with no translations), the matched expression that is removed is
using...<a lot of characters between>...Odoo
(not the isolated words). - If you translate "using" and "Odoo" words to your language in both places: this module and mail template. For example, in Spanish, the matched expression will be
usando...Odoo
. - If the mail template is translated, but not this module, you just need to go to the translation and translate the words.
- If none is translated, it will be correctly replaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think I get it now: the RE is supposed to remove the the "using Odoo" words in a translation-resistant way.
Sorry for all the trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, no problem. Take also into account that you can send mails in a lot of languages inside same Odoo instance (if your customer is English, French, Portuguese...), so you need a translation mechanism, not a static parameter, for replacing this in all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Question about the translation approach)
@dreispt please check code that is a regexp expression, so no possible to be confused. |
Travis error is not coming from my module and it's supposed to not fail (it's in mail_tracking). Maybe something has changed on the way Travis parses the errors? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on runbot in base language and in Spanish
There's no commits preservation, as the module doesn't serve as is on v9.
0a53406
to
7a3840d
Compare
@dreispt can you please give your blessing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There's no commits preservation, as the module doesn't serve as is on v9.
cc @Tecnativa