@docusaurus/theme-translations 0.0.0-4810 → 0.0.0-4813
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.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -1
package/lib/index.d.ts
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
import type { CodeTranslations } from '@docusaurus/types';
|
|
7
8
|
export declare function codeTranslationLocalesToTry(locale: string): string[];
|
|
8
9
|
export declare function readDefaultCodeTranslationMessages({ dirPath, locale, name, }: {
|
|
9
10
|
dirPath?: string;
|
|
10
11
|
locale: string;
|
|
11
12
|
name: string;
|
|
12
|
-
}): Promise<
|
|
13
|
-
[msgId: string]: string;
|
|
14
|
-
}>;
|
|
13
|
+
}): Promise<CodeTranslations>;
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAOxD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAepE;AAGD,wBAAsB,kCAAkC,CAAC,EACvD,OAAoC,EACpC,MAAM,EACN,IAAI,GACL,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAe5B"}
|
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;
|
|
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,8EAA8E;IAC9E,2FAA2F;IAC3F,IAAI,UAAU,CAAC,QAAQ,KAAK,MAAM,EAAE;QAClC,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,cAAc;QAC7D,oCAAoC;QACpC,OAAO;YACL,MAAM;YACN,GAAG,eAAe,CAAC,QAAQ,IAAI,eAAe,CAAC,MAAM,EAAE;YACvD,GAAG,eAAe,CAAC,QAAQ,IAAI,eAAe,CAAC,MAAM,EAAE;SACxD,CAAC;KACH;IACD,yDAAyD;IACzD,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,QAAS,CAAC,CAAC;AACxC,CAAC;AAfD,kEAeC;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,MAAM,WAAW,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACxD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAChC;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAvBD,gFAuBC"}
|
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-4813",
|
|
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.3.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/logger": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4813",
|
|
27
|
+
"@docusaurus/logger": "0.0.0-4813",
|
|
28
28
|
"lodash": "^4.17.21"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=14"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "6b8435cb317c3cc6dba4d4085ea9365fd699b8c0"
|
|
34
34
|
}
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import fs from 'fs-extra';
|
|
10
|
+
import type {CodeTranslations} from '@docusaurus/types';
|
|
10
11
|
|
|
11
12
|
function getDefaultLocalesDirPath(): string {
|
|
12
13
|
return path.join(__dirname, '../locales');
|
|
@@ -39,7 +40,7 @@ export async function readDefaultCodeTranslationMessages({
|
|
|
39
40
|
dirPath?: string;
|
|
40
41
|
locale: string;
|
|
41
42
|
name: string;
|
|
42
|
-
}): Promise<
|
|
43
|
+
}): Promise<CodeTranslations> {
|
|
43
44
|
const localesToTry = codeTranslationLocalesToTry(locale);
|
|
44
45
|
|
|
45
46
|
// Return the content of the first file that match
|