Repository navigation
Support du letter-spacing avec le formatage fr-FR - #28
Merged
Merged
Conversation
Replace U+202F thousands separators with U+2009 after Intl formatting so CSS letter-spacing applies with some font/engine pairs. Share formatNumber between the frontend script and the block editor via src/utils.
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
francoistibo
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Intl, remplacer le séparateur de milliers U+202F (espace fine insécable) par U+2009 (espace fine) pour que leletter-spacingCSS s’applique correctement (ex. Zalando Sans sous Chromium / thème Rafale).formatNumber()danssrc/utils/format-number.jset l’utiliser côté script front et éditeur de bloc (suppression de la logique dupliquée).Contexte
Avec
data-decimal-separator="fr-FR",Intl.NumberFormatinsère U+202F entre les groupes de chiffres (50 000). Certaines combinaisons police / moteur ignorent leletter-spacingsur les nœuds texte qui contiennent U+202F : la valeur calculée est bien définie, mais la largeur en layout ne change pas.Les formats qui n’utilisent pas
Intl(none,.,,) ou les locales qui n’émettent pas U+202F (de-DE,en-EN) ne sont pas modifiés.Modifications
src/utils/format-number.jsnormalizeIntlFormattedNumber()remplace\u202fpar\u2009; JSDoc sur la raison du remplacement.src/number-formatter.jsformatNumber; conserve l’init DOM etwindow.blockpartyKeyFigureFormatter.src/edit.jsformatNumberpartagé ; suppression du doublonuseNumberFormatter.Aucun changement PHP, attributs de bloc ou markup sauvegardé.
Impact à la mise à jour (sites existants)
fr-FR: groupement conservé ; espace fine (U+2009) au lieu de l’espace fine insécable ; leletter-spacingdu thème peut enfin resserrer les chiffres (comportement attendu).Plan de test
decimalSeparator= Aucun — affichage tel qu’enregistré ; pas de régression.50000) — affichage groupé (50/000) ; inspecter le DOM : séparateur en U+2009, pas U+202F.letter-spacing: -0.05emsur la figure côté thème — largeur rendue différente deletter-spacing: normal.npm run buildetnpm run lint:jsOK.