Hello,
It appears that the L20N syntax (or the implementation?) does not allow passing
a litteral boolean value to a macro.
For instance, given the following dummy_macro:
<dummy_macro($age, $uppercase) {
$age < 16 ? ($uppercase ? "Young man" : "young man") : ($uppercase ? "Sir"
: "sir")
}>
One is not able to specify a litteral boolean (eg. true or false) for the
$uppercase argument, as in:
<some_text "{{ dummy_macro($user.age, true) }} $user.name, ...">
This results in a ValueError being thrown.
There is obviously a workaround (passing a number/string, and using
number/string comparison in the macro), but I wonder if there is any reason the
above wouldn't be allowed?
Thanks,
Kind regards,
_______________________________________________
tools-l10n mailing list
[email protected]
https://lists.mozilla.org/listinfo/tools-l10n