Skip to content

Commit

Permalink
Rename sidebar.json to sidebars.json
Browse files Browse the repository at this point in the history
  • Loading branch information
deltice committed Aug 8, 2017
1 parent 4bc366f commit 4b96408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/server/readMetadata.js
Expand Up @@ -28,7 +28,7 @@ if (fs.existsSync(CWD + "/languages.js")) {
}

function readSidebar() {
const allSidebars = require(CWD + "/sidebar.json");
const allSidebars = require(CWD + "/sidebars.json");
const order = {};

Object.keys(allSidebars).forEach(sidebar => {
Expand Down
6 changes: 3 additions & 3 deletions lib/write-translations.js
Expand Up @@ -20,7 +20,7 @@ const path = require("path");
const siteConfig = require(CWD + "/siteConfig.js");
const babylon = require("babylon");
const traverse = require("babel-traverse").default;
const sidebar = require(CWD + "/sidebar.json");
const sidebars = require(CWD + "/sidebars.json");

function writeFileAndCreateFolder(file, content) {
mkdirp.sync(file.replace(new RegExp("/[^/]*$"), ""));
Expand Down Expand Up @@ -67,8 +67,8 @@ function execute() {
}

/* find sidebar category titles to translate */
Object.keys(sidebar).forEach(sb => {
const categories = sidebar[sb];
Object.keys(sidebars).forEach(sb => {
const categories = sidebars[sb];
Object.keys(categories).forEach(category => {
translations["localized-strings"][category] = category;
});
Expand Down

0 comments on commit 4b96408

Please sign in to comment.