-
Notifications
You must be signed in to change notification settings - Fork 45
Allow accessing nested VariantLists #187
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
For both A and B we should find an answer to the question no. 6 from #176 (comment). Should be it possible to invoke the default value of an upper level and pass a specific key to the nested # Either a new Fluent symbol NONE,
# or just leverage the fact that no variant has key == NONE.
X = {-brand-name[NONE, genitive]}
# Empty placeable could mean "null"
X = {-brand-name[{}, genitive]}
# Implicit "null"
X = {-brand-name[, genitive]} I don't like any of these solutions. I think we should encourage explicit syntax, especially in areas which are already quite complex. Terms with variant lists definitely qualify as such in my book. I'm OK with answering No to the original question, and requiring all keys to be always present: B = {-brand-name[singular, genitive]} |
Hi, can you please explain how can I use parametrized terms to achieve what variant lists would allow? Thanks. |
@mariusrak I suspect this is not a great place to ask a question like that. But I suspect looking at https://projectfluent.org/fluent/guide/selectors.html will get you started at how to create |
There is currently no way to access variants nested in other variants:
If #176 is accepted and if parameterized terms replace variant lists, we might not need this at all. Otherwise, I would suggest to use the same syntax as will be used for list selectors (#4). My comment in #4 (comment) has the rationale for my preference for option B.
The text was updated successfully, but these errors were encountered: