[UXPROD-4473] numeric values in translations must be identified as numeric Created: 12/Jul/21  Updated: 21/Sep/23

Status: Open
Project: UX Product
Components: None
Affects versions: None
Fix versions: None

Type: New Feature Priority: P3
Reporter: Zak Burke Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: delegate_candidate, front-end, i18n, ui-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Defines
is defined by UIBULKED-352 Localize numbers displayed in bulk edit Closed
Relates
relates to UICHKOUT-734 display numbers as numbers, not text Closed
relates to UIDATIMP-1459 Job summary - format numbers in summa... Closed
Development Team: Volaris
PO Rank: 0

 Description   

Summary: Numeric substitutions in translations must be identified as "formatted arguments" in order to be properly formatted; they cannot simply be passed through as unformatted (string) arguments.

Details: Locales format numbers differently and may use entirely different numbering systems (i.e. not all locales use the numerals 0-9). For example, one thousand might be output as 1,000 or 1.000 or 1 000.

  1. Numeric values in translation values must be identified in order for them to be properly formatted. e.g. a message like
    <FormattedMessage id="foo" values={{ apeCount: 123 }}>
    

    should have a value such as

    Found {apeCount, number} {apeCount, plural, one {orangutan} other {orangutans}} in the parlor.
    
  1. Numeric values presented directly to the screen, e.g. row numbers in tables, must be likewise formatted, e.g. 
    <td><NumberFormat value={{apeCount}} /></td>
    

    rather than output directly, e.g. 

    <td>{apeCount}</td> 


 Comments   
Comment by Zak Burke [ 26/Jul/21 ]

Holly Mistlebauer, should this be a UXPROD rather than a FOLIO ticket? I think it would be a great feature to hand to a junior developer/for teams to hand to junior developers as the work is straightforward but it spans every single UI repository in the project.

Generated at Fri Feb 09 00:40:12 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.