Skip to content

Issue 11175: fix i18n:collect-phrases so it also collects "translate args" #13470

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

Closed

Conversation

PascalBrouwers
Copy link
Contributor

Description

See issue #11175
fix i18n:collect-phrases so it also collects <translate args="'Items in Cart'"/>

Fixed Issues (if relevant)

  1. i18n:collect-phrases -m can't find many important magento phrases  #11175: i18n:collect-phrases -m can't find many important magento phrases

Manual testing scenarios

  1. run php bin/magento i18n:collect-phrases app/code/Magento/Checkout | grep "Items in Cart"
    Or when magento is in the vendor folder: php bin/magento i18n:collect-phrases vendor/magento/module-checkout | grep "Item in Cart"
  2. It should return a line with: "Items in Cart","Items in Cart"

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)

*/
const HTML_FILTER = "/i18n:\s?'(?<value>[^'\\\\]*(?:\\\\.[^'\\\\]*)*)'/i";
const HTML_FILTER = "/i18n:\s?'(?<value_i18n>[^'\\\\]*(?:\\\\.[^'\\\\]*)*)|translate args=\"'(?<value_translate_args>[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)'\"/i";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better deprecate this constant and add the new array with regular expressions for different cases with translation match. This approach will make the translations collecting process more clear.

@sidolov
Copy link
Contributor

sidolov commented Jun 5, 2018

@PascalBrouwers , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for collaboration!

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

Successfully merging this pull request may close these issues.

3 participants