-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento 2.1.0 Js Translations Not Working #7525
Comments
I was facing a similar issue, can you share your .csv file |
Confirm this one on M2.2.0-dev too |
Same issue in version 2.1.2. I found workaround for lib/web/mage/validation.js to be translated over .csv Original Edit: |
@JDavidVR @BeatDirector The translation system it's not working at all in JS. |
@grazianodimaio |
Hi, no, it doesn't work at all, even some files are very different from my Magento2 version. I have the 2.1.0 Version. There is a bugfix for 2.1.0 version ? |
Hello, For those who are not having any JS translations working - when js-translation.json file is generated Magento does not include translations from theme. Only translations from module locale files will be used, so do not use theme for translating strings. And remember to redeploy your static files: If your locale is not deployed, then deploy it directly by adding locale parameter i.e.: bin/magento setup:static-content:deploy sv_SE |
Rebasing our work on top of develop we can get this to work finally. The json file is now generated: @artis-ozolins setup-static step not necessary in developer mode once you clear pub/static and var/ directories. FYI, We use an app/i18n language pack so can't comment on theme level translates |
Is this because the JSON is then store in localStorage via mage translate for knockout as I get issues on Safari and cart - sometimes it appears and sometimes it does not |
i can confirm what @artis-ozolins wrote:
this is a major bug in the translation system! |
@slackerzz: this is being tracked here: #6563 And in M 2.1.3 they introduced a new bug, which generates the incorrect js-translation.json file when you deploy multiple locale's at the same time: #7862 |
I have the same Issue and tried But still not see all translated strings Any updates about that issue |
Guys, when you create a language package same official docs, you add 4 files: composer.json, language.hml, registration.php, xx_XX.csv.
Or you use other commands? |
It does not work, because "Translation" class is a singleton and during the static content deploy it loads translations or en_US for "blank" theme and once you have some translations in your custom theme for the same "en_US" locale (example: "Add To Cart" => "Add To Bag"), which goes After "blank" in compiling queue, then Magento will not load your translations, because all translations from "blank" theme for "en_US" have been already loaded. This issue appears not only in static-content-deply, but also in emails, when "emulation" methods are running. Possible solution is: to re-load reanslations, when "setDesignTheme" method is called (just to override it and add some code :) ). It is like a workaround. |
hello @grazianodimaio , thank you for the report, the ticket is created MAGETWO-66898. |
How is this coming along? Can we have an update? |
Still not working in EE 2.1.16 |
Experiencing the same issue on CE 2.1.7. Can anybody provide a workaround for that issue? EDIT (24.07.2017): When executing the command So instead of using: use |
Found out that my translations problems were when I deploy files. with this :php bin/magento setup:static-content:deploy php bin/magento setup:static-content:deploy -l en_US -l fr_FR php bin/magento setup:static-content:deploy -l fr_FR So final solution for me was to launch these line in a upgrade.sh file at the root of magento :
|
Internal ticket to track issue progress: MAGETWO-72250 |
More problems: I tried to change the translation for form contact, but it does not work. Tried everything. |
Any updates on this? We have 15 stores and we have to deploy store by store. Our deployment takes 20 minutes instead of 5 minutes because of this bug... Is this fixed in 2.2.0? |
Hi @grazianodimaio the issue has been fixed in 2.1.10 and will be available soon |
Is 2.1.10 available? |
Hi! I try to add this translation (es_ES): In /MAGENTO_INSTALL_PATH/app/design/frontend/vendor/theme_name/i18n/es_ES.csv and then exceute this: php -f bin/magento cache:flush But it doesn't work. Any idea? |
@magento-engcom-team , seem that issue still in magento 2.2 version. Is this issue resolved at 2.2 or not? Thanks Amit Bera |
Still not working in EE 2.1.16 I suggest resorting to a JSON fix and manually updating. KnockoutJS and localstorage and known for being unreliable and notoriously slow.. so even adding this in translations json is not a guarantee it will appear |
All the JS error messages not translated
Preconditions
Steps to reproduce
Expected result
Actual result
This is a great problem because every js-generated message is not translated.
The text was updated successfully, but these errors were encountered: