Open
Description
I find it surprising that this happens (playground link):
const bundle = new FluentBundle('en-US', { useIsolating: false })
bundle.addMessages(ftl`
msg = { $foo ->
[foo] FOO
*[other] BAR
}
-term = { $foo ->
[foo] FOO
*[other] BAR
}
test = {msg} {-term}
`)
const test = bundle.getMessage('test')
bundle.format(test, { foo: 'foo' }) // 'FOO BAR'
Essentially, it looks like the argument scope is handled differently by {msg}
and {-term}
references, with the former getting access to the parent scope, and the latter not. Is this a part of the spec, or a bug in the JS implementation? In either case, it might be better if both of these worked the same way -- preferably as messages currently do.