mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
b123650988
1. checks the localization for a few reference languages for the nav bar 2. for our localized pages (splash, about, wedo2), it checks to see that there are locale strings, whether or not they're english (to make sure at least something is on the page).
21 lines
684 B
JavaScript
21 lines
684 B
JavaScript
/*
|
|
* spot check that each language has values for the string id keys on Splash page
|
|
* that are contained in English (i.e. make sure strings will show up, not ids")
|
|
*/
|
|
var tap = require('tap');
|
|
var languages = require('../../languages.json');
|
|
window = {};
|
|
require('../../intl/splash.intl.js');
|
|
|
|
tap.test('spotCheckSplashStrings', function (t) {
|
|
var isoCodes = Object.keys(languages);
|
|
var keysToCheck = Object.keys(window._messages['en']).sort();
|
|
for (var i in isoCodes) {
|
|
t.same(
|
|
Object.keys(window._messages[isoCodes[i]]).sort(),
|
|
keysToCheck,
|
|
'check Splash keys for language ' + isoCodes[i]
|
|
);
|
|
}
|
|
t.end();
|
|
});
|