"Message can not be parsed" warning on specific locale
See original GitHub issueEnvironment
- Ember Version: 3.10.1
- Ember CLI Version: 3.10.1
- Ember Intl Version: 3.5.2
Steps to Reproduce
I have ypk-us-ak
locale (stands for Yupik lang) in my app. But for some reason I get warning in build time:
WARNING: [ember-intl] ypk-us-ak: "dayCount" message can not be parsed: Cannot read property 'indexOf' of undefined
NOTE: it happens only if pluralization is involved. Translation works, despite of warning.
Repo with replication: https://github.com/yratanov/intl-bug
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (13 by maintainers)
Top Results From Across the Web
The specified value cannot be parsed, or is out of range when ...
When I get my object I format a number with a pipe but it returns this warning and the value isn't displayed. If...
Read more >MessageFormat (Java Platform SE 7 ) - Oracle Help Center
MessageFormat provides a means to produce concatenated messages in a language-neutral way. Use this to construct messages displayed for end users.
Read more >Language Server Extension Guide - Visual Studio Code
Learn how to create Language Servers to provide rich language features in Visual Studio Code.
Read more >Troubleshooting error log messages in Microsoft Outlook ...
This error message indicates that natural language support for Outlook Mobile Manager cannot be loaded successfully. This error message may occur if there ......
Read more >Introduction to readr
Each column of strings is parsed into a vector of a more specific type. ... parse_factor() will generate a warning if a value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yratanov @maxymczech it appears in both of your scenarios these are invalid locales. Surprised there isn’t warnings that this is invalid - may need to fix that bug separately.
https://github.com/unicode-cldr/cldr-core/blob/34.0.0/availableLocales.json
Also, we should filter out invalid locales when validating messages at build time. https://github.com/ember-intl/ember-intl/blob/d6973ebb100611363ad16c27be4b92a28a848a9a/lib/broccoli/translation-reducer/utils/validate-message.js#L33-L47
I now warn and skip message validation for invalid/unknown language codes. Will be versioned in 5.1.1. Thanks