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

Command fails, language package command "magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY" #3560

Closed
karishmadaffodil opened this issue Feb 27, 2016 · 10 comments

Comments

@karishmadaffodil
Copy link

I want to create language package in Spanish for my multi-language website in english and spanish.I perform below steps.
Step 1 : I run below command for generating translation dictionary 👍
magento i18n:collect-phrases -o "/var/www/html/magento2/es_ES.csv" -m /var/www/html/magento2/

It runs successfully with the below message "Dictionary successfully processed" and generates "es_ES.csv" file in the magento root directory.

Step 2 : I run below command to create language package.
magento i18n:pack /var/www/html/magento2/es_ES.csv -d es_ES
It is giving "run time exception" with the message, Not enough arguments.
I also tried this command in different way like
magento i18n:pack /var/www/html/magento2/es_ES.csv es_ES
But run time exception comes again.

So, How can I generate language package in Spanish for my store in magento.What wrong I have done in second command or Any other solution please?

@mazhalai
Copy link
Contributor

mazhalai commented Mar 3, 2016

@karishmadaffodil which version of magento are you on? also how did you deploy?

If you used the latest git version, there has been some changes in how the i18n commands works.

On latest develop from git,
bin/magento i18n:collect-phrases -o "/var/www/html/magento2/es_ES.csv" -m (checks current folder)

The -d flag is in the wrong place. Please try
bin/magento i18n:pack -d /var/www/html/magento2/es_ES.csv es_ES

Reference

@mitul69
Copy link

mitul69 commented Mar 4, 2016

I have try with
bin/magento i18n:pack -d /var/www/html/magento2/es_ES.csv es_ES

it give me error "Not enough arguments."

@mazhalai
Copy link
Contributor

mazhalai commented Mar 4, 2016

@mitul69 did you try on the latest develop branch?

@karishmadaffodil
Copy link
Author

I am using Magento ver. 2.0.1 and it is giving me error "Not enough
arguments"

On Fri, Mar 4, 2016 at 9:18 PM, mazhalai notifications@github.com wrote:

@mitul69 https://github.com/mitul69 did you try on the latest develop
branch?


Reply to this email directly or view it on GitHub
#3560 (comment).

Thanks and regards
Karishma Sharma
(Daffodil Software Ltd)

@thomvanderboon
Copy link

There is a difference between the development branche and the 2.0.x branche

Try: php bin/magento i18n:pack --mode=replace -d /var/www/html/magento2/es_ES.csv . es_ES

The . is the only difference :)

@karishmadaffodil
Copy link
Author

Great. I run this command and it runs sucessfully with the message below :-

Successfully saved es_ES language package.
But I am not able to find out where the package gets saved?

On Tue, Mar 15, 2016 at 1:36 AM, thomvanderboon notifications@github.com
wrote:

There is a difference between the development branche and the 2.0.x branche

Try: php bin/magento i18n:pack --mode=replace -d
/var/www/html/magento2/es_ES.csv . es_ES


Reply to this email directly or view it on GitHub
#3560 (comment).

Thanks and regards
Karishma Sharma
(Daffodil Software Ltd)

@karishmadaffodil
Copy link
Author

ok actually I find out that in every module inside i18n package, the
translation file "es_ES.csv" is saved.
Like vendor/magento/module-catalog/i18n/es_ES.csv
But It contains the translation of lines in english rather than spanish and
when I switch to spanish store in frontend then also the page comes in
english language.

On Fri, Mar 18, 2016 at 10:53 AM, Karishma Sharma <
karishma.sharma@daffodilsw.com> wrote:

Great. I run this command and it runs sucessfully with the message below :-

Successfully saved es_ES language package.
But I am not able to find out where the package gets saved?

On Tue, Mar 15, 2016 at 1:36 AM, thomvanderboon notifications@github.com
wrote:

There is a difference between the development branche and the 2.0.x
branche

Try: php bin/magento i18n:pack --mode=replace -d
/var/www/html/magento2/es_ES.csv . es_ES


Reply to this email directly or view it on GitHub
#3560 (comment).

Thanks and regards
Karishma Sharma
(Daffodil Software Ltd)

Thanks and regards
Karishma Sharma
(Daffodil Software Ltd)

@thomvanderboon
Copy link

Step 1 : I run below command for generating translation dictionary 👍
magento i18n:collect-phrases -o "/var/www/html/magento2/es_ES.csv" -m /var/www/html/magento2/

It runs successfully with the below message "Dictionary successfully processed" and generates "es_ES.csv" file in the magento root directory.

*Step 2: You have to translate this es_ES.csv, get a translated es_ES.csv file or get the latest from the crowdin-project (43% translation)
*

Step 3 : I run below command to create language package.
magento i18n:pack -d /var/www/html/magento2/es_ES.csv . es_ES

Step 4: Run the commands:

from document root:

find . -name js-translation.json -exec rm -rf {} ;
php bin/magento i18n:pack --mode=replace -d var/source_nl_NL.csv nl_NL
php bin/magento setup:static-content:deploy en_US nl_NL
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Please also have look at:
http://www.vanderboon.net/wiki/Install_Magento_Crowdin_Translation
http://www.vanderboon.net/wiki/Install_Test_Magento_2_Translation

@karishmadaffodil
Copy link
Author

Great. I follow the steps above and now I can see the translations at
frontend.
Can you provide the translation csv for language code es_EC .
And also I have one query that how will the translation be generated for
custom modules . Do I have to put translation for them manually?

On Fri, Mar 18, 2016 at 2:01 PM, thomvanderboon notifications@github.com
wrote:

Step 1 : I run below command for generating translation dictionary [image:
👍]
magento i18n:collect-phrases -o "/var/www/html/magento2/es_ES.csv" -m
/var/www/html/magento2/

It runs successfully with the below message "Dictionary successfully
processed" and generates "es_ES.csv" file in the magento root directory.

Step 2: You have to translate this es_ES.csv, get a translated es_ES.csv
file or get the latest from the crowdin-project (43% translation) *

Step 3 : I run below command to create language package.
magento i18n:pack -d /var/www/html/magento2/es_ES.csv . es_ES

Step 4: Run the commands:

from document root:

find . -name js-translation.json -exec rm -rf {} ;
php bin/magento i18n:pack --mode=replace -d var/source_nl_NL.csv nl_NL
php bin/magento setup:static-content:deploy en_US nl_NL
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Please also have look at:
http://www.vanderboon.net/wiki/Install_Magento_Crowdin_Translation
http://www.vanderboon.net/wiki/Install_Test_Magento_2_Translation


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#3560 (comment)

Thanks and regards
Karishma Sharma
(Daffodil Software Ltd)

@veloraven
Copy link
Contributor

@karishmadaffodil as I can understand the original issue was solved.
If you have any additional questions please address them to the Community Forums or the Magento Stack Exchange site for technical questions as The GitHub issue tracker is intended for technical issues only.
If you can still reproduce this issue, please create a new GitHub issue report.

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

No branches or pull requests

7 participants