Skip to content

CLDR-17570 Rational formatting#4520

Merged
macchiati merged 4 commits intomainfrom
CLDR-17570-Rationals
Mar 24, 2025
Merged

CLDR-17570 Rational formatting#4520
macchiati merged 4 commits intomainfrom
CLDR-17570-Rationals

Conversation

@macchiati
Copy link
Member

@macchiati macchiati commented Mar 21, 2025

CLDR-17570

Add new structure for rationals; put them with the rest of the number formats (decimal, scientific, etc.).
This involved various other changes:

  • root and en and dtd

  • Placeholder additions

  • DAIP additions

  • ExampleGenerator additions

  • Note that often new structure needs Checks, but this uses DAIP for two cases that would otherwise be errors.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@macchiati macchiati marked this pull request as ready for review March 22, 2025 00:37
@macchiati
Copy link
Member Author

PS Filed a ticket for improvements to the tooling, to make it easier to add structure.

Copy link
Member

@btangmu btangmu left a comment

Choose a reason for hiding this comment

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

This makes my head spin. +1 ½ for extensive tests

+ ".\n"
+ "^//ldml/numbers/rationalFormats/integerAndRationalPattern\\[@alt=\"([^\"]*)\"]"
+ RegexLookup.SEPARATOR
+ "A pattern that is used to “glue” an integer and a formatted rational fraction (eg, ½) together; only used when the rational fraction does not start with an un-superscripted digit"
Copy link
Member

Choose a reason for hiding this comment

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

"does not start with an un-superscripted digit" -- meaning (1) it does start with a superscripted digit, or (2) it starts with a non-digit? If it starts with a non-digit, would it be something like "one/half"? Just curious...

Copy link
Member Author

Choose a reason for hiding this comment

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

Formally https://util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=%5Cp%7Bgc%3DNd%7D, we'll need to explain it. Once we have markdown in examples, it would be easy to link out to an explanation

@macchiati macchiati merged commit e2dfeb3 into main Mar 24, 2025
16 checks passed
@macchiati macchiati deleted the CLDR-17570-Rationals branch March 24, 2025 16:15
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.

2 participants