nuxt-i18n-micro 1.59.0 → 1.59.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/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/569329fc-a258-4243-a57f-6857e7d94336.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/01.plugin.d.ts +4 -4
- package/dist/runtime/plugins/01.plugin.js +12 -6
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/cd075107-392f-495b-8345-ce296b14f76e.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/EwNUkbJF.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.C2JGrgZX.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DuZjM2Ym.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1736852822644,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"569329fc-a258-4243-a57f-6857e7d94336",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/EwNUkbJF.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.C2JGrgZX.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DuZjM2Ym.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1736852822644,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"569329fc-a258-4243-a57f-6857e7d94336",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"569329fc-a258-4243-a57f-6857e7d94336","timestamp":1736852817464}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"569329fc-a258-4243-a57f-6857e7d94336","timestamp":1736852817464,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/EwNUkbJF.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.C2JGrgZX.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DuZjM2Ym.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/C9njAg9E.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1736852822644,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"569329fc-a258-4243-a57f-6857e7d94336",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -20,8 +20,8 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
20
20
|
switchLocaleRoute: (toLocale: string) => string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
21
21
|
switchLocalePath: (toLocale: string) => string;
|
|
22
22
|
switchLocale: (toLocale: string) => void;
|
|
23
|
-
switchRoute: (
|
|
24
|
-
localeRoute: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, locale?: string) => RouteLocationResolved;
|
|
23
|
+
switchRoute: (to: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric | string, toLocale?: string) => void;
|
|
24
|
+
localeRoute: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath | string, locale?: string) => RouteLocationResolved;
|
|
25
25
|
localePath: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, locale?: string) => string;
|
|
26
26
|
setI18nRouteParams: (value: I18nRouteParams) => I18nRouteParams;
|
|
27
27
|
}> & import("nuxt/app").ObjectPlugin<{
|
|
@@ -43,8 +43,8 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
43
43
|
switchLocaleRoute: (toLocale: string) => string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
44
44
|
switchLocalePath: (toLocale: string) => string;
|
|
45
45
|
switchLocale: (toLocale: string) => void;
|
|
46
|
-
switchRoute: (
|
|
47
|
-
localeRoute: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, locale?: string) => RouteLocationResolved;
|
|
46
|
+
switchRoute: (to: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric | string, toLocale?: string) => void;
|
|
47
|
+
localeRoute: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath | string, locale?: string) => RouteLocationResolved;
|
|
48
48
|
localePath: (to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, locale?: string) => string;
|
|
49
49
|
setI18nRouteParams: (value: I18nRouteParams) => I18nRouteParams;
|
|
50
50
|
}>;
|
|
@@ -374,22 +374,28 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
374
374
|
const route2 = router.currentRoute.value;
|
|
375
375
|
switchLocale(i18nHelper.getLocale(), toLocale, route2, router, i18nConfig, i18nRouteParams.value);
|
|
376
376
|
},
|
|
377
|
-
switchRoute: (
|
|
377
|
+
switchRoute: (to, toLocale) => {
|
|
378
378
|
const currentRoute = router.currentRoute.value;
|
|
379
379
|
const fromLocale = (currentRoute.params?.locale ?? i18nConfig.defaultLocale).toString();
|
|
380
380
|
const currentLocale2 = toLocale ?? fromLocale;
|
|
381
|
-
|
|
382
|
-
if (typeof route2 === "string" && !isNoPrefixStrategy(i18nConfig.strategy)) {
|
|
381
|
+
if (typeof to === "string" && !isNoPrefixStrategy(i18nConfig.strategy)) {
|
|
383
382
|
if (currentLocale2 !== i18nConfig.defaultLocale || withPrefixStrategy(i18nConfig.strategy)) {
|
|
384
|
-
to = router.resolve("/" + fromLocale +
|
|
383
|
+
to = router.resolve("/" + fromLocale + to);
|
|
385
384
|
} else {
|
|
386
|
-
to = router.resolve(
|
|
385
|
+
to = router.resolve(route);
|
|
387
386
|
}
|
|
388
387
|
}
|
|
389
388
|
if (!to) {
|
|
390
389
|
return;
|
|
391
390
|
}
|
|
392
|
-
switchLocale(
|
|
391
|
+
switchLocale(
|
|
392
|
+
i18nHelper.getLocale(),
|
|
393
|
+
toLocale ?? fromLocale,
|
|
394
|
+
to,
|
|
395
|
+
router,
|
|
396
|
+
i18nConfig,
|
|
397
|
+
i18nRouteParams.value
|
|
398
|
+
);
|
|
393
399
|
},
|
|
394
400
|
localeRoute: (to, locale) => {
|
|
395
401
|
const fromLocale = i18nHelper.getLocale();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.59.
|
|
3
|
+
"version": "1.59.1",
|
|
4
4
|
"description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
|
|
5
5
|
"repository": "s00d/nuxt-i18n-micro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"cd075107-392f-495b-8345-ce296b14f76e","timestamp":1736500534009,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|