Skip to content

Add scape char to percentage symbol #103361

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

andres-blanco
Copy link
Contributor

@andres-blanco andres-blanco commented May 12, 2025

Closes DOTCON-45

Proposed Changes

Scape the percentage symbol so it's correctly ignored when interpolating. This should be merged once all the translations are ready and the string displays correctly in all languages.

Why are these changes being made?

On languages different than English this string is producing an unexpected translation.

Current translation looks like:
image

Since the % is a reserved character for interpolation, we need to scape it so it's dealt with correctly when translating.

Testing Instructions

NOTE: this will only work when the translation for the new string with the scaped % exists

  • Change your account to a language different that English
  • Open the calypso.live link below and navigate to /setup/site-migration/site-migration-how-to-migrate
  • Verify the percentage symbol is displayed correctly

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)?

@andres-blanco andres-blanco added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label May 12, 2025
Copy link

github-actions bot commented May 12, 2025

@matticbot
Copy link
Contributor

matticbot commented May 12, 2025

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

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

  • blaze-dashboard
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/percentage-symbol-translators on your sandbox.

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

@a8ci18n
Copy link

a8ci18n commented May 12, 2025

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

Some locales (Hebrew) 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 @andres-blanco for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented May 18, 2025

Translation for this Pull Request has now been finished.

@andres-blanco andres-blanco force-pushed the fix/percentage-symbol-translators branch from 79d51cc to 9262f48 Compare May 19, 2025 18:38
@andres-blanco andres-blanco force-pushed the fix/percentage-symbol-translators branch from 9262f48 to 9df37c1 Compare May 21, 2025 16:24
Copy link
Contributor

@valterlorran valterlorran left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing this!

Captura de Tela 2025-05-21 às 14 32 18

@andres-blanco andres-blanco merged commit 0bb741b into trunk May 21, 2025
11 checks passed
@andres-blanco andres-blanco deleted the fix/percentage-symbol-translators branch May 21, 2025 17:35
@github-actions github-actions bot removed the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants