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

Localise the launch sidebar and final launch step #46555

Merged
merged 1 commit into from Oct 20, 2020

Conversation

p-jackson
Copy link
Member

@p-jackson p-jackson commented Oct 19, 2020

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 from translate.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

  • Call wp_set_script_translations after enqueueing the launch JS

Testing instructions

  • Checkout branch, yarn dev --sync, and sandbox an unlaunched gutenboarding site
  • Switch user to a non-english langage
  • Open a page in the editor
  • Click the "Complete Setup" button in the top right of the editor, which should open the modal launch flow (not the one that redirects to another page)
    • The launch sidebar on the right should be translated
    • The final step in the launch flow should be translated

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.

@p-jackson p-jackson added [Feature] Post/Page Editor The editor for editing posts and pages. i18n Launch [Goal] New Onboarding previously called Gutenboarding labels Oct 19, 2020
@p-jackson p-jackson requested a review from a team October 19, 2020 05:12
@p-jackson p-jackson self-assigned this Oct 19, 2020
@matticbot
Copy link
Contributor

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 19, 2020
@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

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

@matticbot
Copy link
Contributor

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.

@autumnfjeld
Copy link
Contributor

autumnfjeld commented Oct 19, 2020

@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"

Screen Shot 2020-10-19 at 18 19 23

@p-jackson
Copy link
Member Author

@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.
Oct-20-2020 09-13-37

@autumnfjeld
Copy link
Contributor

Confirmed the following (starting from /new to ensure Gutenboarding flow):

  • The launch sidebar on the right should be translated
  • The final step in the launch flow should be translated
    for fr, es, ge

Screen Shot 2020-10-20 at 14 47 35

Screen Shot 2020-10-20 at 14 49 35

Screen Shot 2020-10-20 at 14 50 31

Copy link
Contributor

@autumnfjeld autumnfjeld left a 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
👍

@p-jackson
Copy link
Member Author

Thanks!

Kinda looks like there's something up with this French translation, almost like an html escape has been used instead of a regular utf character.
Screenshot 2020-10-20 at 5 03 08 PM

🤷

@p-jackson p-jackson merged commit 410b3d6 into master Oct 20, 2020
@p-jackson p-jackson deleted the update/etk-user-translations-for-launch-sidebar branch October 20, 2020 04:05
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 20, 2020
@autumnfjeld
Copy link
Contributor

Thanks!

Kinda looks like there's something up with this French translation, almost like an html escape has been used instead of a regular utf character.
Screenshot 2020-10-20 at 5 03 08 PM

🤷

Good eye!!! I looked it up: ê == ê
Should say: Vous y êtes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Goal] New Onboarding previously called Gutenboarding i18n Launch [Pri] High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants