Hook up localized messages.json to website

Right now we use the navigator language to determine localization and
replace the website contents with translated strings.
This commit is contained in:
Cecylia Bocovich 2019-10-08 18:00:43 -04:00
parent 9140c7648c
commit f6517f60ce
3 changed files with 65 additions and 2 deletions

View file

@ -94,6 +94,8 @@ task('build', 'build the snowflake proxy', function() {
execSync(`cp -r ${STATIC}/ ${outDir}/`);
copyTranslations(outDir);
concatJS(outDir, 'badge', 'embed.js', availableLangs());
writeFileSync(`${outDir}/index.js`, availableLangs(), 'utf8');
execSync(`cat ${STATIC}/index.js >> ${outDir}/index.js`);
console.log('Snowflake prepared.');
});