message-format-wg icon indicating copy to clipboard operation
message-format-wg copied to clipboard

How do we support multiple selection args (selectors) in a multi-select message?

Open echeran opened this issue 4 years ago • 0 comments

A multi-select message often has one variable used for selection. But what if there are two or more? How do we structure and represent the message accordingly?

This issue is somewhat related to https://github.com/unicode-org/message-format-wg/issues/103, and the example there is applicable here, too.

Several comments that are in favor of "flat" (non-nested) multi-select messages also represent the selection args (selectors) in a list, and likewise represent the selection function return values in a list to key each corresponding pattern in the multi-select message. Ex: https://github.com/unicode-org/message-format-wg/issues/98#issuecomment-661463626 Ex: https://github.com/projectfluent/fluent/issues/4

One alternate formulation of a flat multi-select message uses a map instead of the prevalent 2 lists formulation (selector names and selector values). A detailed discussion of the tradeoffs, which resulted in that formulation losing support from its proponent, can be read here.

If #103 results in allowing nested multi-select messages, then that might simplify how this question is understood. What would that look like, and what are the tradeoffs?

echeran avatar Aug 08 '20 04:08 echeran