-
Notifications
You must be signed in to change notification settings - Fork 800
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
docker: Add script to create "fake" translations for testing i18n #21407
Conversation
This adds a script, intended to be run inside the Jetpack Docker environment, to create plugin translations for two fake languages. - en_piglatin: All messages are translated into Pig Latin. - en_rtl: All messages will display backwards, and the interface will be right-to-left. Once you have run the script, in WordPress Admin > Settings > General you should see the above two languages as options for "Site Language". Note WordPress itself is not translated as described, the translations are only created for messages in the specified plugin.
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be useful, thank you.
I wonder if we should make this an option in the Jetpack Debug helper plugin UI right away?
Unless the Jetpack Debug Helper is already monorepo-only, it would need some work:
|
Tested this out, but even after cleaning docker, building image, and upping again, I'm getting:
What am I missing here 🤔 |
…have been installed before
You hadn't installed any language packs before, so the directory for the plugin language packs didn't exist. Updated the script to create the directory. |
…ng-formatting * master: docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477)
* master: docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477)
* master: (40 commits) docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477) Photon: do not serve Wikipedia images from CDN. (#21572) Publicize: update endpoint (#21510) [Plugin] Backup: Update initial backup screen (#21559) RNA Connect Screen: Remove unused files (#21570) RNA Connection: Add ConnectScreenRequiredPlan Component (#21521) Update PHPUnit coverage configs (#21557) cli: Fix skeleton phpunit config (#21555) ...
Changes proposed in this Pull Request:
This adds a script, intended to be run inside the Jetpack Docker
environment, to create plugin translations for two fake languages.
right-to-left.
Once you have run the script, in WordPress Admin > Settings > General
you should see the above two languages as options for "Site Language".
Note WordPress itself is not translated as described, the translations
are only created for messages in the specified plugin.
Jetpack product discussion
p1634159370450900-slack-CBG1CP4EN
Does this pull request change what data or activity we track or use?
No
Testing instructions:
jetpack docker build-image
.jetpack docker exec /var/scripts/fakepot.sh /var/www/html/wp-content/plugins/jetpack
/wp-admin/options-general.php
. You should see the two new languages in the Site Languages dropdown.