You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A thought arising from implementing a fix for #956: selection on currency, percent, and unit values is likely to be exceedingly rare, and to be potentially confusing especially for exact matches. For example, for the following message, consider which variant would an implementation match, and which variant would a user presume to match?
.local $pct = {0.5 :percent}
.match $pct
0.5 {{Is {$pct} matched as a fraction?}}
50 {{Is {$pct} matched as a whole number?}}
|50%| {{Is {$pct} matched as the formatted value?}}
* {{Or is {$pct} matched as something else?}}
My contention here is that this is confusing, and we should avoid the issue by not allowing selection on :currency, :percent, or :unit. Note that this doesn't prevent an author from writing such messages, they just need to use an explicit :number:
.input {$dist :number}
.local $miles = {$dist :unit unit=mile}
.match $dist
0 {{You are at your destination}}
* {{You are {$miles} from your destination}}
The text was updated successfully, but these errors were encountered:
We've had this argument before. Selection on currency is extremely common. Unit is less common because of the inflective bits in the CLDR/ICU implementation (although these are incomplete for forming sentences, eh?). Percent is probably not that rare. I've seen messages like "You have a 10% credit" or "You have 12% off today only", which need selection to get it right.
A thought arising from implementing a fix for #956: selection on currency, percent, and unit values is likely to be exceedingly rare, and to be potentially confusing especially for exact matches. For example, for the following message, consider which variant would an implementation match, and which variant would a user presume to match?
My contention here is that this is confusing, and we should avoid the issue by not allowing selection on
:currency
,:percent
, or:unit
. Note that this doesn't prevent an author from writing such messages, they just need to use an explicit:number
:The text was updated successfully, but these errors were encountered: