-
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: disable typofix translations when upgrade #193708
base: saas-18.1
Are you sure you want to change the base?
[FIX] core: disable typofix translations when upgrade #193708
Conversation
Note: |
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.
For extra context: during the upgrade we get issues if some translated terms are not updated properly. Common ones are missing attributes (invisible, class, ...) or wrong structure (xpath targeting a span element that was not added). These are source of many tickets in upgrade. A recent one is opw-4440528 but many similar issues happen that either show wrong structure, or completely fail the view.
IMO if we can get rid of this system during upgrades and we observe no extra impact for custom translations (in terms of post upgrade tickets) then this solution would be effective in getting rid of a whole category of issues.
a2f366b
to
40a2fc6
Compare
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
Before: The typofix feature treats terms in the old and new values with similar text content as the same term, migrating the translations of the old term to the new term. For example The old value has the mapping: 'Draft': 'Brouillon' The new value contains the term: '<span invisible="name or name_placeholder or quick_edit_mode">Draft</span>' Since the old term and the new has the same text content 'Draft', after write, the new term will reuse the old translation of 'Draft'. However, the translation 'Brouillon' is always visible unlike its en_US term Since the old term and the new term share the same text content, 'Draft', after `write`, the new term reuses the old translation of 'Draft'. However, the translation 'Brouillon' is always visible, unlike its en_US counterpart. This behavior is acceptable in non-upgrade mode because the user writes the en_US value and is responsible for verifying translations afterward. However, it is problematic during upgrades because users cannot easily identify which records have changed and need to be rechecked. After: 1. Revert 7cd56fc as it is no longer needed. 2. Disable typofix translations during upgrades.
40a2fc6
to
162fead
Compare
[FIX] core: disable typofix translations when upgrade
Before:
The typofix feature treats terms in the old and new values with similar text
content as the same term, migrating the translations of the old term to the new
term.
For example
The old value has the mapping:
'Draft': 'Brouillon'
The new value contains the term:
'<span invisible="name or name_placeholder or quick_edit_mode">Draft</span>'
Since the old term and the new has the same text content
'Draft'
, after write,the new term will reuse the old translation of
'Draft'
. However, the translation'Brouillon'
is always visible unlike its en_US termSince the old term and the new term share the same text content,
'Draft'
, afterwrite
, the new term reuses the old translation of'Draft'
. However, thetranslation
'Brouillon'
is always visible, unlike its en_US counterpart.This behavior is acceptable in non-upgrade mode because the user writes the
en_US value and is responsible for verifying translations afterward. However, it
is problematic during upgrades because users cannot easily identify which
records have changed and need to be rechecked.
After:
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr