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] base: correct translation synchronisation #30114

Closed
wants to merge 1 commit into
base: 12.0
from

Conversation

Projects
None yet
5 participants
@KangOl
Copy link
Contributor

KangOl commented Jan 10, 2019

Avoid matching terms that will be discarded when synchronising
translations.

@KangOl KangOl requested review from mart-e and rco-odoo Jan 10, 2019

@robodoo robodoo added the seen 🙂 label Jan 10, 2019

@robodoo robodoo added the CI 🤖 label Jan 10, 2019

@C3POdoo C3POdoo added the RD label Jan 10, 2019

@rco-odoo
Copy link
Member

rco-odoo left a comment

I have another proposal: simply do not discard translations where src == value.
That trick was a premature optimization to avoid dummy translations.

In your case, the first translation ('Subtotal', 'Subtotal') is not discarded, and added in done instead. Then the second translation ('Subtotal:', 'Sub total:') cannot be remapped to the source term 'Subtotal', because that source term already has a translation in done; it is discarded instead.

Wouldn't it be cleaner?

@rco-odoo

This comment has been minimized.

Copy link
Member

rco-odoo commented Jan 10, 2019

If you want to stil discard dummy translations, simply add them in done.
That way, translations of other terms will never be remapped to sources of dummy translations.

@robodoo robodoo removed the CI 🤖 label Jan 10, 2019

@KangOl

This comment has been minimized.

Copy link
Contributor

KangOl commented Jan 10, 2019

You're right. considering the translation as done is better.

@robodoo robodoo added the CI 🤖 label Jan 10, 2019

[FIX] base: correct translation synchronisation
Avoid matching terms that will be discarded when synchronising
translations.

opw-1921639
opw-1923669
opw-1921933
opw-1921509
opw-1919989
opw-1917321
opw-1916782
opw-1915683
opw-1900821
opw-1891187

@KangOl KangOl force-pushed the odoo-dev:12.0-translations-sync-chs branch from ff7427c to 9ccbf5f Jan 11, 2019

@robodoo robodoo removed the CI 🤖 label Jan 11, 2019

@KangOl

This comment has been minimized.

Copy link
Contributor

KangOl commented Jan 11, 2019

robodoo pushed a commit that referenced this pull request Jan 11, 2019

[FIX] base: correct translation synchronisation
Avoid matching terms that will be discarded when synchronising
translations.

opw-1921639
opw-1923669
opw-1921933
opw-1921509
opw-1919989
opw-1917321
opw-1916782
opw-1915683
opw-1900821
opw-1891187

closes #30114
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Jan 11, 2019

Merged, thanks!

@robodoo robodoo closed this Jan 11, 2019

@KangOl KangOl deleted the odoo-dev:12.0-translations-sync-chs branch Jan 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment