nuxt-i18n-micro 1.83.0 → 1.83.2
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/da688f4f-acea-4fa1-b66d-0b850a627c79.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -3
- package/dist/runtime/plugins/01.plugin.d.ts +8 -8
- package/package.json +3 -3
- package/dist/client/_nuxt/builds/meta/8ca6bd8f-ef82-4332-a5b1-4a2144fc0d82.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/BBbCCCx2.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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/MjlAM4Ld.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},1744696954292,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"da688f4f-acea-4fa1-b66d-0b850a627c79",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/BBbCCCx2.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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/MjlAM4Ld.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},1744696954293,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"da688f4f-acea-4fa1-b66d-0b850a627c79",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"da688f4f-acea-4fa1-b66d-0b850a627c79","timestamp":1744696944206}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"da688f4f-acea-4fa1-b66d-0b850a627c79","timestamp":1744696944206,"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/BBbCCCx2.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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/MjlAM4Ld.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},1744696954293,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"da688f4f-acea-4fa1-b66d-0b850a627c79",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -238,6 +238,9 @@ class PageManager {
|
|
|
238
238
|
return this.activeLocaleCodes.filter((code) => !this.localizedPaths[fullPath]?.[code]);
|
|
239
239
|
}
|
|
240
240
|
adjustRouteForDefaultLocale(page, originalChildren) {
|
|
241
|
+
if (isNoPrefixStrategy(this.strategy)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
241
244
|
const defaultLocalePath = this.localizedPaths[page.path]?.[this.defaultLocale.code];
|
|
242
245
|
if (defaultLocalePath) {
|
|
243
246
|
page.path = normalizePath(defaultLocalePath);
|
|
@@ -269,15 +272,13 @@ class PageManager {
|
|
|
269
272
|
const customPath = this.localizedPaths[fullPath]?.[locale.code];
|
|
270
273
|
if (!customPath)
|
|
271
274
|
return;
|
|
272
|
-
const isDefaultLocale = isLocaleDefault(locale, this.defaultLocale, isPrefixStrategy(this.strategy));
|
|
275
|
+
const isDefaultLocale = isLocaleDefault(locale, this.defaultLocale, isPrefixStrategy(this.strategy) || isNoPrefixStrategy(this.strategy));
|
|
273
276
|
if (isDefaultLocale) {
|
|
274
277
|
page.children = this.createLocalizedChildren(originalChildren, "", [locale.code], false);
|
|
275
278
|
} else {
|
|
276
279
|
const newRoute = this.createLocalizedRoute(page, [locale.code], originalChildren, true, customPath, customRegex);
|
|
277
280
|
if (newRoute)
|
|
278
281
|
additionalRoutes.push(newRoute);
|
|
279
|
-
if (this.noPrefixRedirect && isNoPrefixStrategy(this.strategy) && newRoute)
|
|
280
|
-
page.redirect = newRoute.path;
|
|
281
282
|
}
|
|
282
283
|
if (isPrefixAndDefaultStrategy(this.strategy) && locale === this.defaultLocale) {
|
|
283
284
|
const newRoute = this.createLocalizedRoute(page, [locale.code], originalChildren, true, customPath, customRegex, true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationResolved, RouteLocationResolvedGeneric, RouteLocationNamedRaw } from 'vue-router';
|
|
2
|
-
import type { Locale, I18nRouteParams, Params,
|
|
2
|
+
import type { Locale, I18nRouteParams, Params, Translations, CleanTranslation } from 'nuxt-i18n-micro-types';
|
|
3
3
|
declare const _default: import("nuxt/app").Plugin<{
|
|
4
4
|
i18n: undefined;
|
|
5
5
|
__micro: boolean;
|
|
@@ -8,9 +8,9 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
8
8
|
defaultLocale: () => string | undefined;
|
|
9
9
|
getLocales: () => Locale[];
|
|
10
10
|
getRouteName: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric, locale?: string) => string;
|
|
11
|
-
t: (key: string, params?: Params, defaultValue?: string | null, route?: RouteLocationNormalizedLoaded) =>
|
|
11
|
+
t: (key: string, params?: Params, defaultValue?: string | null, route?: RouteLocationNormalizedLoaded) => CleanTranslation;
|
|
12
12
|
ts: (key: string, params?: Params, defaultValue?: string, route?: RouteLocationNormalizedLoaded) => string;
|
|
13
|
-
_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) =>
|
|
13
|
+
_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) => CleanTranslation;
|
|
14
14
|
_ts: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string) => string;
|
|
15
15
|
tc: (key: string, params: number | Params, defaultValue?: string) => string;
|
|
16
16
|
tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
@@ -35,9 +35,9 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
35
35
|
defaultLocale: () => string | undefined;
|
|
36
36
|
getLocales: () => Locale[];
|
|
37
37
|
getRouteName: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric, locale?: string) => string;
|
|
38
|
-
t: (key: string, params?: Params, defaultValue?: string | null, route?: RouteLocationNormalizedLoaded) =>
|
|
38
|
+
t: (key: string, params?: Params, defaultValue?: string | null, route?: RouteLocationNormalizedLoaded) => CleanTranslation;
|
|
39
39
|
ts: (key: string, params?: Params, defaultValue?: string, route?: RouteLocationNormalizedLoaded) => string;
|
|
40
|
-
_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) =>
|
|
40
|
+
_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) => CleanTranslation;
|
|
41
41
|
_ts: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string) => string;
|
|
42
42
|
tc: (key: string, params: number | Params, defaultValue?: string) => string;
|
|
43
43
|
tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
@@ -62,10 +62,10 @@ export interface PluginsInjections {
|
|
|
62
62
|
$getLocales: () => Locale[];
|
|
63
63
|
$defaultLocale: () => string | undefined;
|
|
64
64
|
$getRouteName: (route?: RouteLocationNamedRaw | RouteLocationResolvedGeneric, locale?: string) => string;
|
|
65
|
-
$t: (key: string, params?: Params, defaultValue?: string | null) =>
|
|
66
|
-
$_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) =>
|
|
65
|
+
$t: (key: string, params?: Params, defaultValue?: string | null) => CleanTranslation;
|
|
66
|
+
$_t: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) => CleanTranslation;
|
|
67
67
|
$ts: (key: string, params?: Params, defaultValue?: string) => string;
|
|
68
|
-
$_ts: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) =>
|
|
68
|
+
$_ts: (route: RouteLocationNormalizedLoaded) => (key: string, params?: Params, defaultValue?: string | null) => string;
|
|
69
69
|
$tc: (key: string, params: number | Params, defaultValue?: string) => string;
|
|
70
70
|
$tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
71
71
|
$td: (value: Date | number | string, options?: Intl.DateTimeFormatOptions) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.2",
|
|
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",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"sirv": "^2.0.4",
|
|
61
61
|
"ufo": "^1.5.4",
|
|
62
62
|
"nuxt-i18n-micro-core": "1.0.18",
|
|
63
|
-
"nuxt-i18n-micro-
|
|
64
|
-
"nuxt-i18n-micro-
|
|
63
|
+
"nuxt-i18n-micro-test-utils": "1.0.6",
|
|
64
|
+
"nuxt-i18n-micro-types": "1.0.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@nuxt/devtools": "^2.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"8ca6bd8f-ef82-4332-a5b1-4a2144fc0d82","timestamp":1743403356798,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|