Replies: 1 comment
-
Due to lack of discussions I defaulted to:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Been working on adding some experimental features inspired by: projectfluent/fluent#80
Changes are here: https://github.com/Ygg01/Linguini/tree/new-dyn-refs
All these features are experimental and should be mostly backwards compatible (all
.ftl
that worked before will continue to work, but some errors aren't errors anymore and some resolves are a bit different).So far what I've added
Term references an arguments
When we try to get bundle message
call-attr-no-args
with argumentstyle: chicago
, the term reference attribute will instead use default gender and evaluate toIt
.To have it passed around we can create it as such:
Now calling with
call-attr-with-args
with argumentstyle: chicago
, will returnShe
instead.Dynamic references
A reference to a message or a term. Why do we want it? Here is a motivating examples:
If we have 100s of creatures we're going to need 100! translations without. Sure, it can be done programmatically, but it might result in resolving different messages in different scopes.
Another nice feature is dynamic reference attributes:
So getting the message
you-see
with argumentsobject: creature-elf
will result in "You see an elf."Questions for readers
From most bikesheddiest to least bikesheddiest:
$$object
?-$object
?Beta Was this translation helpful? Give feedback.
All reactions