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
Localise the launch sidebar and final launch step #46555
Localise the launch sidebar and final launch step #46555
Conversation
Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com D51377-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2 |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
@p-jackson Tested in German. I can confirm that after clicking "Complete Setup" the launch sidebar was in German. However the following step led me here. I'm not sure if that is the "final step in the launch flow" It says "Blog is now live" |
@autumnfjeld that's strange, I don't know how it would have jumped to the publishing sidebar ... The "final step in the launch flow" is called "Launch your site". I should have just said what the step was called, but it was in another language so didn't know what it was actually called 😆 This is what the in-editor launch flow looks like, just to make sure we're both talking about the same thing. |
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.
Verified with french, german, spanish
👍
Just like #46552, we were missing something simple to get the low-hanging fruit of l10n going for the launch modal.
Plugins are supposed to call
wp_set_script_translations
when enqueueing internationised scripts:https://developer.wordpress.org/apis/handbook/internationalization/#internationalizing-javascript
When you call
wp_set_script_translations
it will (by default) grab the translations fromtranslate.wordpress.org
, which has already translated the ETK: https://translate.wordpress.org/locale/es/default/wp-plugins/full-site-editing/If you look at other scripts that are enqueued by ETK they're already doing this. So it was just us that had forgotten :D
Changes proposed in this Pull Request
wp_set_script_translations
after enqueueing the launch JSTesting instructions
The domain picker and plan picker won't be translated. They come from a shared package that isn't using the
full-site-editing
text domain, which we still need to figure out.