nuxt-i18n-micro 1.76.0 → 1.76.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/2a345ec3-0b90-4491-9f47-af97b802c9e1.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -6
- package/dist/runtime/components/i18n-switcher.vue +1 -1
- package/dist/runtime/components/i18n-t.vue +1 -1
- package/dist/runtime/components/locale-redirect.vue +1 -1
- package/dist/runtime/plugins/01.plugin.js +1 -2
- package/dist/runtime/plugins/03.define.js +1 -2
- package/dist/runtime/plugins/04.auto-detect.js +1 -2
- package/dist/runtime/plugins/05.hooks.js +1 -2
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/38589fcc-d716-4bad-b71f-acbb6a83596c.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},1740125086428,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"2a345ec3-0b90-4491-9f47-af97b802c9e1",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},1740125086428,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"2a345ec3-0b90-4491-9f47-af97b802c9e1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"2a345ec3-0b90-4491-9f47-af97b802c9e1","timestamp":1740125077860}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"2a345ec3-0b90-4491-9f47-af97b802c9e1","timestamp":1740125077860,"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},1740125086428,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"2a345ec3-0b90-4491-9f47-af97b802c9e1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -614,8 +614,9 @@ const module = defineNuxtModule({
|
|
|
614
614
|
if (routeRules && Object.keys(routeRules).length && !isNoPrefixStrategy(strategy)) {
|
|
615
615
|
nitroConfig.routeRules = nitroConfig.routeRules || {};
|
|
616
616
|
for (const [originalPath, ruleValue] of Object.entries(routeRules)) {
|
|
617
|
-
if (originalPath.startsWith("/api"))
|
|
617
|
+
if (originalPath.startsWith("/api")) {
|
|
618
618
|
continue;
|
|
619
|
+
}
|
|
619
620
|
localeManager.locales.forEach((localeObj) => {
|
|
620
621
|
const localeCode = localeObj.code;
|
|
621
622
|
const isDefaultLocale = localeCode === defaultLocale;
|
|
@@ -625,15 +626,16 @@ const module = defineNuxtModule({
|
|
|
625
626
|
}
|
|
626
627
|
const suffix = originalPath === "/" ? "" : originalPath;
|
|
627
628
|
const localizedPath = `/${localeCode}${suffix}`;
|
|
629
|
+
const { redirect, ...restRuleValue } = ruleValue;
|
|
630
|
+
if (!Object.keys(restRuleValue).length) {
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
628
633
|
nitroConfig.routeRules = nitroConfig.routeRules || {};
|
|
629
634
|
nitroConfig.routeRules[localizedPath] = {
|
|
630
635
|
...nitroConfig.routeRules[localizedPath],
|
|
631
|
-
...
|
|
636
|
+
...restRuleValue
|
|
632
637
|
};
|
|
633
|
-
|
|
634
|
-
nitroConfig.routeRules[localizedPath].redirect = `/${localeCode}${ruleValue.redirect}`;
|
|
635
|
-
}
|
|
636
|
-
logger.debug(`Replicated routeRule for ${localizedPath}: ${JSON.stringify(ruleValue)}`);
|
|
638
|
+
logger.debug(`Replicated routeRule for ${localizedPath}: ${JSON.stringify(restRuleValue)}`);
|
|
637
639
|
});
|
|
638
640
|
}
|
|
639
641
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useTranslationHelper, interpolate, isNoPrefixStrategy, RouteService, FormatService } from "nuxt-i18n-micro-core";
|
|
2
|
-
import { defineNuxtPlugin, useRuntimeConfig } from "#
|
|
3
|
-
import { useRouter, useCookie, useState, unref, navigateTo } from "#imports";
|
|
2
|
+
import { useRouter, useCookie, useState, unref, navigateTo, defineNuxtPlugin, useRuntimeConfig } from "#imports";
|
|
4
3
|
import { plural } from "#build/i18n.plural.mjs";
|
|
5
4
|
const i18nHelper = useTranslationHelper();
|
|
6
5
|
const isDev = process.env.NODE_ENV !== "production";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isNoPrefixStrategy, isPrefixStrategy } from "nuxt-i18n-micro-core";
|
|
2
|
-
import { defineNuxtPlugin, navigateTo, useRuntimeConfig } from "#
|
|
3
|
-
import { unref, useRoute, useRouter, useNuxtApp, watch, computed, onUnmounted } from "#imports";
|
|
2
|
+
import { unref, useRoute, useRouter, useNuxtApp, watch, computed, onUnmounted, defineNuxtPlugin, navigateTo, useRuntimeConfig } from "#imports";
|
|
4
3
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
|
5
4
|
const config = useRuntimeConfig();
|
|
6
5
|
const route = useRoute();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isPrefixStrategy, isNoPrefixStrategy } from "nuxt-i18n-micro-core";
|
|
2
|
-
import { defineNuxtPlugin, useCookie, useRequestHeaders, navigateTo } from "#
|
|
3
|
-
import { useRoute, useRouter } from "#imports";
|
|
2
|
+
import { defineNuxtPlugin, useCookie, useRequestHeaders, navigateTo, useRoute, useRouter } from "#imports";
|
|
4
3
|
const parseAcceptLanguage = (acceptLanguage) => acceptLanguage.split(",").map((entry) => entry.split(";")[0].trim());
|
|
5
4
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
|
6
5
|
const i18nConfig = nuxtApp.$config.public.i18nConfig;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isNoPrefixStrategy, useTranslationHelper } from "nuxt-i18n-micro-core";
|
|
2
|
-
import { defineNuxtPlugin, useRuntimeConfig } from "#
|
|
3
|
-
import { useRouter } from "#imports";
|
|
2
|
+
import { defineNuxtPlugin, useRuntimeConfig, useRouter } from "#imports";
|
|
4
3
|
const i18nHelper = useTranslationHelper();
|
|
5
4
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
|
6
5
|
const config = useRuntimeConfig();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.76.
|
|
3
|
+
"version": "1.76.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",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"38589fcc-d716-4bad-b71f-acbb6a83596c","timestamp":1739981280984,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|