jeresig / i18n-node-2

Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
MIT License
507 stars 79 forks source link

i18n should be silent by default #113

Closed e-compton closed 6 years ago

e-compton commented 6 years ago

https://github.com/jeresig/i18n-node-2/blob/34bb8950e5af6ccbb31f2be8f10ee487e4c70ab8/i18n.js#L192

Hi, I noticed you're printing directly to the console when in devMode. This can cause spam for those working with the module.

It might be a better idea to use debug, it will only print when the DEBUG environment variable is set to a particular value. This was also used in the previous i18n.

gjuchault commented 6 years ago

Hi,

Having not so much time these days, while I totally agree on the fact that we should use debug or some proper logging function, I can't implement it; but I'd merge a PR for sure ;)

Thanks

e-compton commented 6 years ago

Awesome, I've made the changes sent a pull request