1) Support user implemented custom functions that can access current scope, can work as Message references.
In future we could allow access in custom functions to additional information about current scope (developer arguments, local arguments, current errors)
Message references are highly needed for more complex translation cases with a lot of possible message combinations.
2) Additionally allow using expressions inside named arguments.
(It looks like by default fluent doesn't allow it Playground )
This functionality can be placed under boolean flag if we do not want to enable it by default.
See examples included in added tests.
Would like to get feedback if these changes can be upstreamed to fluent-rs.
Tries to temporary solve complex translation cases mentioned in: https://github.com/projectfluent/fluent-rs/issues/268 https://github.com/projectfluent/fluent/issues/80
1) Support user implemented custom functions that can access current scope, can work as Message references. In future we could allow access in custom functions to additional information about current scope (developer arguments, local arguments, current errors) Message references are highly needed for more complex translation cases with a lot of possible message combinations.
2) Additionally allow using expressions inside named arguments.
(It looks like by default fluent doesn't allow it Playground ) This functionality can be placed under boolean flag if we do not want to enable it by default.
See examples included in added tests.
Would like to get feedback if these changes can be upstreamed to fluent-rs.