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

Add documentation for translation-work #398

Open
zpaceinvader opened this issue Sep 8, 2022 · 2 comments
Open

Add documentation for translation-work #398

zpaceinvader opened this issue Sep 8, 2022 · 2 comments

Comments

@zpaceinvader
Copy link
Contributor

Add documentation for how to handle translations, including translating plugins. Include recommendations for plugins/software that might be helpful

@olethomas
Copy link
Member

olethomas commented Nov 1, 2022

Kept as a reference if #415 is merged:

Package needed:
"wp-cli/i18n-command": "2.4.0"

Command in composer.json:
./vendor/bin/wp i18n make-pot . languages/project-base.pot --exclude=".github,plugins,public/content/plugins,vendor,public/wp,node_modules,tests" --slug=project-base

@WilliamLeeks
Copy link
Contributor

It would be good to have an agreed Dekode approach to translating JavaScript, too. (If it does not already exist.) I think most people are aware of the bug where the MD5 hash does not match the file path — the workaround I have used is manually registering scripts (e.g. for blocks), using wp_set_string_translations(), and manually renaming the JSON files produced by the wp command. I think other people solve it differently, so it would be good to have some docs on the agreed/best method.

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

3 participants