Closed pronebird closed 4 years ago
i agree with this - if i could set a 'source' language and then say that i'm in that source language, it shouldn't need to warn me that translations are missing since the source IS the translation
debug
ging was enabled by default if process.env.NODE_ENV !== 'production
. I'm removing this to make it fully opt-in.
Okay now console warnings will only happen if debug
is explicitly set to true
. Available in v3.0.0.
Hi,
Gettext prints warnings to console notifying when it cannot find the translations. As you know, in Gettext community a lot of code relies on the source language, meaning that normally English (or any other base language) is a part of source code. Therefore when in development, Gettext prints a warning for every single translation in the source language due to the missing (In our case) English catalogue, but the keys themselves are the messages in the source language.
The current workaround is to explicitly disable
{debug: false}
option, and handle errors viaerror
event. But is this somewhat desired? I think that Gettext should not be touching the console whatsoever and let developers handle errors manually via theerror
event.What do you think?