You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do, the meteor log throws the following error:
warn: [msgfmt:extracts] { error_field_invalid: "email" } in imports/ui/pages/accounts/profile.js:375 replaces DUP_KEY
And if I check the database, the mfString with key 'error_field_invalid' has 'email' as its 'text' attribute. I'm assuming that the regular expression tasked with parsing the javascript files is having trouble recognizing parameters.
Cheers
The text was updated successfully, but these errors were encountered:
Indeed, the regexp sees the string literal and assumes it's a text value instead of a parameter. My workaround was to assign the parameter object previously like so:
That's annoying :) Since this would be hard to fix in regexp, maybe this will help.
v2.0.0-preview.24 (2017-05-04)
Added
Allow mf('key', 'text', params) in addition to the regular mf('key', params, 'text') Previously, mf('key', 'text') was accepted
too, but there was no way to provide params in this ordering. Now if
the second argument is a String, the second and third arguments are swapped.
(Extractor having trouble with parameters in javascript #253).
Hi,
I have a line like this in my javascript code:
mf('error_field_invalid', { field: 'phone' }, 'Invalid {field}')
I then use it again as such:
mf('error_field_invalid', { field: 'email' })
When I do, the meteor log throws the following error:
warn: [msgfmt:extracts] { error_field_invalid: "email" } in imports/ui/pages/accounts/profile.js:375 replaces DUP_KEY
And if I check the database, the mfString with key 'error_field_invalid' has 'email' as its 'text' attribute. I'm assuming that the regular expression tasked with parsing the javascript files is having trouble recognizing parameters.
Cheers
The text was updated successfully, but these errors were encountered: