mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
* chore: convert rendering tests to es6 * chore: fix cjs config usage * chore: fix cjs config usage * chore: fix verify translations * chore: babel and jest es6 * chore: aw cjs * chore: aw cjs * chore: aw cjs * chore: fix path
33 lines
717 B
JavaScript
33 lines
717 B
JavaScript
const vars = require('../apis/locale/all');
|
|
|
|
const languages = [
|
|
'en-US',
|
|
'it-IT',
|
|
'zh-CN',
|
|
'zh-TW',
|
|
'ko-KR',
|
|
'de-DE',
|
|
'sv-SE',
|
|
'es-ES',
|
|
'pt-BR',
|
|
'ja-JP',
|
|
'fr-FR',
|
|
'nl-NL',
|
|
'tr-TR',
|
|
'pl-PL',
|
|
'ru-RU',
|
|
];
|
|
|
|
Object.keys(vars).forEach((key) => {
|
|
const supportLanguagesForString = Object.keys(vars[key].locale);
|
|
if (supportLanguagesForString.indexOf('en-US') === -1) {
|
|
// en-US must exist
|
|
throw new Error(`String '${vars[key].id}' is missing value for 'en-US'`);
|
|
}
|
|
for (let i = 0; i < languages.length; i++) {
|
|
if (supportLanguagesForString.indexOf(languages[i]) === -1) {
|
|
console.warn(`String '${vars[key].id}' is missing value for '${languages[i]}'`);
|
|
}
|
|
}
|
|
});
|