Move references to languages and translated strings out of siteConfig.js into new translation.js module

This commit is contained in:
Frank Li 2017-07-11 17:03:27 -07:00
parent 48916d9f39
commit 099a13a264
9 changed files with 52 additions and 112 deletions

View file

@ -76,28 +76,4 @@ const siteConfig = {
/* gaTrackingId: "" */
};
/* DO NOT EDIT BELOW THIS LINE */
const fs = require("fs");
let languages;
if (fs.existsSync("./languages.js")) {
languages = require("./languages.js");
} else {
languages = [
{
enabled: true,
name: "English",
tag: "en"
}
];
}
const enabledLanguages = languages.filter(lang => lang.enabled);
siteConfig["languages"] = enabledLanguages;
/* INJECT LOCALIZED FILES BEGIN */
/* INJECT LOCALIZED FILES END */
module.exports = siteConfig;