We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wish there a way of translating blade files easily
blade files are central for the theme
translation
pot files for translation
may need wp-cli fixing
In order to translate a theme there's the wp-cli command
wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include="app,resources"
however, this doesn't work on blade files as wp-cli doesn't support them:
wp-cli/i18n-command#147
one workaround I tried is compiling to php and then referencing php cache
wp acorn view:cache && wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include="app,../../cache/acorn/framework/views"
however, this doesn't work either, (because such folder is outside I guess)
So, there's this workaround: compiling, copying to current folder and translating
wp acorn view:cache cp -r ../../cache/acorn/framework/views ./viewscache wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include="app,viewscache" rm -rf viewscache
if being used in package.json with yarn translate:pot
yarn translate:pot
"scripts": { ... "translate:pot": "wp acorn view:cache && cp -r ../../cache/acorn/framework/views ./viewscache && wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include='app,viewscache' && rm -rf viewscache" },
It works, but is so ugly.
Is there a recommended approach for translation?
The text was updated successfully, but these errors were encountered:
Update translation strategy, blade didn't work
3048363
roots#2963
I posted something similar not so long ago and it was a duplicate already. It's planned for the beta.4: #2672 and #2929
Sorry, something went wrong.
There is now a WIP PR for adding support in WP-CLI, see wp-cli/i18n-command#304
No branches or pull requests
Terms
Summary
I wish there a way of translating blade files easily
Motivation
Why are we doing this?
blade files are central for the theme
What use cases does it support?
translation
What is the expected outcome?
pot files for translation
Potential conflicts / foreseeable issues
may need wp-cli fixing
Additional Context
In order to translate a theme there's the wp-cli command
however, this doesn't work on blade files as wp-cli doesn't support them:
wp-cli/i18n-command#147
one workaround I tried is compiling to php and then referencing php cache
however, this doesn't work either, (because such folder is outside I guess)
So, there's this workaround: compiling, copying to current folder and translating
if being used in package.json with
yarn translate:pot
It works, but is so ugly.
Is there a recommended approach for translation?
The text was updated successfully, but these errors were encountered: