-
Notifications
You must be signed in to change notification settings - Fork 45
Rename traits to attributes and change syntax #6
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
The repitition of the base ID is tricky for developers changing strings. We had this in our current strings, when developers would change label, and screw up accesskey, etc. I expect that repitition to be a source of grief in practice, both when writing messages from scratch and getting copy-n-paste wrong, as well as editing strings to update to new content. In the newsgroup, there's an alternative compressed version,
That looks OK to me. |
That's a great point. I did not consider that. I too like the syntax @Pike suggested in his comment. That said I am a bit concerned about the edge-cases, like messages with just one attribute:
…or messages or attributes with complex values:
I find them okay to read but would like to spend some more time thinking about this. |
Or combinations of message values and attributes:
or:
(I have doubts if |
Can we support both:
and
? |
I think we could, but I'd also prefer to start with only one version. Let's go ahead with
for now. |
@Pike made a point that allowing a condensed syntax of the Also, in order to allow an introduction of an |
This is not our experience from working with devs on FxOS. I'm fine with going for the enforced new line, but I don't believe that the concern is warrant given that devs have been doing it with .properties files for a couple years in FxOS without a problem. |
Goal
Provide easier syntax for multi-valued messages.
Description
While #5 is about multiple facets of the same value, this is about multiple values. This is useful in case of web components or other UI widgets.
Currently we'd write:
This looks similar to a variant of a
select-expression
but actually defines a trait and "Label" is a separate value, one of two values of thekey
message. When #1 is fixed this will become even more confusing, because lists of traits will not require defaults, but will use the same syntax as lists of variants.The proposed solution is to use
.
(the dot) as a new syntax for defining traits. Also, to better reflect their purpose, we want to rename traits to attributes.If there is no value it's definition can be omitted:
This will also require an addition of
attribute-expression
:Discussion
https://groups.google.com/forum/#!topic/mozilla.tools.l10n/dhWfBXHzuZI
The text was updated successfully, but these errors were encountered: