-
Notifications
You must be signed in to change notification settings - Fork 26k
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
[FIX] core: update attributes of non-text items #192096
Conversation
I tested it locally and it passes the test in 463136f |
fe1a675
to
9f63b96
Compare
before upgrade there was a term when write with new value during upgrade In the new value So, the old translation As a result I propose something like PR: #193229 as a fix which will revert an old fix by you |
Well if we can disable the whole feature then that's great. The whole point of previous patches (and this one) was to not disable it. But given how many issues this has proved to cause I'm OK with disabling it. That being said, I'm not sure what new issues this could cause to existing custom translations that are now kind of reused but that won't be any more. I cannot produce a clear example but I bet there would be some in upgrades. |
We cannot skip the update always. It is only safe to do so when the element is text, in other cases we still need to update the attributes to avoid upgrade issues. For example, this term https://github.com/odoo/odoo/blame/03434f42d2b1d96d2cf8315154f16f9fa01c1ae3/addons/account/i18n/fr.po#L1129 which at the time of this patch has no translation yet, won't be updated even if we add the right translation ``` msgid "" "<span invisible=\"name or name_placeholder or quick_edit_mode\">Draft</span>" msgstr "" "<span invisible=\"name or name_placeholder or quick_edit_mode\">Brouillon</span>" ``` The reason is that the check ```py if closest_term in translation_dictionary: continue ``` would skip the update. Here we propose to restrict the skip only to text elements. This issue is affecting many upgrdes to 18.0. opw-4440528
9f63b96
to
9275cb8
Compare
move to #193708 |
We cannot skip the update always. It is only safe to do so when the
element is text, in other cases we still need to update the attributes
to avoid upgrade issues.
For example, this term
https://github.com/odoo/odoo/blame/03434f42d2b1d96d2cf8315154f16f9fa01c1ae3/addons/account/i18n/fr.po#L1129
which at the time of this patch has no translation yet, won't be updated
even if we add the right translation
The reason is that the check
would skip the update. Here we propose to restrict the skip only to text
elements.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr