next-translate icon indicating copy to clipboard operation
next-translate copied to clipboard

Missing namespace breaks all namespaces

Open peyronoscar opened this issue 2 years ago • 3 comments

When not including one of the namespaces specified in i18n.js all other namespaces break without appropriate warnings in the console. Instead of notifying about the missing namespace, missingKeyLogger(_a) is fired in transCore.js. Shouldn't this be handled in another way?

peyronoscar avatar May 09 '22 18:05 peyronoscar

@peyronoscar feel free to PR to fix this! Thanks to report it!

aralroca avatar May 13 '22 12:05 aralroca

Errors thrown in a custom loadLocaleFrom, which can happen when a namespace is missing, also cause all namespaces to silently break. https://github.com/vinissimus/next-translate/blob/49f580c6d292712a0720a104de3b487e7c11d4ae/src/loadNamespaces.tsx#L48

TechnologicNick avatar Jun 29 '22 15:06 TechnologicNick

@TechnologicNick feel free to PR

aralroca avatar Feb 20 '23 16:02 aralroca