@docusaurus/theme-translations 0.0.0-5043 → 0.0.0-5048
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/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,wDAAwB;AACxB,gEAA0B;AAG1B,SAAS,wBAAwB;IAC/B,OAAO,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,kDAAkD;AAClD,SAAgB,2BAA2B,CAAC,MAAc;IACxD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,wEAAwE;IACxE,yBAAyB;IACzB,8EAA8E;IAC9E,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,eAAe;IAC9D,OAAO;QACL,2EAA2E;QAC3E,uCAAuC;QACvC,MAAM;QACN,oBAAoB;QACpB,GAAG,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,wDAAwB;AACxB,gEAA0B;AAG1B,SAAS,wBAAwB;IAC/B,OAAO,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,kDAAkD;AAClD,SAAgB,2BAA2B,CAAC,MAAc;IACxD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,wEAAwE;IACxE,yBAAyB;IACzB,8EAA8E;IAC9E,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,eAAe;IAC9D,OAAO;QACL,2EAA2E;QAC3E,uCAAuC;QACvC,MAAM;QACN,oBAAoB;QACpB,GAAG,eAAe,CAAC,QAAS,IAAI,eAAe,CAAC,MAAO,EAAE;QACzD,wBAAwB;QACxB,GAAG,eAAe,CAAC,QAAS,IAAI,eAAe,CAAC,MAAO,EAAE;QACzD,cAAc;QACd,eAAe,CAAC,QAAS;KAC1B,CAAC;AACJ,CAAC;AAjBD,kEAiBC;AAED,oEAAoE;AAC7D,KAAK,UAAU,kCAAkC,CAAC,EACvD,OAAO,GAAG,wBAAwB,EAAE,EACpC,MAAM,EACN,IAAI,GAKL;IACC,MAAM,YAAY,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAEzD,kDAAkD;IAClD,mCAAmC;IACnC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;QACtC,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,OAAO,CAAC,CAAC;QAEpE,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YACjC,OAAO,kBAAE,CAAC,QAAQ,CAAC,QAAQ,CAA8B,CAAC;SAC3D;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAtBD,gFAsBC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"theme.CodeBlock.copied": "复制成功",
|
|
5
5
|
"theme.CodeBlock.copy": "复制",
|
|
6
6
|
"theme.CodeBlock.copyButtonAriaLabel": "复制代码到剪贴板",
|
|
7
|
-
"theme.CodeBlock.wordWrapToggle": "
|
|
7
|
+
"theme.CodeBlock.wordWrapToggle": "切换自动换行",
|
|
8
8
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打开/收起侧边栏菜单「{label}」",
|
|
9
9
|
"theme.ErrorPageContent.title": "页面已崩溃。",
|
|
10
10
|
"theme.ErrorPageContent.tryAgain": "重试",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"theme.CodeBlock.copied": "複製成功",
|
|
5
5
|
"theme.CodeBlock.copy": "複製",
|
|
6
6
|
"theme.CodeBlock.copyButtonAriaLabel": "複製代碼至剪貼簿",
|
|
7
|
-
"theme.CodeBlock.wordWrapToggle": "
|
|
7
|
+
"theme.CodeBlock.wordWrapToggle": "切換自動換行",
|
|
8
8
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打開/收起側邊欄選單「{label}」",
|
|
9
9
|
"theme.ErrorPageContent.title": "此頁已當機。",
|
|
10
10
|
"theme.ErrorPageContent.tryAgain": "重試",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-translations",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5048",
|
|
4
4
|
"description": "Docusaurus theme translations.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"tslib": "^2.4.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/logger": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-5048",
|
|
27
|
+
"@docusaurus/logger": "0.0.0-5048",
|
|
28
28
|
"lodash": "^4.17.21"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=14"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f5680d2f2633fbd6594972ae1f4c1ddb1467f9ac"
|
|
34
34
|
}
|
package/src/index.ts
CHANGED
|
@@ -25,9 +25,9 @@ export function codeTranslationLocalesToTry(locale: string): string[] {
|
|
|
25
25
|
// unresolved except for simply locales
|
|
26
26
|
locale,
|
|
27
27
|
// "zh-CN" / "pt-BR"
|
|
28
|
-
`${maximizedLocale.language}-${maximizedLocale.region}`,
|
|
28
|
+
`${maximizedLocale.language!}-${maximizedLocale.region!}`,
|
|
29
29
|
// "zh-Hans" / "pt-Latn"
|
|
30
|
-
`${maximizedLocale.language}-${maximizedLocale.script}`,
|
|
30
|
+
`${maximizedLocale.language!}-${maximizedLocale.script!}`,
|
|
31
31
|
// "zh" / "pt"
|
|
32
32
|
maximizedLocale.language!,
|
|
33
33
|
];
|
|
@@ -51,7 +51,7 @@ export async function readDefaultCodeTranslationMessages({
|
|
|
51
51
|
const filePath = path.resolve(dirPath, localeToTry, `${name}.json`);
|
|
52
52
|
|
|
53
53
|
if (await fs.pathExists(filePath)) {
|
|
54
|
-
return fs.readJSON(filePath)
|
|
54
|
+
return fs.readJSON(filePath) as Promise<CodeTranslations>;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|