I've migrated from Angular@5, @ngx-translate@9, ngx-translate-messageformat-compiler@3 and messageformat@1 to Angular@6, @ngx-translate@10, ngx-translate-messageformat-compiler@4 and messageformat@2, and translations strings that were working fine before now throws an error:
TypeError: Cannot read property 'toString' of undefined
at _stringify (runtime.js:97)
at _stringify (runtime.js:103)
at Runtime.toString (runtime.js:118)
at MessageFormat.compile (messageformat.js:343)
at TranslateMessageFormatCompiler.compileTranslations (ngx-translate-messageformat-compiler.js:25)
This is an example string: "Send {count} bid change recommendation{count, plural, =1{} other{s}}"
I've check the messageformat docs and seems there's nothing wrong here, I've even ran their migration tool on it to be sure.
Note that if I remove the {count, plural, =1{} other{s}} part, the compiler works fine.
Note that reverting back to messageformat@1 make it work, so it might be something that changed in their API that's not properly supported in this compiler?
I've migrated from Angular@5, @ngx-translate@9, ngx-translate-messageformat-compiler@3 and messageformat@1 to Angular@6, @ngx-translate@10, ngx-translate-messageformat-compiler@4 and messageformat@2, and translations strings that were working fine before now throws an error:
This is an example string:
"Send {count} bid change recommendation{count, plural, =1{} other{s}}"
I've check the messageformat docs and seems there's nothing wrong here, I've even ran their migration tool on it to be sure.
Note that if I remove the
{count, plural, =1{} other{s}}
part, the compiler works fine.Might be related to https://github.com/lephyrus/ngx-translate-messageformat-compiler/issues/27
Note that reverting back to messageformat@1 make it work, so it might be something that changed in their API that's not properly supported in this compiler?