- fix: an error thrown by a load callback or a listener (the callback of
init,changeLanguage,loadNamespacesorloadLanguages, or alanguageChanged/loadedlistener) is no longer handed back to the backend connector as if the read had failed. With a backend whosereadreturns a value or a promise, the connector got that error a second time: the namespace that had loaded was marked as failed,failedLoadingwas emitted with your error and the count of running reads dropped to -1. The error now reaches your app: it is thrown from the call that started the load for areadthat returns a value, and it is an unhandled rejection for areadthat returns a promise, which ends a Node.js process unless you handleunhandledRejection. Thanks @SudeepGowda55 (#2477) - fix: when a load callback throws, the other callbacks waiting for the same namespaces are still called and the
loadedevent is still emitted, and the error is thrown on after that. A secondloadNamespaces()for the same namespace never called back before. - fix:
addResourceBundle(lng, ns, resources, true, true)overwrites numbers and booleans too. Only strings were replaced, so{ n: 0 }stayed 0 after adding{ n: 5 }, and adding an object where the bundle had a number, boolean or null threwCannot create property ... on number, also withoutoverwrite. Withoverwrite, a number, boolean or null now also replaces a nested object, as a string already did. Thanks @SudeepGowda55 (#2476) - fix: with
keySeparator: false, a namespace separator inside the key after the namespace is kept.t('common:errors:required')looked up'errorsfalserequired'instead of the flat key'errors:required'that i18next-cli extracts (also for a selector like$ => $.common['errors:required']), and reported the missing key under that name. This dates back to 11.3. Thanks @SudeepGowda55 (#2478)