mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Merge branch 'master' into versioning
This commit is contained in:
commit
9ddd2f5ea4
33 changed files with 702 additions and 90 deletions
6
lib/write-translations.js
Normal file → Executable file
6
lib/write-translations.js
Normal file → Executable file
|
@ -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("/[^/]*$"), ""));
|
||||
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue