You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TBH, I would expect StringLiterals to go through pseudo localization.
I'm having formatToParts run around my head a lot, and I wonder if this would be the first thing to benefit from formatComplexPattern to be "to parts", and to move the transform into the bundle?
We'll need to discuss the details of how StringLiterals should be handled separately. I expect we'll want to exclude them from transform in cases like the following:
# "percent" should not be transformed.string-literal-as-named-arg = {NUMBER(1, style: "percent")}
# "one" should not be transformed.string-literal-as-selector = { "one" ->
[one] One
*[other] Other
}
# Not part of Fluent Syntax 1.0, but a possible addition in the future.# "special key" should not be transformed.string-litera-as-variant-key = { $var ->
["special key"] Special
*[other] Other
}
Moreover, StringLiterals used as placeables already have the semantics of preserving the literal content from feratures like whitespace trimming.
trailing-whitespace = Foo{""}
It would make sense to me to extend this behavior to "protect" content from bundle._transform.
In the short term, I see disabling transforms for all StringLiterals as a good and safe starting position.
I noticed this while working on #380. I'd like to discuss this in detail in the spec, but also fix this in a common-sense manner right now.
The text was updated successfully, but these errors were encountered: