Skip to content

Comments

i18n: Update importer/upgrade-plan-details to use numberFormat for percent values in strings#100958

Merged
chriskmnds merged 1 commit intotrunkfrom
update/i18n-number-format-percent-importer
Mar 28, 2025
Merged

i18n: Update importer/upgrade-plan-details to use numberFormat for percent values in strings#100958
chriskmnds merged 1 commit intotrunkfrom
update/i18n-number-format-percent-importer

Conversation

@chriskmnds
Copy link
Contributor

@chriskmnds chriskmnds commented Mar 6, 2025

Part of addressing https://github.com/Automattic/i18n-issues/issues/949

Proposed Changes

Updates the plan-upgrade details during site importer or plan upgrade to use placeholders with numberFormat parsing for percentages in translation strings

Media

setup/import-focused?siteSlug=[site not on business] - Before/after in EN:

Screenshot 2025-03-07 at 11 45 22 AM

Why are these changes being made?

Part of addressing https://github.com/Automattic/i18n-issues/issues/949

Testing Instructions

  • Go to /setup/import-focused?siteSlug=[site not on business]
  • Confirm the percentages render correctly across different locales - we don't have translations yet, so the remaining strings won't be translated - per media above

props to @agrullon95 & @renatho for helping with testing

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@chriskmnds chriskmnds self-assigned this Mar 6, 2025
@chriskmnds chriskmnds requested review from agrullon95 and renatho and removed request for agrullon95 March 6, 2025 17:09
@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 Mar 6, 2025
@chriskmnds chriskmnds requested a review from agrullon95 March 6, 2025 17:09
@github-actions
Copy link

github-actions bot commented Mar 6, 2025

@chriskmnds chriskmnds requested a review from a team March 6, 2025 17:09
@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.

<ul>{ hostingDetailsItems }</ul>
</div>
<div className="import__upgrade-plan-hosting-details-testimonials-container">
<p>{ translate( '100% loved by our best customers' ) }</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agrullon95 can you help me test this? I cannot seem to be able to reach the step/location where this renders. I looked through a recent PR of yours (#89497) but no luck. 🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chriskmnds! 👋

I would recommend you to check the flows to see if this step is still used, or we just forgot to remove it in a refactor. Trying to navigate quickly, I wasn't able to see the step either.

This is the pricing step I see now:

Screenshot 2025-03-06 at 15 39 46

When we worked on that, we had a step similar to this one to present the pricing:

plan page

For more context, I found a PR where I worked on that old version: #90966

@agrullon95
Copy link
Contributor

It seems like a lot has changed since my PR. I found this used in the migration-signup, import-focused stepper flows.

Migration-signup : /setup/migration-signup - should create site then you can enter a WP site to transfer
Import-focused: /setup/import-focused?siteSlug={NON_BUSINESS_PLAN_SITE}

CleanShot 2025-03-06 at 14 44 31@2x

@agrullon95
Copy link
Contributor

@chriskmnds - This is how it looks on your branch:

CleanShot 2025-03-06 at 14 52 55@2x

Local branch (trunk):

CleanShot 2025-03-06 at 14 53 23@2x

@chriskmnds
Copy link
Contributor Author

Oh thank you both @agrullon95 @renatho for confirming and testing! 💯 Really appreciate it

@chriskmnds chriskmnds added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Mar 7, 2025
@a8ci18n
Copy link

a8ci18n commented Mar 7, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17287201

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @chriskmnds for including a screenshot in the description! This is really helpful for our translators.

@chriskmnds chriskmnds force-pushed the update/i18n-number-format-percent-importer branch from 4227a84 to d0db7e6 Compare March 27, 2025 15:35
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/i18n-number-format-percent-importer on your sandbox.

@chriskmnds chriskmnds merged commit 19843c1 into trunk Mar 28, 2025
13 checks passed
@chriskmnds chriskmnds deleted the update/i18n-number-format-percent-importer branch March 28, 2025 10:01
@github-actions github-actions bot removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants