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
Please note that there's a similar report in #1549, but a different aspect is observed there and eventually fixed.
馃悰 Bug Report
The "save missing" feature doesn't work properly for pluralized messages - it calls the missingKeyHandler (or backendConnector.saveMissing) once for every plural form, but passes the same default value to all even if there are proper default values per plural form defined in translation call options.
The pluralized default values, when provided (e.g. { default_one: 'singular', default_other: 'plural' }), should each be supplied to the missing key handling logic with the respective keys (see Expected section above). There's no sensible reason to use the "currently used" default (based on count) for all the plural forms.
Your Environment
runtime version: Google Chrome Version 96.0.4664.55 (Official Build) (x86_64)
i18next version: 21.5.5
os: Mac OS Monterey Version 12.0.1 (21A559)
The text was updated successfully, but these errors were encountered:
Please note that there's a similar report in #1549, but a different aspect is observed there and eventually fixed.
馃悰 Bug Report
The "save missing" feature doesn't work properly for pluralized messages - it calls the
missingKeyHandler
(orbackendConnector.saveMissing
) once for every plural form, but passes the same default value to all even if there are proper default values per plural form defined in translation call options.Steps
Using the following
init
optionscall
Actual
The following is logged:
Expected
The following should be logged instead:
Notes
The above seems to be expected in the source code (note the "ignored" comment in test), but without any documentation or explanation.
To Reproduce
CodeSandbox demo (open console and observe the logged output)
Expected behavior
The pluralized default values, when provided (e.g.
{ default_one: 'singular', default_other: 'plural' }
), should each be supplied to the missing key handling logic with the respective keys (see Expected section above). There's no sensible reason to use the "currently used" default (based oncount
) for all the plural forms.Your Environment
The text was updated successfully, but these errors were encountered: