@modern-js/plugin-i18n 2.0.0-beta.4 → 2.0.0-beta.7
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @modern-js/plugin-i18n
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.7
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- dda38c9c3e: chore: v2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [edd1cfb1af]
|
|
12
|
+
- Updated dependencies [dda38c9c3e]
|
|
13
|
+
- Updated dependencies [bbe4c4ab64]
|
|
14
|
+
- @modern-js/utils@2.0.0-beta.7
|
|
15
|
+
|
|
16
|
+
## 2.0.0-beta.6
|
|
17
|
+
|
|
18
|
+
### Major Changes
|
|
19
|
+
|
|
20
|
+
- dda38c9c3e: chore: v2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [7879e8f711]
|
|
25
|
+
- Updated dependencies [6aca875011]
|
|
26
|
+
- Updated dependencies [2e6031955e]
|
|
27
|
+
- Updated dependencies [7b7d12cf8f]
|
|
28
|
+
- Updated dependencies [7efeed4]
|
|
29
|
+
- Updated dependencies [92f0eade39]
|
|
30
|
+
- Updated dependencies [edd1cfb1af]
|
|
31
|
+
- Updated dependencies [cc971eabfc]
|
|
32
|
+
- Updated dependencies [5b9049f2e9]
|
|
33
|
+
- Updated dependencies [92004d1906]
|
|
34
|
+
- Updated dependencies [b8bbe036c7]
|
|
35
|
+
- Updated dependencies [d5a31df781]
|
|
36
|
+
- Updated dependencies [dda38c9c3e]
|
|
37
|
+
- Updated dependencies [3bbea92b2a]
|
|
38
|
+
- Updated dependencies [b710adb843]
|
|
39
|
+
- Updated dependencies [ea7cf06257]
|
|
40
|
+
- Updated dependencies [bbe4c4ab64]
|
|
41
|
+
- Updated dependencies [e4558a0bc4]
|
|
42
|
+
- Updated dependencies [abf3421a75]
|
|
43
|
+
- Updated dependencies [543be9558e]
|
|
44
|
+
- Updated dependencies [14b712da84]
|
|
45
|
+
- @modern-js/utils@2.0.0-beta.6
|
|
46
|
+
|
|
3
47
|
## 2.0.0-beta.4
|
|
4
48
|
|
|
5
49
|
### Major Changes
|
package/dist/js/modern/index.js
CHANGED
package/dist/js/node/index.js
CHANGED
|
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var src_exports = {};
|
|
19
|
+
__export(src_exports, {
|
|
20
20
|
I18n: () => I18n
|
|
21
21
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
22
|
+
module.exports = __toCommonJS(src_exports);
|
|
23
23
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
24
24
|
var import_utils = require("./utils");
|
|
25
25
|
class I18n {
|
|
@@ -29,7 +29,7 @@ class I18n {
|
|
|
29
29
|
}
|
|
30
30
|
format(msg, vars) {
|
|
31
31
|
return msg.replace(
|
|
32
|
-
/\{(
|
|
32
|
+
/\{(\w+)\}/g,
|
|
33
33
|
(_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture
|
|
34
34
|
);
|
|
35
35
|
}
|
|
@@ -69,3 +69,7 @@ class I18n {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
I18n
|
|
75
|
+
});
|
|
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var language_detector_exports = {};
|
|
19
|
+
__export(language_detector_exports, {
|
|
20
20
|
I18CLILanguageDetector: () => I18CLILanguageDetector
|
|
21
21
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
22
|
+
module.exports = __toCommonJS(language_detector_exports);
|
|
23
23
|
class I18CLILanguageDetector {
|
|
24
24
|
formatShellLocale(rawLC) {
|
|
25
25
|
if (!rawLC) {
|
|
@@ -38,3 +38,7 @@ class I18CLILanguageDetector {
|
|
|
38
38
|
return this.formatShellLocale(shellLocale);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
I18CLILanguageDetector
|
|
44
|
+
});
|
|
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var utils_exports = {};
|
|
19
|
+
__export(utils_exports, {
|
|
20
20
|
getObjKeyMap: () => getObjKeyMap
|
|
21
21
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
22
|
+
module.exports = __toCommonJS(utils_exports);
|
|
23
23
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
24
24
|
function getObjKeyMap(obj, prefix = "") {
|
|
25
25
|
const result = {};
|
|
@@ -35,3 +35,7 @@ function getObjKeyMap(obj, prefix = "") {
|
|
|
35
35
|
});
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
getObjKeyMap
|
|
41
|
+
});
|
|
@@ -43,7 +43,7 @@ var I18n = /*#__PURE__*/ function() {
|
|
|
43
43
|
{
|
|
44
44
|
key: "format",
|
|
45
45
|
value: function format(msg, vars) {
|
|
46
|
-
return msg.replace(/\{(
|
|
46
|
+
return msg.replace(/\{(\w+)\}/g, function(_match, capture) {
|
|
47
47
|
return Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture;
|
|
48
48
|
});
|
|
49
49
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0.0-beta.
|
|
14
|
+
"version": "2.0.0-beta.7",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "^7.18.0",
|
|
45
|
-
"@modern-js/utils": "2.0.0-beta.
|
|
45
|
+
"@modern-js/utils": "2.0.0-beta.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^27",
|
|
49
49
|
"@types/node": "^14",
|
|
50
50
|
"typescript": "^4",
|
|
51
51
|
"jest": "^27",
|
|
52
|
-
"@scripts/build": "2.0.0-beta.
|
|
53
|
-
"@scripts/jest-config": "2.0.0-beta.
|
|
52
|
+
"@scripts/build": "2.0.0-beta.7",
|
|
53
|
+
"@scripts/jest-config": "2.0.0-beta.7"
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"modernConfig": {},
|