nuxt-i18n-micro 1.11.1 → 1.12.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 +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/1ab60d52-2c05-4618-8e25-19d2de5cb6af.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +1 -0
- package/dist/module.d.ts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +14 -10
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/721360c4-039e-4946-a38d-6794f6cf340b.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:"1ab60d52-2c05-4618-8e25-19d2de5cb6af",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:"1ab60d52-2c05-4618-8e25-19d2de5cb6af",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"1ab60d52-2c05-4618-8e25-19d2de5cb6af","timestamp":1725115421029}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"1ab60d52-2c05-4618-8e25-19d2de5cb6af","timestamp":1725115421029,"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:"1ab60d52-2c05-4618-8e25-19d2de5cb6af",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -102,6 +102,7 @@ const module = defineNuxtModule({
|
|
|
102
102
|
translationDir: "locales",
|
|
103
103
|
autoDetectLanguage: true,
|
|
104
104
|
disablePageLocales: false,
|
|
105
|
+
disableWatcher: false,
|
|
105
106
|
includeDefaultLocaleRoute: false,
|
|
106
107
|
routesLocaleLinks: {},
|
|
107
108
|
plural: `function (translation, count, _locale) {
|
|
@@ -135,6 +136,7 @@ const module = defineNuxtModule({
|
|
|
135
136
|
meta: options.meta ?? true,
|
|
136
137
|
metaBaseUrl: options.metaBaseUrl ?? void 0,
|
|
137
138
|
define: options.define ?? true,
|
|
139
|
+
disableWatcher: options.disableWatcher ?? false,
|
|
138
140
|
defaultLocale: options.defaultLocale ?? "en",
|
|
139
141
|
translationDir: options.translationDir ?? "locales",
|
|
140
142
|
autoDetectLanguage: options.autoDetectLanguage ?? true,
|
|
@@ -214,16 +216,18 @@ const module = defineNuxtModule({
|
|
|
214
216
|
writeFileSync(filePath, JSON.stringify({}), "utf-8");
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
if (!options.disableWatcher) {
|
|
220
|
+
locales.forEach((locale) => {
|
|
221
|
+
const globalFilePath = path.join(nuxt.options.rootDir, options.translationDir, `${locale.code}.json`);
|
|
222
|
+
ensureFileExists(globalFilePath);
|
|
223
|
+
if (!options.disablePageLocales) {
|
|
224
|
+
pagesNames.forEach((name) => {
|
|
225
|
+
const pageFilePath = path.join(pagesDir, `${name}/${locale.code}.json`);
|
|
226
|
+
ensureFileExists(pageFilePath);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
227
231
|
const newRoutes = [];
|
|
228
232
|
for (let i = 0; i < pages.length; i++) {
|
|
229
233
|
let localizeChildren = function(routes, parentPath = "") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.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":"721360c4-039e-4946-a38d-6794f6cf340b","timestamp":1725113752053,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|