Skip to content

Filipino compact number plural rule#5516

Open
Jerozgen wants to merge 2 commits intomodrinth:mainfrom
Jerozgen:filipino-compact-number-rule
Open

Filipino compact number plural rule#5516
Jerozgen wants to merge 2 commits intomodrinth:mainfrom
Jerozgen:filipino-compact-number-rule

Conversation

@Jerozgen
Copy link
Contributor

Made ICU to use the one branch for compact numbers (10K, 1.23M) in Filipino

Filipino would expect one number whose digit ending in anything but 4, 6, or 9. If 1,239 gets formatted into 1.2K, it should now read as 1,200 and be treated as one.

}

function formatCompactNumberPlural(value: number | bigint): string {
function formatCompactNumberPlural(value: number | bigint): number | bigint {
Copy link
Member

Choose a reason for hiding this comment

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

This return type is wrong, it needs to be string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The formatCompactNumber function returns a compact number as a string

The formatCompactNumberPlural function is used in ICU plural messages ({(here!), plural, ...}). This plural variable is internally converted to a number for category matching (one, few, other, etc.), so it doesn't matter whether this function returns a string or a number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants