@etsoo/appscript 1.3.43 → 1.3.47
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/__tests__/app/CoreApp.ts +5 -5
- package/lib/cjs/app/CoreApp.js +3 -3
- package/lib/cjs/erp/dto/OrgViewDto.d.ts +4 -0
- package/lib/cjs/i18n/{zhCN.d.ts → en.d.ts} +2 -2
- package/lib/cjs/i18n/{enUS.js → en.js} +8 -8
- package/lib/cjs/i18n/{en-US.json → en.json} +0 -0
- package/lib/cjs/i18n/{zh-CN.json → zh-Hans.json} +0 -0
- package/lib/cjs/i18n/{zh-HK.json → zh-Hant.json} +0 -0
- package/lib/cjs/i18n/{zhHK.d.ts → zhHans.d.ts} +2 -2
- package/lib/cjs/i18n/{zhCN.js → zhHans.js} +8 -8
- package/lib/cjs/i18n/zhHant.d.ts +7 -0
- package/lib/cjs/i18n/{zhHK.js → zhHant.js} +8 -8
- package/lib/cjs/index.d.ts +3 -3
- package/lib/cjs/index.js +3 -3
- package/lib/mjs/app/CoreApp.js +3 -3
- package/lib/mjs/erp/dto/OrgViewDto.d.ts +4 -0
- package/lib/{cjs/i18n/enUS.d.ts → mjs/i18n/en.d.ts} +2 -2
- package/lib/mjs/i18n/en.js +12 -0
- package/lib/mjs/i18n/{en-US.json → en.json} +0 -0
- package/lib/mjs/i18n/{zh-CN.json → zh-Hans.json} +0 -0
- package/lib/mjs/i18n/{zh-HK.json → zh-Hant.json} +0 -0
- package/lib/mjs/i18n/{enUS.d.ts → zhHans.d.ts} +2 -2
- package/lib/mjs/i18n/zhHans.js +12 -0
- package/lib/mjs/i18n/zhHant.d.ts +7 -0
- package/lib/mjs/i18n/zhHant.js +12 -0
- package/lib/mjs/index.d.ts +3 -3
- package/lib/mjs/index.js +3 -3
- package/package.json +3 -3
- package/src/app/CoreApp.ts +5 -4
- package/src/erp/dto/OrgViewDto.ts +5 -0
- package/src/i18n/{en-US.json → en.json} +0 -0
- package/src/i18n/en.ts +14 -0
- package/src/i18n/{zh-CN.json → zh-Hans.json} +0 -0
- package/src/i18n/{zh-HK.json → zh-Hant.json} +0 -0
- package/src/i18n/zhHans.ts +14 -0
- package/src/i18n/zhHant.ts +16 -0
- package/src/index.ts +3 -3
- package/lib/mjs/i18n/enUS.js +0 -12
- package/lib/mjs/i18n/zhCN.d.ts +0 -7
- package/lib/mjs/i18n/zhCN.js +0 -12
- package/lib/mjs/i18n/zhHK.d.ts +0 -7
- package/lib/mjs/i18n/zhHK.js +0 -12
- package/src/i18n/enUS.ts +0 -14
- package/src/i18n/zhCN.ts +0 -14
- package/src/i18n/zhHK.ts +0 -14
package/__tests__/app/CoreApp.ts
CHANGED
|
@@ -10,17 +10,17 @@ import { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
|
|
|
10
10
|
import { DataTypes, DomUtils, Utils, WindowStorage } from '@etsoo/shared';
|
|
11
11
|
import {
|
|
12
12
|
AddressApi,
|
|
13
|
-
|
|
13
|
+
en,
|
|
14
14
|
ExternalSettings,
|
|
15
15
|
IUser,
|
|
16
16
|
OrgApi,
|
|
17
17
|
PublicApi,
|
|
18
|
-
UserRole
|
|
18
|
+
UserRole,
|
|
19
|
+
zhHans
|
|
19
20
|
} from '../../src';
|
|
20
21
|
import { AddressUtils } from '../../src/address/AddressUtils';
|
|
21
22
|
import { IAppSettings } from '../../src/app/AppSettings';
|
|
22
23
|
import { CoreApp } from '../../src/app/CoreApp';
|
|
23
|
-
import { zhCN } from '../../src/i18n/zhCN';
|
|
24
24
|
import { InitCallResultData } from '../../src/result/InitCallResult';
|
|
25
25
|
|
|
26
26
|
// Detected country or region
|
|
@@ -30,7 +30,7 @@ const { detectedCountry } = DomUtils;
|
|
|
30
30
|
const { detectedCulture } = DomUtils;
|
|
31
31
|
|
|
32
32
|
// Supported cultures
|
|
33
|
-
const supportedCultures: DataTypes.CultureDefinition[] = [
|
|
33
|
+
const supportedCultures: DataTypes.CultureDefinition[] = [zhHans({}), en({})];
|
|
34
34
|
|
|
35
35
|
// Supported regions
|
|
36
36
|
const supportedRegions = ['CN'];
|
|
@@ -112,7 +112,7 @@ class CoreAppTest extends CoreApp<
|
|
|
112
112
|
currentCulture: DomUtils.getCulture(
|
|
113
113
|
supportedCultures,
|
|
114
114
|
detectedCulture
|
|
115
|
-
)!
|
|
115
|
+
)![0]
|
|
116
116
|
}),
|
|
117
117
|
createClient(),
|
|
118
118
|
container,
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -534,9 +534,9 @@ class CoreApp {
|
|
|
534
534
|
*/
|
|
535
535
|
checkLanguage(language) {
|
|
536
536
|
if (language) {
|
|
537
|
-
const
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
537
|
+
const [cultrue, match] = shared_1.DomUtils.getCulture(this.settings.cultures, language);
|
|
538
|
+
if (cultrue != null && match != shared_1.DomUtils.CultureMatch.Default)
|
|
539
|
+
return cultrue.name;
|
|
540
540
|
}
|
|
541
541
|
// Default language
|
|
542
542
|
return this.culture;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
/**
|
|
3
|
-
* Get
|
|
3
|
+
* Get en neutral culture
|
|
4
4
|
* @param localResources Local resources
|
|
5
5
|
* @returns Full culture
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const en: (localResources: object) => DataTypes.CultureDefinition;
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
6
|
+
exports.en = void 0;
|
|
7
|
+
const en_json_1 = __importDefault(require("./en.json"));
|
|
8
8
|
/**
|
|
9
|
-
* Get en
|
|
9
|
+
* Get en neutral culture
|
|
10
10
|
* @param localResources Local resources
|
|
11
11
|
* @returns Full culture
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
name: 'en
|
|
13
|
+
const en = (localResources) => ({
|
|
14
|
+
name: 'en',
|
|
15
15
|
label: 'English',
|
|
16
|
-
resources: { ...
|
|
17
|
-
|
|
16
|
+
resources: { ...en_json_1.default, ...localResources },
|
|
17
|
+
compatibleNames: []
|
|
18
18
|
});
|
|
19
|
-
exports.
|
|
19
|
+
exports.en = en;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
/**
|
|
3
|
-
* Get zh-
|
|
3
|
+
* Get zh-Hans neutral cultrue
|
|
4
4
|
* @param localResources Local resources
|
|
5
5
|
* @returns Full culture
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const zhHans: (localResources: {}) => DataTypes.CultureDefinition;
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
6
|
+
exports.zhHans = void 0;
|
|
7
|
+
const zh_Hans_json_1 = __importDefault(require("./zh-Hans.json"));
|
|
8
8
|
/**
|
|
9
|
-
* Get zh-
|
|
9
|
+
* Get zh-Hans neutral cultrue
|
|
10
10
|
* @param localResources Local resources
|
|
11
11
|
* @returns Full culture
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
name: 'zh-
|
|
13
|
+
const zhHans = (localResources) => ({
|
|
14
|
+
name: 'zh-Hans',
|
|
15
15
|
label: '简体中文',
|
|
16
|
-
resources: { ...
|
|
17
|
-
|
|
16
|
+
resources: { ...zh_Hans_json_1.default, ...localResources },
|
|
17
|
+
compatibleNames: ['zh-CN', 'zh-SG']
|
|
18
18
|
});
|
|
19
|
-
exports.
|
|
19
|
+
exports.zhHans = zhHans;
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
6
|
+
exports.zhHant = void 0;
|
|
7
|
+
const zh_Hant_json_1 = __importDefault(require("./zh-Hant.json"));
|
|
8
8
|
/**
|
|
9
|
-
* Get zh-
|
|
9
|
+
* Get zh-Hant neutral cultrue
|
|
10
10
|
* @param localResources Local resources
|
|
11
11
|
* @returns Full culture
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
name: 'zh-
|
|
13
|
+
const zhHant = (localResources) => ({
|
|
14
|
+
name: 'zh-Hant',
|
|
15
15
|
label: '繁體中文',
|
|
16
|
-
resources: { ...
|
|
17
|
-
|
|
16
|
+
resources: { ...zh_Hant_json_1.default, ...localResources },
|
|
17
|
+
compatibleNames: ['zh-HK', 'zh-TW', 'zh-MO']
|
|
18
18
|
});
|
|
19
|
-
exports.
|
|
19
|
+
exports.zhHant = zhHant;
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ export * from './erp/EntityApi';
|
|
|
41
41
|
export * from './erp/MemberApi';
|
|
42
42
|
export * from './erp/OrgApi';
|
|
43
43
|
export * from './erp/PublicApi';
|
|
44
|
-
export * from './i18n/
|
|
45
|
-
export * from './i18n/
|
|
46
|
-
export * from './i18n/
|
|
44
|
+
export * from './i18n/en';
|
|
45
|
+
export * from './i18n/zhHans';
|
|
46
|
+
export * from './i18n/zhHant';
|
|
47
47
|
export { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
|
|
48
48
|
export type { IApi, IApiPayload } from '@etsoo/restclient';
|
|
49
49
|
export * from './result/ActionResult';
|
package/lib/cjs/index.js
CHANGED
|
@@ -67,9 +67,9 @@ __exportStar(require("./erp/MemberApi"), exports);
|
|
|
67
67
|
__exportStar(require("./erp/OrgApi"), exports);
|
|
68
68
|
__exportStar(require("./erp/PublicApi"), exports);
|
|
69
69
|
// i18n
|
|
70
|
-
__exportStar(require("./i18n/
|
|
71
|
-
__exportStar(require("./i18n/
|
|
72
|
-
__exportStar(require("./i18n/
|
|
70
|
+
__exportStar(require("./i18n/en"), exports);
|
|
71
|
+
__exportStar(require("./i18n/zhHans"), exports);
|
|
72
|
+
__exportStar(require("./i18n/zhHant"), exports);
|
|
73
73
|
// @etsoo/restclient
|
|
74
74
|
var restclient_1 = require("@etsoo/restclient");
|
|
75
75
|
Object.defineProperty(exports, "ApiAuthorizationScheme", { enumerable: true, get: function () { return restclient_1.ApiAuthorizationScheme; } });
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -531,9 +531,9 @@ export class CoreApp {
|
|
|
531
531
|
*/
|
|
532
532
|
checkLanguage(language) {
|
|
533
533
|
if (language) {
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
return
|
|
534
|
+
const [cultrue, match] = DomUtils.getCulture(this.settings.cultures, language);
|
|
535
|
+
if (cultrue != null && match != DomUtils.CultureMatch.Default)
|
|
536
|
+
return cultrue.name;
|
|
537
537
|
}
|
|
538
538
|
// Default language
|
|
539
539
|
return this.culture;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
/**
|
|
3
|
-
* Get en
|
|
3
|
+
* Get en neutral culture
|
|
4
4
|
* @param localResources Local resources
|
|
5
5
|
* @returns Full culture
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const en: (localResources: object) => DataTypes.CultureDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import enUSResources from './en.json';
|
|
2
|
+
/**
|
|
3
|
+
* Get en neutral culture
|
|
4
|
+
* @param localResources Local resources
|
|
5
|
+
* @returns Full culture
|
|
6
|
+
*/
|
|
7
|
+
export const en = (localResources) => ({
|
|
8
|
+
name: 'en',
|
|
9
|
+
label: 'English',
|
|
10
|
+
resources: { ...enUSResources, ...localResources },
|
|
11
|
+
compatibleNames: []
|
|
12
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
/**
|
|
3
|
-
* Get
|
|
3
|
+
* Get zh-Hans neutral cultrue
|
|
4
4
|
* @param localResources Local resources
|
|
5
5
|
* @returns Full culture
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const zhHans: (localResources: {}) => DataTypes.CultureDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import zhCNResources from './zh-Hans.json';
|
|
2
|
+
/**
|
|
3
|
+
* Get zh-Hans neutral cultrue
|
|
4
|
+
* @param localResources Local resources
|
|
5
|
+
* @returns Full culture
|
|
6
|
+
*/
|
|
7
|
+
export const zhHans = (localResources) => ({
|
|
8
|
+
name: 'zh-Hans',
|
|
9
|
+
label: '简体中文',
|
|
10
|
+
resources: { ...zhCNResources, ...localResources },
|
|
11
|
+
compatibleNames: ['zh-CN', 'zh-SG']
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import zhHKResources from './zh-Hant.json';
|
|
2
|
+
/**
|
|
3
|
+
* Get zh-Hant neutral cultrue
|
|
4
|
+
* @param localResources Local resources
|
|
5
|
+
* @returns Full culture
|
|
6
|
+
*/
|
|
7
|
+
export const zhHant = (localResources) => ({
|
|
8
|
+
name: 'zh-Hant',
|
|
9
|
+
label: '繁體中文',
|
|
10
|
+
resources: { ...zhHKResources, ...localResources },
|
|
11
|
+
compatibleNames: ['zh-HK', 'zh-TW', 'zh-MO']
|
|
12
|
+
});
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ export * from './erp/EntityApi';
|
|
|
41
41
|
export * from './erp/MemberApi';
|
|
42
42
|
export * from './erp/OrgApi';
|
|
43
43
|
export * from './erp/PublicApi';
|
|
44
|
-
export * from './i18n/
|
|
45
|
-
export * from './i18n/
|
|
46
|
-
export * from './i18n/
|
|
44
|
+
export * from './i18n/en';
|
|
45
|
+
export * from './i18n/zhHans';
|
|
46
|
+
export * from './i18n/zhHant';
|
|
47
47
|
export { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
|
|
48
48
|
export type { IApi, IApiPayload } from '@etsoo/restclient';
|
|
49
49
|
export * from './result/ActionResult';
|
package/lib/mjs/index.js
CHANGED
|
@@ -50,9 +50,9 @@ export * from './erp/MemberApi';
|
|
|
50
50
|
export * from './erp/OrgApi';
|
|
51
51
|
export * from './erp/PublicApi';
|
|
52
52
|
// i18n
|
|
53
|
-
export * from './i18n/
|
|
54
|
-
export * from './i18n/
|
|
55
|
-
export * from './i18n/
|
|
53
|
+
export * from './i18n/en';
|
|
54
|
+
export * from './i18n/zhHans';
|
|
55
|
+
export * from './i18n/zhHant';
|
|
56
56
|
// @etsoo/restclient
|
|
57
57
|
export { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
|
|
58
58
|
// result
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.47",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.18",
|
|
56
56
|
"@etsoo/restclient": "^1.0.79",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.81",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/jest": "^29.2.3",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
69
69
|
"@typescript-eslint/parser": "^5.45.0",
|
|
70
|
-
"eslint": "^8.
|
|
70
|
+
"eslint": "^8.29.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.26.0",
|
|
73
73
|
"jest": "^29.3.1",
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -783,11 +783,12 @@ export abstract class CoreApp<
|
|
|
783
783
|
*/
|
|
784
784
|
checkLanguage(language?: string) {
|
|
785
785
|
if (language) {
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
786
|
+
const [cultrue, match] = DomUtils.getCulture(
|
|
787
|
+
this.settings.cultures,
|
|
788
|
+
language
|
|
789
789
|
);
|
|
790
|
-
if (
|
|
790
|
+
if (cultrue != null && match != DomUtils.CultureMatch.Default)
|
|
791
|
+
return cultrue.name;
|
|
791
792
|
}
|
|
792
793
|
|
|
793
794
|
// Default language
|
|
File without changes
|
package/src/i18n/en.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
2
|
+
import enUSResources from './en.json';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get en neutral culture
|
|
6
|
+
* @param localResources Local resources
|
|
7
|
+
* @returns Full culture
|
|
8
|
+
*/
|
|
9
|
+
export const en = (localResources: object): DataTypes.CultureDefinition => ({
|
|
10
|
+
name: 'en',
|
|
11
|
+
label: 'English',
|
|
12
|
+
resources: { ...enUSResources, ...localResources },
|
|
13
|
+
compatibleNames: []
|
|
14
|
+
});
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
2
|
+
import zhCNResources from './zh-Hans.json';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get zh-Hans neutral cultrue
|
|
6
|
+
* @param localResources Local resources
|
|
7
|
+
* @returns Full culture
|
|
8
|
+
*/
|
|
9
|
+
export const zhHans = (localResources: {}): DataTypes.CultureDefinition => ({
|
|
10
|
+
name: 'zh-Hans',
|
|
11
|
+
label: '简体中文',
|
|
12
|
+
resources: { ...zhCNResources, ...localResources },
|
|
13
|
+
compatibleNames: ['zh-CN', 'zh-SG']
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
2
|
+
import zhHKResources from './zh-Hant.json';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get zh-Hant neutral cultrue
|
|
6
|
+
* @param localResources Local resources
|
|
7
|
+
* @returns Full culture
|
|
8
|
+
*/
|
|
9
|
+
export const zhHant = (
|
|
10
|
+
localResources: object
|
|
11
|
+
): DataTypes.CultureDefinition => ({
|
|
12
|
+
name: 'zh-Hant',
|
|
13
|
+
label: '繁體中文',
|
|
14
|
+
resources: { ...zhHKResources, ...localResources },
|
|
15
|
+
compatibleNames: ['zh-HK', 'zh-TW', 'zh-MO']
|
|
16
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -58,9 +58,9 @@ export * from './erp/OrgApi';
|
|
|
58
58
|
export * from './erp/PublicApi';
|
|
59
59
|
|
|
60
60
|
// i18n
|
|
61
|
-
export * from './i18n/
|
|
62
|
-
export * from './i18n/
|
|
63
|
-
export * from './i18n/
|
|
61
|
+
export * from './i18n/en';
|
|
62
|
+
export * from './i18n/zhHans';
|
|
63
|
+
export * from './i18n/zhHant';
|
|
64
64
|
|
|
65
65
|
// @etsoo/restclient
|
|
66
66
|
export { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
|
package/lib/mjs/i18n/enUS.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import enUSResources from './en-US.json';
|
|
2
|
-
/**
|
|
3
|
-
* Get en-US cultrue
|
|
4
|
-
* @param localResources Local resources
|
|
5
|
-
* @returns Full culture
|
|
6
|
-
*/
|
|
7
|
-
export const enUS = (localResources) => ({
|
|
8
|
-
name: 'en-US',
|
|
9
|
-
label: 'English',
|
|
10
|
-
resources: { ...enUSResources, ...localResources },
|
|
11
|
-
compatibleName: ['en-CA', 'en-AU', 'en-NZ', 'en-GB', 'en-IE']
|
|
12
|
-
});
|
package/lib/mjs/i18n/zhCN.d.ts
DELETED
package/lib/mjs/i18n/zhCN.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import zhCNResources from './zh-CN.json';
|
|
2
|
-
/**
|
|
3
|
-
* Get zh-CN cultrue
|
|
4
|
-
* @param localResources Local resources
|
|
5
|
-
* @returns Full culture
|
|
6
|
-
*/
|
|
7
|
-
export const zhCN = (localResources) => ({
|
|
8
|
-
name: 'zh-CN',
|
|
9
|
-
label: '简体中文',
|
|
10
|
-
resources: { ...zhCNResources, ...localResources },
|
|
11
|
-
compatibleName: ['zh-SG']
|
|
12
|
-
});
|
package/lib/mjs/i18n/zhHK.d.ts
DELETED
package/lib/mjs/i18n/zhHK.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import zhHKResources from './zh-HK.json';
|
|
2
|
-
/**
|
|
3
|
-
* Get zh-HK cultrue
|
|
4
|
-
* @param localResources Local resources
|
|
5
|
-
* @returns Full culture
|
|
6
|
-
*/
|
|
7
|
-
export const zhHK = (localResources) => ({
|
|
8
|
-
name: 'zh-HK',
|
|
9
|
-
label: '繁體中文',
|
|
10
|
-
resources: { ...zhHKResources, ...localResources },
|
|
11
|
-
compatibleName: ['zh-TW', 'zh-MO']
|
|
12
|
-
});
|
package/src/i18n/enUS.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import enUSResources from './en-US.json';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get en-US cultrue
|
|
6
|
-
* @param localResources Local resources
|
|
7
|
-
* @returns Full culture
|
|
8
|
-
*/
|
|
9
|
-
export const enUS = (localResources: object): DataTypes.CultureDefinition => ({
|
|
10
|
-
name: 'en-US',
|
|
11
|
-
label: 'English',
|
|
12
|
-
resources: { ...enUSResources, ...localResources },
|
|
13
|
-
compatibleName: ['en-CA', 'en-AU', 'en-NZ', 'en-GB', 'en-IE']
|
|
14
|
-
});
|
package/src/i18n/zhCN.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import zhCNResources from './zh-CN.json';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get zh-CN cultrue
|
|
6
|
-
* @param localResources Local resources
|
|
7
|
-
* @returns Full culture
|
|
8
|
-
*/
|
|
9
|
-
export const zhCN = (localResources: {}): DataTypes.CultureDefinition => ({
|
|
10
|
-
name: 'zh-CN',
|
|
11
|
-
label: '简体中文',
|
|
12
|
-
resources: { ...zhCNResources, ...localResources },
|
|
13
|
-
compatibleName: ['zh-SG']
|
|
14
|
-
});
|
package/src/i18n/zhHK.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import zhHKResources from './zh-HK.json';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get zh-HK cultrue
|
|
6
|
-
* @param localResources Local resources
|
|
7
|
-
* @returns Full culture
|
|
8
|
-
*/
|
|
9
|
-
export const zhHK = (localResources: object): DataTypes.CultureDefinition => ({
|
|
10
|
-
name: 'zh-HK',
|
|
11
|
-
label: '繁體中文',
|
|
12
|
-
resources: { ...zhHKResources, ...localResources },
|
|
13
|
-
compatibleName: ['zh-TW', 'zh-MO']
|
|
14
|
-
});
|