intor-translator 1.6.0 → 1.6.1
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 +3 -0
- package/dist/index.js +3 -0
- package/package.json +5 -7
package/dist/index.cjs
CHANGED
|
@@ -234,6 +234,9 @@ var findMessageInLocales = ({
|
|
|
234
234
|
for (const locale of candidateLocales) {
|
|
235
235
|
const messagesForLocale = messages[locale];
|
|
236
236
|
if (!messagesForLocale) continue;
|
|
237
|
+
if (key in messagesForLocale) {
|
|
238
|
+
return messagesForLocale[key];
|
|
239
|
+
}
|
|
237
240
|
let candidate = messagesForLocale;
|
|
238
241
|
const keys = key.split(".");
|
|
239
242
|
for (const key2 of keys) {
|
package/dist/index.js
CHANGED
|
@@ -233,6 +233,9 @@ var findMessageInLocales = ({
|
|
|
233
233
|
for (const locale of candidateLocales) {
|
|
234
234
|
const messagesForLocale = messages[locale];
|
|
235
235
|
if (!messagesForLocale) continue;
|
|
236
|
+
if (key in messagesForLocale) {
|
|
237
|
+
return messagesForLocale[key];
|
|
238
|
+
}
|
|
236
239
|
let candidate = messagesForLocale;
|
|
237
240
|
const keys = key.split(".");
|
|
238
241
|
for (const key2 of keys) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intor-translator",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "The Intor translation engine",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Yiming Liao",
|
|
@@ -56,20 +56,18 @@
|
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20.0.0"
|
|
58
58
|
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"rura": "^1.1.3"
|
|
61
|
+
},
|
|
59
62
|
"scripts": {
|
|
60
63
|
"type": "tsc -p tsconfig.json --noEmit",
|
|
61
64
|
"test": "vitest",
|
|
62
65
|
"test:types": "tsx scripts/test-types.ts",
|
|
63
66
|
"clean": "rm -rf dist",
|
|
64
67
|
"build": "tsup",
|
|
65
|
-
"build:release": "pnpm clean && pnpm build && pnpm api:build",
|
|
66
68
|
"api:check": "api-extractor run -c api-extractor/index.json",
|
|
67
69
|
"api:build": "api-extractor run -c api-extractor/index.json --local",
|
|
68
|
-
"prepublishOnly": "pnpm build:release",
|
|
69
70
|
"bench:runtime": "tsx bench/runtime/index.ts",
|
|
70
71
|
"examples:html": "vite --config examples/html/vite.config.ts"
|
|
71
|
-
},
|
|
72
|
-
"dependencies": {
|
|
73
|
-
"rura": "^1.1.3"
|
|
74
72
|
}
|
|
75
|
-
}
|
|
73
|
+
}
|