@etsoo/appscript 1.4.2 → 1.4.3
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/cjs/i18n/en.d.ts +2 -2
- package/lib/cjs/i18n/en.js +37 -2
- package/lib/cjs/i18n/en.json +227 -0
- package/lib/cjs/i18n/zh-Hans.json +227 -0
- package/lib/cjs/i18n/zh-Hant.json +226 -0
- package/lib/cjs/i18n/zhHans.d.ts +2 -2
- package/lib/cjs/i18n/zhHans.js +37 -2
- package/lib/cjs/i18n/zhHant.d.ts +2 -2
- package/lib/cjs/i18n/zhHant.js +37 -2
- package/lib/mjs/i18n/en.d.ts +2 -2
- package/lib/mjs/i18n/en.js +14 -2
- package/lib/mjs/i18n/en.json +227 -0
- package/lib/mjs/i18n/zh-Hans.json +227 -0
- package/lib/mjs/i18n/zh-Hant.json +226 -0
- package/lib/mjs/i18n/zhHans.d.ts +2 -2
- package/lib/mjs/i18n/zhHans.js +14 -2
- package/lib/mjs/i18n/zhHant.d.ts +2 -2
- package/lib/mjs/i18n/zhHant.js +14 -2
- package/package.json +1 -1
- package/src/i18n/en.ts +15 -4
- package/src/i18n/zhHans.ts +15 -4
- package/src/i18n/zhHant.ts +15 -4
- package/lib/cjs/i18n/i18nResources.d.ts +0 -3
- package/lib/cjs/i18n/i18nResources.js +0 -43
- package/lib/mjs/i18n/i18nResources.d.ts +0 -3
- package/lib/mjs/i18n/i18nResources.js +0 -16
- package/src/i18n/i18nResources.ts +0 -19
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export function i18nResourceCreator(file, resources) {
|
|
2
|
-
return async () => {
|
|
3
|
-
const [r1, r2] = await Promise.all([
|
|
4
|
-
import(file),
|
|
5
|
-
new Promise((resolve) => {
|
|
6
|
-
if (typeof resources === 'object') {
|
|
7
|
-
resolve(resources);
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
resources().then((result) => resolve(result));
|
|
11
|
-
}
|
|
12
|
-
})
|
|
13
|
-
]);
|
|
14
|
-
return { ...r1, ...r2 };
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
|
|
3
|
-
export type i18nResource = object | (() => Promise<object>);
|
|
4
|
-
|
|
5
|
-
export function i18nResourceCreator(file: string, resources: i18nResource) {
|
|
6
|
-
return async () => {
|
|
7
|
-
const [r1, r2] = await Promise.all([
|
|
8
|
-
import(file),
|
|
9
|
-
new Promise<object>((resolve) => {
|
|
10
|
-
if (typeof resources === 'object') {
|
|
11
|
-
resolve(resources);
|
|
12
|
-
} else {
|
|
13
|
-
resources().then((result) => resolve(result));
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
]);
|
|
17
|
-
return { ...r1, ...r2 } as DataTypes.StringRecord;
|
|
18
|
-
};
|
|
19
|
-
}
|