diff --git a/lib/write-translations.js b/lib/write-translations.js index 24c46f1514..d8a0f4bc13 100644 --- a/lib/write-translations.js +++ b/lib/write-translations.js @@ -74,6 +74,20 @@ function execute() { }); }); + files = glob.sync(CWD + "/versioned_sidebars/*"); + files.forEach(file => { + if (!file.endsWith("-sidebar.json")) { + return; + } + sidebarContent = JSON.parse(fs.readFileSync(file, "utf8")); + Object.keys(sidebarContent).forEach(sb => { + const categories = sidebarContent[sb]; + Object.keys(categories).forEach(category => { + translations["localized-strings"][category] = category; + }); + }); + }); + /* go through pages to look for text inside translate tags */ files = glob.sync(CWD + "/pages/en/**"); files.forEach(file => {