-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@s-ui/i18n: Allow monitorize missing translation keys #1731
Comments
I would say the second approach. But Maybe we can avoid log warnings in production. |
2️⃣ too |
@oriolpuig, great job, my KUDOS 😍 I agree with you and also with @carlosvillu. I think it's important for the teams to detect translation issues but maybe we could avoid show warnings on production to try to keep the production console cleaner. So I prefer 2️⃣ On the other hand, I understand that you want to avoid using @s-ui/i18n package and only make a wrapper of node-polyglot, am I right? |
No, we can't override the current version of What I'm proposing is picking this Thanks for your Kudos! |
Yes, actually it's not possible to pass a flag to let us skip this warning, but we can do it with a hack in our portals 👀 by doing this Reviewing your proposals, we can add a new prop cc/ @jelowin |
excellent contribution, @oriolpuig ! Not sure if I'm missing some context here and perhaps my comment doesn't make sense at all but... if the idea is to capture those error messages from |
Hello @jordevo, thanks for your time! First of all, as a developer, I think warnings do not make sense to be displayed in production. To get it, we can add a specific flag (for example: But, why do I suggest allowing us to monitor those warnings? I have 2 scenarios in mind:
For those 2 reasons, I suggest to enable this feature and empower teams to monitor uncontrolled translations. Next Monday we can discuss it in a quick call with some specific demos if you need it, and add here some screenshots to enforce this proposal. Have a nice weekend! ❤️ |
gotcha, @oriolpuig ! I'd even go for a third approach as you kind of point out in your response... 3️⃣ call does it make sense to you? |
Package
@s-ui/i18n@1
Description
A long time ago, we decided to create the
@s-ui/i18n
package by forking thenode-polyglot
npm library instead of wrapping it and getting the new library updates more easily than now. During this time, we have been iterating@s-ui/i18n
with some little customizations that now make it more difficult to update the version with the newnode-polyglot
one.One of the useful things the
node-polyglot
library has and we have not, is to allow@s-ui/i18n
consumers to use observability tools to track which translation key does not have a translation and find translation issues on the fly. Our library only writes aconsole.warn
to logo it into the client console browser.Steps to Reproduce
Missing
and you will se something like the image bellowExpected behavior: Allow
@s-ui/i18n
consumers to track when a translation key is missing. We have 3️⃣ approaches:console.warn
, as is onnode-polyglot
at this lineconsole.warn
at the same time.logMissingKey
to prevent writing theconsole.warn
.Warning
🙏🏻 Please, let me know which approach you like: 1️⃣ , 2️⃣ or 3️⃣ .
Current behavior: When a translation key is missing, a
console.warn
appears in the browser console.Additional Information
We can disable the
console.warn
to avoid printing those warnings on the browser console, but in my opinion is better to empower teams to track and detect the translation issues.The text was updated successfully, but these errors were encountered: