-
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
Fix JS translation search #10445
Fix JS translation search #10445
Conversation
This enables support for $.mage.__("concatenating" + "strings");
…gative lookbehind
@ajpevers Would that still variables provided to the translation function? Would you like to implement some tests to verify these cases and keep those functional in the future? |
[EngCom] Public Pull Requests - MAGETWO-71659: Fix for url_rewrite on page delete via api #10568 - MAGETWO-71617: Fixes Regression in 2.2 - menu.xml config ignored #10543 - MAGETWO-71380: Fix JS translation search #10445 - MAGETWO-71201: Improved calculating version hash for the js-translation.json file. #10378
I get an error on the core file i18n.js before and after this is merged, see the following - |
@maaarghk Good point. How on earth are we going to find out which strings will go into the |
@ajpevers @maaarghk I assume we have to find a solution to this case or revert the original fix. Do you have any ideas? |
@maaarghk If I read your comment right, the error happens before, as well as after this commit. So this PR has nothing to do with it, right? @ishakhsuvarov As for finding JS translations in Javascript files using PHP, the way we currently look for translatable strings is not very robust. It only takes literal strings into account and the regular expressions used were (are?) not covering all instances of literal strings. Apart from that, inline translations or any translation that is saved in the In my opinion the only real solution is to revise the way |
Fixed issues: - MAGETWO-71552: Attribute values on store view level not searchable - for 2.2 - MAGETWO-72866: Redundant indexers invalidation - RIATCS-340 - MAGETWO-75458: [Backport] - Fix overwrite default value image/file with NULL #10253 - for 2.2 - MAGETWO-75460: [Backport] - LowestPriceOptionsProvider returns products without attributes which are used for price calculation (e.g. tax adjustment) - MAGETWO-80193: [2.2.x] - Add cast to string for CUST_GROUP_ALL #10475 - MAGETWO-80204: [2.2.x] - Grammar fix for #9533 #10627 - MAGETWO-71549: Impossible to export Advanced Prices on a medium profile - MAGETWO-80198: [2.2.x] - Fix issue #10565 #10575 - MAGETWO-80197: [2.2.x] - Fix JS translation search #10445 - MAGETWO-80195: [2.2.x] - Send different base currency in Google analytics #10508
Description
jQuery.mage.__('translate me')
as well as$.mage.__('translate me')
$.mage.__('Don\'t break on escape characters before \' or "')
$.mage.__('Concatenating strings' + 'within a tranlation' + 'function')
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist