intl-polyfill: show a warning for unknown locales
See original GitHub issue_Edit: actual enhancement suggestion here: https://github.com/ember-intl/ember-intl/issues/573#issuecomment-390351334_
- I am on the latest ember-intl version
- I have searched the issues of this repo and believe that this is not a duplicate
Environment
- Ember Version: Ember 2.18.2
- Ember CLI Version: 2.18.2
- Ember Intl Version: 2.33.2
- Browser(s): n/a, build issue
- Node Version: 8.10.0
Steps to Reproduce
ember build --environment=production
Using this config/ember-intl.js
:
const env = require('./environment');
module.exports = function (environment) {
return {
locales: [
"de-de",
"el-gr",
"en-au",
"en-gb",
"en-us",
"no-no",
],
baseLocale: null,
autoPolyfill: true,
disablePolyfill: false,
publicOnly: true,
};
};
dist/assets/intl/locales/no-no.js
is not written to dist.
6 of the 37 locales in total are missed, but I condensed this code to show the general shape of the issue. Complete set of missing ones:
- iw-il
- no-no
- vi-vi
- zh-cn
- zh-hk
- zh-tw
I tried tracing in the node debugger, and I can see broccoli-cldr-data writing out a no.js file, but I am not sure what then takes that information and writes out the files in the dist/ folder.
I am willing to debug further, but need some pointers as to what to look for, and why a particular locale might be dropped.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Node: Cannot replace Intl to use IntlPolyfill - Stack Overflow
Because the Intl property of the global object is not writable (testing on Node 0.12.2): console.log(Object.getOwnPropertyDescriptor(global ...
Read more >48 answers on StackOverflow to the most popular Angular ...
I just want to GET a JSON list and show it in the view. ... WARNING: This will import all 50+ operators and...
Read more >How to Remove the Unknown Locale (QAA-LATN) Language
Your system may show the unknown locale (QAA-LATN) in the language ... Warning: Be very careful as editing the system's registry requires a ......
Read more >polyfill-library | Yarn - Package Manager
Returns a Promise which resolves to an Object which contains the canonicalised feature definitions filtered for UA. polyfillLibrary.getPolyfillString(opts).
Read more >Ubuntu 18.04: XAMPP 8.0.3 + Laravel 8.* + PHP 8.
Deprecation Notice + Unknown package has no name defined ... While trying to install Laravel 8, I got the following warning messages:.
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
I am still sorting through a solution, but I think I have something working where I modify the locales I set up in the
config/ember-intl.js
to match one that is in https://github.com/andyearnshaw/Intl.js/tree/master/locale-data/jsonp.As for what to do for others, I can see generating a warning that mentions the mismatched locale, and a pointer to the list of locales in https://github.com/andyearnshaw/Intl.js/tree/master/locale-data/jsonp as the ones that are supported.
Suggesting a warning vs an error, since other locales could work, and in my situation, I still wanted to build/deploy for those other locales while I sorted out the problem ones. But I understand if generating an error would be preferred. Technically the build did not succeed with the given inputs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.