Skip to content
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 translate issue #13629

Merged
merged 1 commit into from Apr 5, 2018

Conversation

@Corefix
Copy link
Contributor

commented Feb 13, 2018

Fixes issue where translations are not allowed to be reset by a theme or db change to the original english text.

Description

In Magento you have the ability to change translations in many ways, traditionally it would be through that the system prioritises translations as follows:

  • The modules own translations
  • Translate packs translations
  • Theme translations
  • Database (inline translations)

However if you have a translate pack translating a word, and you as a merchant or developer want to change it back in the theme or database translations, currently you can't because the _addData method currently validates if the original text and translation are the same.

http://devbox.vaimo.test/ncg/pub/static/version1518511176/frontend/Vaimo/ncg/sv_SE/js-translation.js...

Manual testing scenarios

  1. Setup a store with a translate pack including a word used for translation in a JS file, as an example you can use "Close", which in your language pack should be set to something else.
  2. Setup a new theme with the language you picked and translate the text used in JS file. And set it to be the original value of this. So you set "Close":"Close"
  3. Download the FE translate file js-translation.js from your theme using a URL like: pub/static/Version/frontend/Vendor/Theme/Locale/js-translation.js
  4. You should now see that the value: "Close" is set to the language packs value, and not missing as you would expect so the string can go back to its default value.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
Fix translate issue
Fixes issue where translations are not allowed to be reset by a theme or db change to the original english text.
@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2018

@Corefix thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team magento-engcom-team merged commit db1715f into magento:2.2-develop Apr 5, 2018

3 checks passed

Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
magento-engcom-team pushed a commit that referenced this pull request Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.