@docusaurus/plugin-content-docs 0.0.0-4797 → 0.0.0-4800
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/translations.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import type { LoadedContent } from './types';
|
|
8
|
-
import type { TranslationFile
|
|
9
|
-
export declare function getLoadedContentTranslationFiles(loadedContent: LoadedContent):
|
|
8
|
+
import type { TranslationFile } from '@docusaurus/types';
|
|
9
|
+
export declare function getLoadedContentTranslationFiles(loadedContent: LoadedContent): TranslationFile[];
|
|
10
10
|
export declare function translateLoadedContent(loadedContent: LoadedContent, translationFiles: TranslationFile[]): LoadedContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4800",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/logger": "0.0.0-
|
|
28
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
29
|
-
"@docusaurus/utils": "0.0.0-
|
|
30
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4800",
|
|
27
|
+
"@docusaurus/logger": "0.0.0-4800",
|
|
28
|
+
"@docusaurus/mdx-loader": "0.0.0-4800",
|
|
29
|
+
"@docusaurus/utils": "0.0.0-4800",
|
|
30
|
+
"@docusaurus/utils-validation": "0.0.0-4800",
|
|
31
31
|
"combine-promises": "^1.1.0",
|
|
32
32
|
"fs-extra": "^10.0.1",
|
|
33
33
|
"import-fresh": "^3.3.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"webpack": "^5.70.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
43
|
-
"@docusaurus/types": "0.0.0-
|
|
42
|
+
"@docusaurus/module-type-aliases": "0.0.0-4800",
|
|
43
|
+
"@docusaurus/types": "0.0.0-4800",
|
|
44
44
|
"@types/js-yaml": "^4.0.5",
|
|
45
45
|
"@types/picomatch": "^2.3.0",
|
|
46
46
|
"commander": "^5.1.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=14"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d38da3dea586e001b552facb59e41f2547a38cac"
|
|
60
60
|
}
|
|
@@ -647,13 +647,11 @@ declare module '@docusaurus/plugin-content-docs/client' {
|
|
|
647
647
|
sidebars?: {[sidebarId: string]: GlobalSidebar};
|
|
648
648
|
};
|
|
649
649
|
|
|
650
|
-
export type GlobalSidebarLink = {
|
|
651
|
-
label: string;
|
|
652
|
-
path: string;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
650
|
export type GlobalSidebar = {
|
|
656
|
-
link?:
|
|
651
|
+
link?: {
|
|
652
|
+
label: string;
|
|
653
|
+
path: string;
|
|
654
|
+
};
|
|
657
655
|
// ... we may add other things here later
|
|
658
656
|
};
|
|
659
657
|
export type GlobalPluginData = {
|
package/src/translations.ts
CHANGED
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
import type {
|
|
23
23
|
TranslationFileContent,
|
|
24
24
|
TranslationFile,
|
|
25
|
-
TranslationFiles,
|
|
26
25
|
TranslationMessage,
|
|
27
26
|
} from '@docusaurus/types';
|
|
28
27
|
import {mergeTranslations} from '@docusaurus/utils';
|
|
@@ -242,7 +241,7 @@ function translateSidebars(
|
|
|
242
241
|
);
|
|
243
242
|
}
|
|
244
243
|
|
|
245
|
-
function getVersionTranslationFiles(version: LoadedVersion):
|
|
244
|
+
function getVersionTranslationFiles(version: LoadedVersion): TranslationFile[] {
|
|
246
245
|
const versionTranslations: TranslationFileContent = {
|
|
247
246
|
'version.label': {
|
|
248
247
|
message: version.label,
|
|
@@ -283,7 +282,7 @@ function translateVersion(
|
|
|
283
282
|
|
|
284
283
|
function getVersionsTranslationFiles(
|
|
285
284
|
versions: LoadedVersion[],
|
|
286
|
-
):
|
|
285
|
+
): TranslationFile[] {
|
|
287
286
|
return versions.flatMap(getVersionTranslationFiles);
|
|
288
287
|
}
|
|
289
288
|
function translateVersions(
|
|
@@ -295,7 +294,7 @@ function translateVersions(
|
|
|
295
294
|
|
|
296
295
|
export function getLoadedContentTranslationFiles(
|
|
297
296
|
loadedContent: LoadedContent,
|
|
298
|
-
):
|
|
297
|
+
): TranslationFile[] {
|
|
299
298
|
return getVersionsTranslationFiles(loadedContent.loadedVersions);
|
|
300
299
|
}
|
|
301
300
|
export function translateLoadedContent(
|