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

make it translatable #63

Closed
ZafarKamal123 opened this issue Mar 23, 2020 · 4 comments
Closed

make it translatable #63

ZafarKamal123 opened this issue Mar 23, 2020 · 4 comments
Assignees
Milestone

Comments

@ZafarKamal123
Copy link
Contributor

We need to be able to translate strings, which are hard-coded now.
Either in .pot files, or https://translate.wordpress.org/

@simonhammes
Copy link
Contributor

I would do this by generating .pot (and .json for the Gutenberg .js files!) files with WP-CLI
I can start a pull request

@ZafarKamal123
Copy link
Contributor Author

Sounds Great @simonhammes 👍

@simonhammes
Copy link
Contributor

simonhammes commented Mar 23, 2020

Well .. after doing some research the translate.wordpress.org way sounds better

https://github.com/WordPress/gutenberg/blob/31513b69330f3589db5cf3a3ce3d641331f4e3ad/docs/designers-developers/developers/internationalization.md

We need to decide on a language domain ('cwp-gutenberg-forms'?), make the wp_set_script_translations() call in the init.php file. Then WordPress should automatically pull in (our not yet existing) translation files from translate.wordpress.org (identified by the language domain)

EDIT: And we need to wrap every string in a i18n function call (__ for example) :)

@munirkamal munirkamal added this to the To Do milestone Mar 28, 2020
@ZafarKamal123
Copy link
Contributor Author

This feature is under progress.

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

5 participants