@fkui/i18next-translate 6.50.0 → 6.52.0
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/dist/cjs/index.js +8 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +8 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -3471,10 +3471,14 @@ class Formatter {
|
|
|
3471
3471
|
format(value, format, lng, options = {}) {
|
|
3472
3472
|
if (!format) return value;
|
|
3473
3473
|
if (value == null) return value;
|
|
3474
|
-
const
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3474
|
+
const rawFormats = format.split(this.formatSeparator);
|
|
3475
|
+
const formats = [];
|
|
3476
|
+
for (let i = 0; i < rawFormats.length; i++) {
|
|
3477
|
+
let f = rawFormats[i];
|
|
3478
|
+
while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {
|
|
3479
|
+
f = `${f}${this.formatSeparator}${rawFormats[++i]}`;
|
|
3480
|
+
}
|
|
3481
|
+
formats.push(f);
|
|
3478
3482
|
}
|
|
3479
3483
|
const result = formats.reduce((mem, f) => {
|
|
3480
3484
|
const {
|