mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
Add comments
This commit is contained in:
parent
df0f95e36f
commit
43ef3c8142
22 changed files with 114 additions and 62 deletions
|
@ -37,7 +37,7 @@ function execute() {
|
|||
"pages-strings": {}
|
||||
};
|
||||
|
||||
/* look through front matter of docs for titles and categories to translate */
|
||||
// look through markdown headers of docs for titles and categories to translate
|
||||
let files = glob.sync(CWD + "/../docs/**");
|
||||
files.forEach(file => {
|
||||
const extension = path.extname(file);
|
||||
|
@ -56,14 +56,14 @@ function execute() {
|
|||
}
|
||||
}
|
||||
});
|
||||
/* look through header links for text to translate */
|
||||
// look through header links for text to translate
|
||||
siteConfig.headerLinks.forEach(link => {
|
||||
if (link.label) {
|
||||
translations["localized-strings"][link.label] = link.label;
|
||||
}
|
||||
});
|
||||
|
||||
/* find sidebar category titles to translate */
|
||||
// find sidebar category titles to translate
|
||||
Object.keys(sidebars).forEach(sb => {
|
||||
const categories = sidebars[sb];
|
||||
Object.keys(categories).forEach(category => {
|
||||
|
@ -85,7 +85,7 @@ function execute() {
|
|||
});
|
||||
});
|
||||
|
||||
/* go through pages to look for text inside translate tags */
|
||||
// go through pages to look for text inside translate tags
|
||||
files = glob.sync(CWD + "/pages/en/**");
|
||||
files.forEach(file => {
|
||||
const extension = path.extname(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue