langie 1.12.1 → 1.13.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/components/index.cjs +14 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.mjs +14 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/core.cjs +12 -3
- package/dist/core.cjs.map +1 -1
- package/dist/core.mjs +12 -3
- package/dist/core.mjs.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* langie v1.
|
|
2
|
+
* langie v1.13.1
|
|
3
3
|
* (c) 2026 nlit
|
|
4
4
|
* @license Apache-2.0
|
|
5
5
|
*
|
|
@@ -746,6 +746,7 @@ var LanguageSelect_default = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
746
746
|
"5b09cc17-COLORS.text.secondary": (0, import_vue2.unref)(COLORS).text.secondary,
|
|
747
747
|
"5b09cc17-COLORS.neutral.gray400": (0, import_vue2.unref)(COLORS).neutral.gray400
|
|
748
748
|
}));
|
|
749
|
+
const COMBOBOX_ARIA = { "aria-multiselectable": void 0 };
|
|
749
750
|
const getFlagCode = (lang) => {
|
|
750
751
|
const flagCode = lang.flag_country || lang.code;
|
|
751
752
|
return flagCode;
|
|
@@ -919,6 +920,7 @@ var LanguageSelect_default = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
919
920
|
label: "name",
|
|
920
921
|
"value-prop": "code",
|
|
921
922
|
"filter-results": false,
|
|
923
|
+
aria: COMBOBOX_ARIA,
|
|
922
924
|
onKeydown: handleKeydown
|
|
923
925
|
}, {
|
|
924
926
|
singlelabel: (0, import_vue2.withCtx)(({ value }) => [
|
|
@@ -1038,6 +1040,8 @@ var API_FIELD_TEXT = "t";
|
|
|
1038
1040
|
var API_FIELD_FROM = "from";
|
|
1039
1041
|
var API_FIELD_TO = "to";
|
|
1040
1042
|
var API_FIELD_CTX = "ctx";
|
|
1043
|
+
var API_FIELD_GLOSSARY_SRC = "gs";
|
|
1044
|
+
var API_FIELD_GLOSSARY_TGT = "gt";
|
|
1041
1045
|
var API_FIELD_TRANSLATIONS = "translations";
|
|
1042
1046
|
var API_FIELD_ERROR = "error";
|
|
1043
1047
|
var API_FIELD_TURNSTILE = "turnstileToken";
|
|
@@ -1051,6 +1055,11 @@ function resolveApiKey(options) {
|
|
|
1051
1055
|
if (!env) return void 0;
|
|
1052
1056
|
return env[options.apiKeyEnv || DEFAULT_API_KEY_ENV];
|
|
1053
1057
|
}
|
|
1058
|
+
function glossaryFields(t) {
|
|
1059
|
+
const src = t[API_FIELD_GLOSSARY_SRC];
|
|
1060
|
+
const tgt = t[API_FIELD_GLOSSARY_TGT];
|
|
1061
|
+
return src && tgt ? { [API_FIELD_GLOSSARY_SRC]: src, [API_FIELD_GLOSSARY_TGT]: tgt } : {};
|
|
1062
|
+
}
|
|
1054
1063
|
var translationCache = /* @__PURE__ */ new Map();
|
|
1055
1064
|
function getTranslationCacheKey(serviceTranslations, options) {
|
|
1056
1065
|
return JSON.stringify({
|
|
@@ -1058,7 +1067,8 @@ function getTranslationCacheKey(serviceTranslations, options) {
|
|
|
1058
1067
|
[API_FIELD_TEXT]: t[API_FIELD_TEXT],
|
|
1059
1068
|
[API_FIELD_FROM]: t[API_FIELD_FROM],
|
|
1060
1069
|
[API_FIELD_TO]: t[API_FIELD_TO],
|
|
1061
|
-
[API_FIELD_CTX]: t[API_FIELD_CTX] || options[API_FIELD_CTX] || "ui"
|
|
1070
|
+
[API_FIELD_CTX]: t[API_FIELD_CTX] || options[API_FIELD_CTX] || "ui",
|
|
1071
|
+
...glossaryFields(t)
|
|
1062
1072
|
})),
|
|
1063
1073
|
host: options.translatorHost || DEFAULT_TRANSLATOR_HOST,
|
|
1064
1074
|
context: options[API_FIELD_CTX] || "ui"
|
|
@@ -1103,7 +1113,8 @@ async function translateBatch(translations2 = [], options = {}) {
|
|
|
1103
1113
|
[API_FIELD_TEXT]: t[API_FIELD_TEXT],
|
|
1104
1114
|
[API_FIELD_FROM]: t[API_FIELD_FROM],
|
|
1105
1115
|
[API_FIELD_TO]: t[API_FIELD_TO],
|
|
1106
|
-
[API_FIELD_CTX]: t[API_FIELD_CTX] || options[API_FIELD_CTX] || "ui"
|
|
1116
|
+
[API_FIELD_CTX]: t[API_FIELD_CTX] || options[API_FIELD_CTX] || "ui",
|
|
1117
|
+
...glossaryFields(t)
|
|
1107
1118
|
})),
|
|
1108
1119
|
[API_FIELD_CTX]: options[API_FIELD_CTX] || "ui",
|
|
1109
1120
|
...turnstileToken ? { [API_FIELD_TURNSTILE]: turnstileToken } : {}
|