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
When terms inside other terms, there is a limitation around passing variables down to other terms, but I'm not sure about the nature of such limitation. Here is an example:
-bar = { $n ->
[0] some
*[1] another
}
-foo = before { -bar(n: $x) } after
-foo is just an abstraction around -bar, delegating to it a piece of the message, but passing $x down to -bar is forbidden, with parsing error E0014: Expected literal.
I have a vague memory of wanting to forbid exactly this kind of use-cases. IIRC, my argument was that this increases the complexity, makes the translations harder to reason about, and is generally something that programmers like to do, because we like factoring things out in the name of DRY. Whereas Fluent was based around WET: write everything twice, because we assumed WET would easier for translators, translation memories, and machine translation systems.
When you're saying -foo is just an abstraction around -bar, it sounds like a red flag to me. Can you provide a more concrete example of what you're trying to achieve?
When terms inside other terms, there is a limitation around passing variables down to other terms, but I'm not sure about the nature of such limitation. Here is an example:
-foo
is just an abstraction around-bar
, delegating to it a piece of the message, but passing$x
down to-bar
is forbidden, with parsing errorE0014: Expected literal
.cc @gonzalocordero
The text was updated successfully, but these errors were encountered: