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
It would be helpful to be able to indicate what to do when a translation key couldn't be found. Currently it just returns an empty string, which is probably meant to to clog up a production website with warnings, and to keep junk (like keys) from appearing on the website.
But it would be helpful to know the difference between translation keys that are genuinely set to an empty string, and ones that are totally missing. Especially during development. Even on production it's helpful for translators to know which keys are missing.
Personally, I would say return the key when it doesn't exist. But perhaps returning undefined might work as well. Better yet, add an option (in the I18nProvider) to indicate what to do. Could be a callback function, or just a returnKeyNameWhenNotFound or something more elegant, or some other approach.
Currently not knowing why a translation is returning empty is kinda frustrating. More so because it appears to be hardcoded in such a way that there's no way to override this behaviour.
The text was updated successfully, but these errors were encountered:
It would be helpful to be able to indicate what to do when a translation key couldn't be found. Currently it just returns an empty string, which is probably meant to to clog up a production website with warnings, and to keep junk (like keys) from appearing on the website.
But it would be helpful to know the difference between translation keys that are genuinely set to an empty string, and ones that are totally missing. Especially during development. Even on production it's helpful for translators to know which keys are missing.
Personally, I would say return the key when it doesn't exist. But perhaps returning
undefined
might work as well. Better yet, add an option (in theI18nProvider
) to indicate what to do. Could be a callback function, or just areturnKeyNameWhenNotFound
or something more elegant, or some other approach.Currently not knowing why a translation is returning empty is kinda frustrating. More so because it appears to be hardcoded in such a way that there's no way to override this behaviour.
The text was updated successfully, but these errors were encountered: