@lokascript/i18n 2.9.0 → 2.9.2
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/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -34
- package/dist/index.d.ts +34 -34
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/lokascript-i18n.min.js +1 -1
- package/dist/lokascript-i18n.min.js.map +1 -1
- package/dist/lokascript-i18n.mjs +2804 -2804
- package/dist/lokascript-i18n.mjs.map +1 -1
- package/dist/plugins/vite.cjs +6 -2
- package/dist/plugins/vite.cjs.map +1 -1
- package/dist/plugins/vite.js +6 -2
- package/dist/plugins/vite.js.map +1 -1
- package/dist/plugins/webpack.cjs +6 -2
- package/dist/plugins/webpack.cjs.map +1 -1
- package/dist/plugins/webpack.js +6 -2
- package/dist/plugins/webpack.js.map +1 -1
- package/package.json +3 -3
- package/src/formatting.ts +6 -1
- package/src/utils/tokenizer-adapter.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokascript/i18n",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Grammar transformation and keyword translation for hyperscript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/codetalcott/hyperfixi/tree/main/packages/i18n#readme",
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@hyperfixi/core": "^2.9.
|
|
68
|
-
"@lokascript/semantic": "^2.9.
|
|
67
|
+
"@hyperfixi/core": "^2.9.2",
|
|
68
|
+
"@lokascript/semantic": "^2.9.2",
|
|
69
69
|
"esbuild": "^0.28.0",
|
|
70
70
|
"happy-dom": "^20.10.6",
|
|
71
71
|
"vite": "^8.1.4"
|
package/src/formatting.ts
CHANGED
|
@@ -47,7 +47,12 @@ export class NumberFormatter {
|
|
|
47
47
|
try {
|
|
48
48
|
const result = new Intl.NumberFormat(this.locale, mergedOptions).format(value);
|
|
49
49
|
// Validate result - if style is currency but no currency symbol, use fallback
|
|
50
|
-
if (
|
|
50
|
+
if (
|
|
51
|
+
mergedOptions.style === 'currency' &&
|
|
52
|
+
!/[$\u20ac\u00a3\u00a5\u20b9\u20a9\u20bd\u0e3f\u20aa\u20b4\u20b1\u20ab\u20b5\u20a6]/.test(
|
|
53
|
+
result
|
|
54
|
+
)
|
|
55
|
+
) {
|
|
51
56
|
return this.fallbackFormat(value, mergedOptions);
|
|
52
57
|
}
|
|
53
58
|
// Validate result - if style is percent but no % symbol, use fallback
|
|
@@ -426,11 +426,15 @@ function isDigit(char: string): boolean {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
function isIdentifierStart(char: string): boolean {
|
|
429
|
-
return /[a-zA-Z_
|
|
429
|
+
return /[a-zA-Z_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/.test(
|
|
430
|
+
char
|
|
431
|
+
);
|
|
430
432
|
}
|
|
431
433
|
|
|
432
434
|
function isIdentifierPart(char: string): boolean {
|
|
433
|
-
return /[a-zA-Z0-9_
|
|
435
|
+
return /[a-zA-Z0-9_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3-]/.test(
|
|
436
|
+
char
|
|
437
|
+
);
|
|
434
438
|
}
|
|
435
439
|
|
|
436
440
|
function consumeWhitespace(text: string, start: number): string {
|