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
Do not blow up the whole page if a variable is missing ? #1853
Comments
Hi, @gzurbach. Thanks for providing your feedback. The error message is coming from For export function onFormatjsIntlError(error: IntlError): void {
switch (error.code) {
+ case IntlErrorCode.FORMAT_ERROR: {
+ // Do nothing
+ break;
+ }
+
case IntlErrorCode.MISSING_TRANSLATION: {
// Do nothing
break;
}
default: {
throw error;
}
}
} If you are on a version between I don't know yet what the default for error handling for |
Thank you for your thorough response, @ijlee2. I appreciate it. I should clarify that I am currently running I prefer not to resort to cloning or branching the library for this particular issue. My intention in reaching out was more of a suggestion for potential inclusion in a future version of The proposal:
Thank you for your consideration! |
This issue happens to me all the time and I wonder if it should be that way.
If I declare a string that contains a variable, but for any reason the variable is not provided,
ember-intl
throws an error and the entire rendering of the page breaks:I can see the behavior being desirable in development builds, but in production? It seems overkill. A simple warning would be enough.
We handle 13 locales and download translations asynchronously, which can sometimes result in out-of-sync translations lasting for several days. Consider a scenario where we make a code change to eliminate a variable from a string. We are unable to deploy the change until that variable has been removed from every locale. Otherwise, the page won't render properly in any language where that variable remains present.
Is that something we could consider changing?
The text was updated successfully, but these errors were encountered: