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
Help: Localizing inline contextual help links #27173
Help: Localizing inline contextual help links #27173
Conversation
title: 'Quick-Start Guide', | ||
description: | ||
"Use our five-step checklist to get set up and ready to publish, no matter what kind of site you're building.", | ||
title: translate( 'Quick-Start Guide' ), |
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.
Hi! I've found a possible matching string that has already been translated 5 times:
translate( 'Quick Start Guide' )
ES Score: 15
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
link: 'https://en.support.wordpress.com/increase-your-site-traffic/', | ||
post_id: 132186, | ||
title: 'Increase Your Site Traffic', | ||
description: | ||
title: translate( 'Increase Your Site Traffic' ), |
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.
Hi! I've found a possible matching string that has already been translated 20 times:
translate( 'Increase Your Traffic' )
ES Score: 10
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
link: 'http://en.support.wordpress.com/gravatars/', | ||
post_id: 1338, | ||
title: 'Your Profile Picture', | ||
description: | ||
title: translate( 'Your Profile Picture' ), |
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.
Hi! I've found a possible matching string that has already been translated 19 times:
translate( 'Upload your profile picture' )
ES Score: 14
See 2 additional suggestions in the PR translation status page
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
link: 'http://en.support.wordpress.com/account-deactivation/', | ||
post_id: 138080, | ||
title: 'Account Closure', | ||
description: 'Need a fresh start? Learn how to close your account.', | ||
title: translate( 'Account Closure' ), |
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.
Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Confirm account closure' )
ES Score: 13
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
title: 'Explore the WordPress.com Plans', | ||
description: | ||
"Upgrading your plan unlocks a ton of features! We'll help you pick the best fit for your needs and goals.", | ||
title: translate( 'Explore the WordPress.com Plans' ), |
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.
Hi! I've found a possible matching string that has already been translated 8 times:
translate( 'Explore WordPress.com Plans' )
ES Score: 12
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
description: | ||
'The Media Library is where you can manage your images, audio, videos, and documents ' + | ||
'all in one place.', | ||
title: translate( 'The Media Library' ), |
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.
😞 103 existing translations will be lost with this change.
}, | ||
{ | ||
link: 'http://en.support.wordpress.com/followers/', | ||
post_id: 5444, | ||
title: 'Your Followers', | ||
description: | ||
title: translate( 'Your Followers' ), |
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.
😞 56 existing translations will be lost with this change.
If the string must change, the following option has already been translated 43 times:
translate( 'followers' )
ES Score: 10
See 1 additional suggestion in the PR translation status page
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
title: 'Webmaster Tools', | ||
description: | ||
'Learn how to verify your WordPress.com site for the webmaster tools that many search engines provide.', | ||
title: translate( 'Webmaster Tools' ), |
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.
Hi! I've found a possible matching string that has already been translated 17 times:
translate( 'Webmaster Tools Verification' )
ES Score: 11
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
title: 'WordPress.com Plans', | ||
description: | ||
'Learn about the capabilities and features that the different plans unlock for your site.', | ||
title: translate( 'WordPress.com Plans' ), |
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.
Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Discover WordPress.com Plans' )
ES Score: 11
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
link: 'http://en.support.wordpress.com/visual-editor/', | ||
post_id: 3644, | ||
title: 'The Visual Editor', | ||
description: | ||
title: translate( 'The Visual Editor' ), |
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.
😞 95 existing translations will be lost with this change.
title: 'Follow Blogs', | ||
description: | ||
'When you follow a blog on WordPress.com, new posts from that site will automatically appear in your Reader.', | ||
title: translate( 'Follow Blogs' ), |
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.
Hi! I've found a possible matching string that has already been translated 59 times:
translate( 'Blogs I Follow' )
ES Score: 12
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
], | ||
help: [ | ||
{ | ||
link: 'http://en.support.wordpress.com/blogging-u/', | ||
post_id: 117437, | ||
title: 'Blogging U.', | ||
description: | ||
title: translate( 'Blogging U.' ), |
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.
🆗 This change is safe, we'll keep the existing 21 translations.
}, | ||
{ | ||
link: 'https://en.support.wordpress.com/', | ||
title: 'All Support Articles', | ||
description: 'Looking to learn more about a feature? Our docs have all the details.', | ||
title: translate( 'All Support Articles' ), |
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.
Hi! I've found a possible matching string that has already been translated 34 times:
translate( 'All support articles' )
ES Score: 16
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
link: 'https://learn.wordpress.com/', | ||
title: 'Self-guided Online Tutorial', | ||
description: 'A step-by-step guide to getting familiar with the platform.', | ||
title: translate( 'Self-guided Online Tutorial' ), |
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.
Hi! I've found a possible matching string that has already been translated 25 times:
translate( 'Self-guided online tutorial' )
ES Score: 23
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
type: RESULT_VIDEO, | ||
link: 'https://www.youtube.com/embed/Y6iPsPwYD7g', | ||
title: 'Change Your Privacy Settings', | ||
description: 'Find out how to change your website privacy settings on WordPress.com.', | ||
title: translate( 'Change Your Privacy Settings' ), |
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.
Hi! I've found a possible matching string that has already been translated 24 times:
translate( 'Change privacy settings' )
ES Score: 12
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
type: RESULT_VIDEO, | ||
link: 'https://www.youtube.com/embed/_tpcHN6ZtKM', | ||
title: 'Schedule a Post', | ||
description: 'Find out how to schedule a post on your WordPress.com website or blog.', | ||
title: translate( 'Schedule a Post' ), |
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.
Hi! I've found a possible matching string that has already been translated 21 times:
translate( 'Schedule post' )
ES Score: 12
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
type: RESULT_VIDEO, | ||
link: 'https://www.youtube.com/embed/V8UToJoSf4Q', | ||
title: 'Add a Simple Payment Button', | ||
description: 'Find out how to add a payment button to your WordPress.com website.', | ||
title: translate( 'Add a Simple Payment Button' ), |
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.
Hi! I've found a possible matching string that has already been translated 1 time:
translate( 'Add a simple payment button.' )
ES Score: 17
See 1 additional suggestion in the PR translation status page
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
type: RESULT_VIDEO, | ||
link: 'https://www.youtube.com/embed/mCfuh5bCOwM', | ||
title: 'Create a Post', | ||
description: 'Find out how to create a post on WordPress.com.', | ||
title: translate( 'Create a Post' ), |
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.
Hi! I've found a possible matching string that has already been translated 26 times:
translate( 'Create a post' )
ES Score: 10
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
}, | ||
{ | ||
type: RESULT_VIDEO, | ||
link: 'https://www.youtube.com/embed/JVnltCZUKC4', | ||
title: 'Add Testimonials', | ||
description: 'Find out how to add testimonials to your WordPress.com website or blog.', | ||
title: translate( 'Add Testimonials' ), |
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.
Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Add some testimonials' )
ES Score: 13
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
Inline Help uses a file called When we built Inline Help, the idea here was that we could, in the future, add alternative version of the file for different languages, e.g., a file called I'd prefer we explore that option before we make the |
Hey @lsinger! Thanks a lot for your comments. It's immensely helpful to understand the intentions behind this feature.
Would the contents of each of these files be translated? Or hardcoded in the target language, i.e., Brazilian? If the latter, we'd probably have to come up with a way to generate these from our translation sources, which compels me to ask whether we could rather devise some backend solution/API to deliver localized contextual help text/support links/page ids to the client. Storing them on the client side up to a certain quantity sounds easier, yet we might gain more flexibility later if we could fetch the pageId, title, excerpt and permalink of the localized support article we wanted via, let's say, an English slug or pageId. @Automattic/i18n is working on adding meta to localized support pages, linking them to their English equivalents, so this will be theoretically possible. It strikes me as particularly relevant in the case of the hard-coded page id, which I noticed we use for tracking and for loading the support article's content in the overlay. Keeping on top of those as they change and as we add more languages might become tedious. What do you think?
@Automattic/i18n is also steaming ahead with getting our support translations up to scratch, at least for our "Magnificent" set of languages. @emilyaudela is doing a marvellous job on that. One advantage of the meta information I referred to above is that we'll be able to query whether a localized support page exists for a particular topic instead of curating a manual list or simply linking off to the English language page, which is the case now. Our ultimate goal is to standardize the support help links in such a way so that developers only have to worry about the locale subdomain fragment when linking to For languages that fall beyond the bounds of magnificence, @akirk and I spoke about potentially offering users the option to have the English page machine translated (Google), triggered via a url param or whatever. That's a few steps down the track however.
Has any work been done on locale-specific issues? Perhaps in the interim we might offer a generic set of help topics for each locale, in seperate resources as you mentioned, and then extend them with locale-specific topics as we progress. That way at least we could offer contextual help in languages other than English.
Just to be clear, are you referring to the dynamic help links or the use of Ah, I wrote more than I intended. 🥔I hope some of it makes sense. Thanks again! I'll join the group so I can get more context. Getting this awesome feature translated would be a tremendous thing indeed! |
@lsinger They don't. Guarding against this assumption has always been an unfortunate limitation on how we link to support sites, but we've done some preliminary work to mitigate this. :) Perhaps I should have provided more background information, sorry! As mentioned in the PR, we are normalizing all support page uris so that de.support.wordpress.com Where they don't, the user will see a localized page offering them the choice of visiting the original English or a Google-translated version. Though as more and more support page translations come through, we should hopefully experience fewer of these. More info: If you have any questions on this, or would like to share ideas, feel free to ping me directly. |
Could you incorporate #27715? |
08319a5
to
34f85c9
Compare
title: 'Change Your Account Email Address', | ||
description: 'Find out how to change your account email address on WordPress.com.', | ||
title: translate( 'Change Your Account Email Address' ), | ||
description: translate( 'Find out how to change your account email address on WordPress.com.' ), |
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.
Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Find out how to change your account email address WordPress.com.' )
ES Score: 11
Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).
config/_shared.json
Outdated
@@ -36,7 +36,7 @@ | |||
"facebook_app_id": "611241942420191", | |||
"rebrand_cities_prefix": "rebrandcitiestestsite", | |||
"livechat_support_locales": [ "en", "es", "pt-br" ], | |||
"support_site_locales": [ "en", "es", "de", "ja", "pt-br" ], | |||
"support_site_locales": [ "en", "es", "de", "fr", "he", "id", "it", "ja", "nl", "pt-br", "ru", "tr" ], |
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.
We've now launched all Mag16. Could you add those and I think then we can launch this!
Would it make sense to rebase this on #27857? |
cc98329
to
cf0a923
Compare
Rebased and updated to use |
b64eb55
to
eee0cc9
Compare
eee0cc9
to
15c9cfa
Compare
…adding known translated blog locale slugs to shared config array.
…for all envs Removed duplicate event.preventDefault Added check for non-EN support site locale, if a localized support site that matches the user's current locale exists, we send them there rather than show the English article. If the localized article does not yet exist, the user has the opportunity to view the English content or have the page translated by Google translate.
…le` to test whether the locale is `en`
a43c789
to
7552756
Compare
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~7668 bytes added 📈)
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~23023 bytes added 📈)
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
Background
This is a WIP PR to localize inline contextual help links, whose text and links are all in English.
It's a starter task, and part of an @Automattic/i18n effort to improve translations across our support sites, a recurring point of pain for our non-English speaking users.
A subset of this effort is to normalize all support page uris so that https://es.support.wordpress.com**/business-plan/** https://bs.support.wordpress.com**/business-plan/** and https://fr.support.wordpress.com**/business-plan/** redirect to the corresponding, localized support pages.
What this PR does
When a user's locale matches one for which we have a dedicated support blog and the user clicks an inline contextual help link, we prevent the inline content window (which is currently setup to fetch English content using post ids) from showing and redirect the user to that blog using the English slug.
If we don't yet offer a support blog in the user's language, we use the default
en
functionality.Future iterations
en
locales where this is no support site, pass a parameter flagauto_translate=1
toen.support.wordpress.com
allowing the user to have the support page automatically translated via Google translate .D18028-code
is a experimental API endpoint that fetches this information. though its future is uncertain.Testing
es
(or another support-ready language)/stats/
ar
or another locale without a WordPress support site.Expectations
At 3: You should be taken to the page at
es.support.wordpress.com
. If the localized content does not exist you'll be offered to view the page in English or have it translated using Google TranslateAt 4: The content will load in English.
It should also work for locale variants such as
de_formal
, which will default to the root language, in this casede.support.wordpress.com