nuxt-i18n-micro 1.13.2 → 1.13.3
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 +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5ea89697-ba72-411f-a61a-8d8be203f3a9.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/01.plugin.js +12 -2
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/1f40d9d0-1d86-4ceb-b98c-da56e66c6bdb.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.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__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5ea89697-ba72-411f-a61a-8d8be203f3a9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.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__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5ea89697-ba72-411f-a61a-8d8be203f3a9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"5ea89697-ba72-411f-a61a-8d8be203f3a9","timestamp":1725472070372}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"5ea89697-ba72-411f-a61a-8d8be203f3a9","timestamp":1725472070372,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.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__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5ea89697-ba72-411f-a61a-8d8be203f3a9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -39,8 +39,18 @@ function getLocalizedRoute(to, router, route, i18nConfig, locale) {
|
|
|
39
39
|
const currentLocale = locale || getCurrentLocale(route, i18nConfig);
|
|
40
40
|
const selectRoute = router.resolve(to);
|
|
41
41
|
const routeName = getRouteName(selectRoute, currentLocale);
|
|
42
|
+
const resolveParams = (to2) => {
|
|
43
|
+
const params = typeof to2 === "object" && "params" in to2 && typeof to2.params === "object" ? { ...to2.params } : {};
|
|
44
|
+
if (typeof to2 === "string") {
|
|
45
|
+
const resolved = router.resolve(to2);
|
|
46
|
+
if (resolved && resolved.params) {
|
|
47
|
+
Object.assign(params, resolved.params);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return params;
|
|
51
|
+
};
|
|
42
52
|
if (router.hasRoute(`localized-${routeName}-${currentLocale}`)) {
|
|
43
|
-
const newParams2 =
|
|
53
|
+
const newParams2 = resolveParams(to);
|
|
44
54
|
newParams2.locale = currentLocale;
|
|
45
55
|
return router.resolve({
|
|
46
56
|
params: newParams2,
|
|
@@ -48,7 +58,7 @@ function getLocalizedRoute(to, router, route, i18nConfig, locale) {
|
|
|
48
58
|
});
|
|
49
59
|
}
|
|
50
60
|
const newRouteName = currentLocale !== i18nConfig.defaultLocale || i18nConfig.includeDefaultLocaleRoute ? `localized-${routeName}` : routeName;
|
|
51
|
-
const newParams =
|
|
61
|
+
const newParams = resolveParams(to);
|
|
52
62
|
delete newParams.locale;
|
|
53
63
|
if (currentLocale !== i18nConfig.defaultLocale || i18nConfig.includeDefaultLocaleRoute) {
|
|
54
64
|
newParams.locale = currentLocale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
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":"1f40d9d0-1d86-4ceb-b98c-da56e66c6bdb","timestamp":1725460561569,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|