-
Notifications
You must be signed in to change notification settings - Fork 1
Uneven branches in multi-variants #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In MessageFormat You can see that the So if we think of this as a switch:
I think it is a good thing to have one and only one value as fallback, and that should be as generic as possible (covering all options)
Which one is the default now? "many", because the TLDR: I'm trying to make a case for:
|
As per @stasm request in #6 I encoded the AST in my proposal to use
Option 2
.It handles multi-variant like
Anne published 2 pictures.
- where in Polish we'll need gender and plural selector.The issue I see with
Option 2
is that I'm not sure how to resolve uneven selectors, For example, if we'd like to extend the example to handleAnne and John published 2 pictures
andAnne published 2 pictures
, in Polish we'll have to handle the fact that Polish has different genders depending on the plural form of the subject.masculine
,feminine
andneuter
masculine-personal
andnon-masculine-personal
.In Fluent's proposal we would handle that via nesting:
As you can see it is fairly easy to encode the idea of "default" variants and uneven branches.
With
Option 2
, it becomes more tricky:we can encode it via a single "default":
which is limiting because we may resolve the plural perfectly and only struggle with gender.
Alternatively, we may have default per selector:
but that looks clunky.
There may be some other way to encode what are the defaults, like separately denote defaults, but they seem increasingly clunky to encode in human readable and consistent way.
I'm opening this issue with three thoughts:
default
valuesThe text was updated successfully, but these errors were encountered: