mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 18:52:23 +02:00
refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027)
* refactor(content-docs): deduplicate types, JSDoc for some APIs * little refactor
This commit is contained in:
parent
b842197ac6
commit
2bcac29cd4
38 changed files with 715 additions and 521 deletions
|
@ -245,7 +245,7 @@ function translateSidebars(
|
|||
function getVersionTranslationFiles(version: LoadedVersion): TranslationFiles {
|
||||
const versionTranslations: TranslationFileContent = {
|
||||
'version.label': {
|
||||
message: version.versionLabel,
|
||||
message: version.label,
|
||||
description: `The label for version ${version.versionName}`,
|
||||
},
|
||||
};
|
||||
|
@ -275,8 +275,7 @@ function translateVersion(
|
|||
translationFiles[getVersionFileName(version.versionName)]!.content;
|
||||
return {
|
||||
...version,
|
||||
versionLabel:
|
||||
versionTranslations['version.label']?.message ?? version.versionLabel,
|
||||
label: versionTranslations['version.label']?.message ?? version.label,
|
||||
sidebars: translateSidebars(version, versionTranslations),
|
||||
// docs: translateDocs(version.docs, versionTranslations),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue