message-format-wg
message-format-wg copied to clipboard
[FEEDBACK] Please move style percent to its own function
Recently, currency and unit formatting were moved to their own registry functions. However, there is still style that is either "decimal" or "percent".
This does not make sense. Please either remove "percent" (since a unit formatter should be able to handle it) or move it to its own function.
@macchiati was making an argument that formatting a percent is actually a formatting hint. "0.5 = 0.5 = 50% != 0.5%".
Even in this case, the name "style" is something we generally try to avoid because it is such a vague term. We should consider renaming the option to be dimensionlessDisplay or similar.
(chair hat ON)
Thank you for the feedback!
The WG consensus in the 2024-10-28 teleconference was to keep percentage formatting in :number/:integer.
The name style is taken directly from Intl.NumberFormat (as noted in the document).
A proposal to change this should start from a design document.
(chair hat OFF)
I personally think that, with the addition of :math, :currency, and :unit, the percent formatting looks less reasonable inside of the core number formatters.
The name
styleis taken directly fromIntl.NumberFormat(as noted in the document).
I don't buy this argument because style is a toggle between unit, currency, percent, and decimal in ECMA-402. Pulling unit and current out means that style is no longer parallel with ECMA-402. This is motivation for it to not be named the same thing.
This is not fixed, and registry.md says "The following options and their values are required to be available". So please fix this before LDML 47.
PR #988 ended up only removing style=percent. We do have :unit unit=percent, but that doesn't scale the input, so I'm reopening this to mark that we still need a solution for scaled percent formatting.
Moving to v48. We already agreed that this will not make 47
In the 2025-04-07 call we decided that the next step is a design doc. I assigned that action to myself.
#1068 will resolve this item.