-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
functionsIssue pertains to the default function setIssue pertains to the default function set
Milestone
Description
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}}
Metadata
Metadata
Assignees
Labels
functionsIssue pertains to the default function setIssue pertains to the default function set