-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Keep consistent punctuation (or lack thereof) in onboarding modals #97965
Conversation
…o periods at end of feature snippets
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~29 bytes added 📈 [gzipped])
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 (~29 bytes added 📈 [gzipped])
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. |
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.
Tested, lgtm 👍
@@ -23,6 +24,12 @@ export default function PaidDomainSuggestedPlanSection( props: { | |||
const translate = useTranslate(); | |||
const { paidDomainName, onPlanSelected, isBusy } = props; | |||
|
|||
const previousCopy = translate( 'Free for one year. Includes Premium themes.' ); | |||
const updatedCopy = translate( 'Free for one year, includes Premium themes' ); | |||
const hasTranslationForUpdatedCopy = useHasEnTranslation()( |
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 works fine, but I did give it a double take because it's not really idiomatic React. At least not in our code base. We'd usually call the hook near the top of the function (like useTranslate
) even in this special case where it's only used once.
I'm not sure why we do it this way. Maybe because React has all these special rules for how hooks get called, and so sometimes doing it this way actually doesn't work, even when there's only one call to the function.
I searched the code the code and found there are actually other components doing it this way too, but we mostly don't.
You should just merge it as is, not worth another CI round trip.
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.
I was using this as an example, a starting point: https://github.com/Automattic/wp-calypso/blob/5855897201ecc35fa25f6a21f72346ea386559f0/client/me/account/toggle-sites-as-landing-page.tsx.
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.
Updated, now with idiomatic React. 😄
Thanks for the input!
Translation for this Pull Request has now been finished. |
BTW pretty sure this would get marked as "fuzzy" in translation tools and keep using old translations since it's simple punctuation change, and thus not need the "has translation" check. Thanks for thinking about non-English experience tho! |
TIL! |
Keep consistent punctuation (or lack thereof) in onboarding modals: no periods at end of feature snippets
Fixes this:
pdtkmj-3es-p2#comment-6090
Related to #
Proposed Changes
Check that a non-English locale uses the old translation (has the periods at the end of the sentance):
Why are these changes being made?
To have consistent punctuation in plan snippets (the microcopy for plan details)
Testing Instructions
Pre-merge Checklist