@pc-nexus/core 0.5.0-next.24 → 0.5.0-next.26
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/i18n/main.js +2 -2
- package/package.json +2 -2
package/lib/i18n/main.js
CHANGED
|
@@ -22,7 +22,7 @@ class I18n {
|
|
|
22
22
|
}
|
|
23
23
|
#translate(key, translations, params) {
|
|
24
24
|
if (!key) {
|
|
25
|
-
throw new NexusInnerError(NexusCode.
|
|
25
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.I18nTranslationKeyRequired, `"key" is required in i18n translate.`);
|
|
26
26
|
}
|
|
27
27
|
let value = _.get(translations, key);
|
|
28
28
|
if (value == null) {
|
|
@@ -45,7 +45,7 @@ class I18n {
|
|
|
45
45
|
#validateLocale(locale) {
|
|
46
46
|
if (locale) {
|
|
47
47
|
if (!SUPPORTED_LOCALE_CODES.includes(locale)) {
|
|
48
|
-
throw new NexusInnerError(NexusCode.
|
|
48
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.I18nTranslationLocaleInvalid, `locale "${locale}" is not supported`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pc-nexus/core",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"type": "module",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@pc-nexus/internal": "0.5.0-next.
|
|
32
|
+
"@pc-nexus/internal": "0.5.0-next.26",
|
|
33
33
|
"lodash": "^4.17.21"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {},
|