@etsoo/appscript 1.4.1 → 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/app/CoreApp.d.ts +1 -1
- package/lib/cjs/app/CoreApp.js +2 -2
- package/lib/cjs/app/IApp.d.ts +1 -1
- 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/app/CoreApp.d.ts +1 -1
- package/lib/mjs/app/CoreApp.js +2 -2
- package/lib/mjs/app/IApp.d.ts +1 -1
- 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/app/CoreApp.ts +6 -3
- package/src/app/IApp.ts +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,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.i18nResourceCreator = void 0;
|
|
27
|
-
function i18nResourceCreator(file, resources) {
|
|
28
|
-
return async () => {
|
|
29
|
-
const [r1, r2] = await Promise.all([
|
|
30
|
-
Promise.resolve(`${file}`).then(s => __importStar(require(s))),
|
|
31
|
-
new Promise((resolve) => {
|
|
32
|
-
if (typeof resources === 'object') {
|
|
33
|
-
resolve(resources);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
resources().then((result) => resolve(result));
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
]);
|
|
40
|
-
return { ...r1, ...r2 };
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
exports.i18nResourceCreator = i18nResourceCreator;
|
|
@@ -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
|
-
}
|