Skip to content
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

Error: E_MISSING_MESSAGE: Missing required message content for message with variables. #37

Open
lidanbj opened this issue Jan 10, 2017 · 1 comment

Comments

@lidanbj
Copy link

lidanbj commented Jan 10, 2017

I came across bellow message.
Error: E_MISSING_MESSAGE: Missing required message content hi, {0} when run UTs with Karma.
In karma I use react-globalize-webpack-plugins for webpack to build. as bellow

plugins: [
new GlobalizePlugin({
production: false,
developmentLocale: 'en',
supportedLocales: ['en'],
messages: 'src/nls/locales/[locale].json',
writeMessages: false,
output: 'i18n/[locale].js'
}),
],

Code to call :
Globalize.messageFormatter('hi, {0}')("dear");

when run UT the error message at the top would returned. The issue would not happen for these key which does not have variables. like

Globalize.messageFormatter('hi)();

it seems the react-webpack-plugin would translate hi,{0} to hi,(0):hi,{0} . Not sure if it is the reason and how to avoid it.

@jksmithing
Copy link

jksmithing commented Apr 11, 2018

I'm seeing this too, but only when using globalize@1.4.0-alpha.2. Works with 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants