-
Notifications
You must be signed in to change notification settings - Fork 45
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
Term's attributes can't be used as placeable #339
Comments
You're looking for parametrized terms, https://projectfluent.org/fluent/guide/terms.html. FWIW, terms are not to group information, but to encapsulate terms that might change on context. Branding is one example, and the purpose of Terms doesn't go far beyond that. |
That's the use case scenario Caridy has in his project but for a lot of terms like "Account", "Product", "User" etc. that they want to parametrize per product/consumer. |
I smell #80? |
I'm not sure how they want to define relations between terms - @caridy is Dynamic References proposal fitting here for you? |
@zbraniecki I'm not sure yet, let me dig deeper. @Pike I got very confused, the dynamic references proposal by @stasm (in the issue description) explicitly adds information to the term making them more message-like, at least at first glance that's what I'm getting. I understand that that part is not necessary the core of the dynamic reference proposal, but nevertheless it is there. |
Term's attributes were meant to capture metadata. The grammatical gender is a good example. However, the anadrome is not. I'd suggest something like the following:
You can the use both variants in placeables:
|
It seems that some symmetry between messages and terms are missing, intentionally or not, and I will like to understand better the "why". Let's see the example from the documentation:
In this example, the message
login-input
can have attributes that are placeables, while-brand-name
term can only have metadata (values for selection and such). The specific parsing error is:E0019: Attributes of terms cannot be used as placeables
.I might be missing some fundamental design principle that makes terms a lot more more restrictive than messages, but in principle, it looks to me that the ability to group information (of various kind) should be common for both. This issue is also in the same realm as #338.
cc @gonzalocordero
The text was updated successfully, but these errors were encountered: