mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Move references to languages and translated strings out of siteConfig.js into new translation.js module
This commit is contained in:
parent
48916d9f39
commit
099a13a264
9 changed files with 52 additions and 112 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue