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
I'm trying to pass a variable ($week) from my application, to a selector as an argument.
week-nb = Number: {$week}week-name = {-ordinal(num: $week, gender: "feminine") } semaine-ordinal = {$num-> [1] {$gender-> *[default] premier [feminine] première} [2] deuxième [3] troisième *[other] {$num}}
The week-nb identifier work well, it returns Number: 1 as expected.
But week-name returns nothing, instead of "première semaine".
// From the JS codeconstweekNumber=bundle.getMessage("week-nb");if(weekNumber.value){constweekNb=bundle.formatPattern(weekNumber.value,{week: 1,});console.log(weekNb);// Outputs: Number: 1}constweekNameMessage=bundle.getMessage("week-name");if(weekNameMessage.value){constweekName=bundle.formatPattern(weekNameMessage.value,{week: 1,});console.log(weekName);// Do not outputs anything}
Am I missing something? Is there any limitations?
I would like to keep my -ordinal selector separated (to stay DRY), because it is required at several places in my locale file.
The text was updated successfully, but these errors were encountered:
Since I still haven't had any answers after a few months, and because it might be only a Fluent syntax issue (rather than a JavaScript issue), I've reposted this issue on the main Fluent repo: projectfluent/fluent#351
I'm trying to pass a variable (
$week
) from my application, to a selector as an argument.The
week-nb
identifier work well, it returnsNumber: 1
as expected.But
week-name
returns nothing, instead of "première semaine".Am I missing something? Is there any limitations?
I would like to keep my
-ordinal
selector separated (to stay DRY), because it is required at several places in my locale file.The text was updated successfully, but these errors were encountered: