Skip to content

Commit

Permalink
feat(messageformat): backward compat parsing
Browse files Browse the repository at this point in the history
current (3.x) validates any msg while compiling. Disabled as per https://messageformat.github.io/messageformat/MessageFormat#disablePluralKeyChecks__anchor

Closes #325, #327, #398
  • Loading branch information
mashpie committed Oct 23, 2019
1 parent 1f6f10e commit 0e7b67a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ module.exports = (function() {
mf = MessageformatInstanceForLocale[targetLocale];
} else {
mf = new Messageformat(targetLocale);

// @see https://messageformat.github.io/messageformat/MessageFormat#disablePluralKeyChecks__anchor
mf.disablePluralKeyChecks();
mf.compiledFunctions = {};
MessageformatInstanceForLocale[targetLocale] = mf;
}
Expand Down

0 comments on commit 0e7b67a

Please sign in to comment.