2

After reading the complete translation documentation (here), I still have some questions / problems. The end goal is to create translations for my magento2 installation.

I run the following command to create a translation dictionary:

php bin/magento i18n:collect-phrases -o "translations.csv" -m c:\xampp\htdocs\magento2\

Where magento2 is the root path of my magento installation. Please note the -m that is required to build a translation pack. If I ommit this parameter, the generated output is 400kb+ (but it contains only 2 columns). If I add the parameter, I only get a 4kb file (it contains the correct 3 columns format). Am I missing something here?

Pastebin (with -m): http://pastebin.com/ssCMaKGw

Pastebin (without -m): http://pastebin.com/cfJGT2tS

Then for a theme translation, I can ommit the -m parameter and after I made the translations for the default luma theme, it's not replacing anything. I've changed my locale in administration to the correct one and also flush cache, rebuilt indexes.

php bin/magento i18n:collect-phrases -o "app/design/frontend/Magento/luma/i18n/nl_NL.csv" app/design/frontend/Magento/luma

  • How many rows do you have in each file? With -m and without? – Maddy Dec 23 '15 at 16:09
  • 6761 without -m, 29 with -m. I'll add some pastebins to the question. – emp Dec 23 '15 at 16:15
  • We just merged a fix related to this tool, please check it. Also, behavior or -m flag has been modified. Please stand by for doc changes related to that. – Maddy Dec 23 '15 at 22:47
  • I will try it out tomorrow and keep you up to date. Thanks for looking into it. – emp Dec 24 '15 at 12:47
  • The updated command is available on the develop branch. The change was to redefine -m as searching the Magento codebase. The optional pack parameter was removed also. – Steve Johnson Dec 24 '15 at 14:15
2

I can confirm the -m command is working now with the updates that were committed on the development branch. Thanks for this @steve-johnson & @maddy.

Generated a 762Kb file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.