Correct Fluent functions with invalid parameters (`maxFractionalUnits` in `NUMBER()`, `hour12` in `DATETIME()`)
Categories
(Firefox :: General, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox164 | --- | fixed |
People
(Reporter: flod, Assigned: flod)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Some Fluent messages call NUMBER() with maxFractionalUnits: 2, which is not a valid option. Both the Rust (fluent-bundle) and JavaScript implementations silently ignore unknown options, so these values are formatted with the default of up to 3 fraction digits instead of the intended 2.
Filing here since this happens in both devtools and browser.
| Assignee | ||
Comment 1•1 day ago
|
||
On second thoughts, since this needs code changes and review from code owners, moving to Firefox::General.
| Assignee | ||
Comment 2•1 day ago
•
|
||
Found another: hour12 in DATETIME().
https://searchfox.org/firefox-main/rev/04739ed73236cc66af22c18efbf8451012af2241/intl/l10n/rust/fluent-ffi/src/builtins.rs#255-297
| Assignee | ||
Comment 3•1 day ago
|
||
maxFractionalUnits isn't a NUMBER() option, so it was silently ignored and
values were formatted with up to 3 decimals instead of 2. It's replaced with
maximumFractionDigits.
Similarly, hour12 isn't a supported DATETIME() option, so about:unloads
timestamps used the locale's default hour cycle instead of a 24-hour clock.
It's replaced with hourCycle: "h23".
The migration fixes both options in existing translations too.
Comment 5•1 day ago
|
||
| bugherder | ||
Description
•