langie 2.0.2 → 2.0.4
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 +24 -9
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.mjs +34 -19
- package/dist/components/index.mjs.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +24 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +34 -19
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/utils/languageLabel.d.ts +13 -0
- package/package.json +5 -5
package/dist/types.d.ts
CHANGED
|
@@ -12,7 +12,11 @@ export interface TranslatorLanguage {
|
|
|
12
12
|
popularity?: number;
|
|
13
13
|
flag_country?: string;
|
|
14
14
|
value?: string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Language name in the current interface language (filled by
|
|
17
|
+
* localizeLanguageNames). Shown as the picker's label when present, and a
|
|
18
|
+
* fuzzy-search key either way.
|
|
19
|
+
*/
|
|
16
20
|
search_alias?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TranslatorLanguage } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Label parts for a language option: the name in the interface language when we
|
|
4
|
+
* have it (`search_alias`, filled by localizeLanguageNames), else the English
|
|
5
|
+
* `name`, plus the native name to show in parentheses.
|
|
6
|
+
*
|
|
7
|
+
* `native` comes back empty when it would only repeat the primary — with a
|
|
8
|
+
* Russian interface, Russian reads "Русский", not "Русский (Русский)".
|
|
9
|
+
*/
|
|
10
|
+
export declare function languageLabel(lang: Pick<TranslatorLanguage, 'name' | 'native_name'> & Partial<Pick<TranslatorLanguage, 'search_alias'>>): {
|
|
11
|
+
primary: string;
|
|
12
|
+
native: string;
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langie",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Lightweight translation SDK for Vue.js applications with smart interface language selection and limit monitoring",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.33.2",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"node": ">=18.0.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
70
|
+
"nuxt": "^3.0.0",
|
|
71
|
+
"vue": "^3.5.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@testing-library/vue": "^8.1.0",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"tsup": "^8.0.0",
|
|
86
86
|
"typescript": "^5.0.0",
|
|
87
87
|
"vite": "^5.0.0",
|
|
88
|
-
"vue-tsc": "^3.0.0",
|
|
89
88
|
"vitest": "^3.2.4",
|
|
90
|
-
"vue": "^3.5.0"
|
|
89
|
+
"vue": "^3.5.0",
|
|
90
|
+
"vue-tsc": "^3.0.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@vueform/multiselect": "^2.6.11",
|