@yiiamee/multilinguist 1.2.4 → 1.2.5
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -38,6 +38,18 @@ function GenerateLocaleKeysPlugin(defaultLocaleFromConfig, localesPath, outPath)
|
|
|
38
38
|
` interface ComponentCustomProperties {`,
|
|
39
39
|
" $t: (key: LocaleKey, variables?: Record<string, string>) => string;",
|
|
40
40
|
` }`,
|
|
41
|
+
`}`,
|
|
42
|
+
``,
|
|
43
|
+
`declare module '#app' {`,
|
|
44
|
+
` interface NuxtApp {`,
|
|
45
|
+
" t: (key: LocaleKey, variables?: Record<string, string>) => string;",
|
|
46
|
+
` }`,
|
|
47
|
+
`}`,
|
|
48
|
+
``,
|
|
49
|
+
`declare module 'vue' {`,
|
|
50
|
+
` interface ComponentCustomProperties {`,
|
|
51
|
+
" t: (key: LocaleKey, variables?: Record<string, string>) => string;",
|
|
52
|
+
` }`,
|
|
41
53
|
`}`
|
|
42
54
|
].join("\n");
|
|
43
55
|
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
|
@@ -61,9 +73,9 @@ const module = defineNuxtModule({
|
|
|
61
73
|
meta: {
|
|
62
74
|
name: "@yiiamee/multilinguist",
|
|
63
75
|
configKey: "multilinguist",
|
|
64
|
-
version: "
|
|
76
|
+
version: "1.2.5",
|
|
65
77
|
compatibility: {
|
|
66
|
-
nuxt: "^3.
|
|
78
|
+
nuxt: "^3.0.0"
|
|
67
79
|
}
|
|
68
80
|
},
|
|
69
81
|
setup(moduleOptions, nuxtApp) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function useMultilinguist(): {
|
|
2
|
-
t: (key: LocaleKey, variables?: Record<string, string>) => string;
|
|
2
|
+
t: (key: import("../types/generated-locales.js").LocaleKey, variables?: Record<string, string>) => string;
|
|
3
3
|
setLocale: (locale: string) => void;
|
|
4
4
|
initLocalization: () => Promise<void>;
|
|
5
5
|
locale: import("vue").Ref<string, string>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
|
|
2
|
+
export interface TranslationMessages {
|
|
3
|
+
"Hello, World": string;
|
|
4
|
+
"Switch Locale": string;
|
|
5
|
+
"Paste your variable here": string;
|
|
6
|
+
"nested.Nested key": string;
|
|
7
|
+
"nested.Language": string;
|
|
8
|
+
"nested.nested second level.nested second level language": string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type LocaleKey = keyof TranslationMessages;
|
|
12
|
+
|
|
13
|
+
declare module '#app' {
|
|
14
|
+
interface NuxtApp {
|
|
15
|
+
$t: (key: LocaleKey, variables?: Record<string, string>) => string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module 'vue' {
|
|
20
|
+
interface ComponentCustomProperties {
|
|
21
|
+
$t: (key: LocaleKey, variables?: Record<string, string>) => string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module '#app' {
|
|
26
|
+
interface NuxtApp {
|
|
27
|
+
t: (key: LocaleKey, variables?: Record<string, string>) => string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare module 'vue' {
|
|
32
|
+
interface ComponentCustomProperties {
|
|
33
|
+
t: (key: LocaleKey, variables?: Record<string, string>) => string;
|
|
34
|
+
}
|
|
35
|
+
}
|