nuxt-i18n-micro 1.65.2 → 1.65.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.
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737366464003,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"7c39f1aa-be74-4ec0-9bb5-f41b62da6a20",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737372517457,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737366464003,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"7c39f1aa-be74-4ec0-9bb5-f41b62da6a20",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737372517458,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- {"id":"7c39f1aa-be74-4ec0-9bb5-f41b62da6a20","timestamp":1737366458763}
1
+ {"id":"215568f4-8658-4051-a067-645327df38fa","timestamp":1737372512028}
@@ -0,0 +1 @@
1
+ {"id":"215568f4-8658-4051-a067-645327df38fa","timestamp":1737372512028,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737366464004,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"7c39f1aa-be74-4ec0-9bb5-f41b62da6a20",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.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},1737372517458,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
3
  "configKey": "i18n",
4
- "version": "1.65.2",
4
+ "version": "1.65.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -8,7 +8,7 @@ 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) => Translation;
11
+ t: (key: string, params?: Params, defaultValue?: string | null) => Translation;
12
12
  ts: (key: string, params?: Params, defaultValue?: string) => string;
13
13
  tc: (key: string, params: number | Params, defaultValue?: string) => string;
14
14
  tn: (value: number, options?: Intl.NumberFormatOptions) => string;
@@ -32,7 +32,7 @@ declare const _default: import("nuxt/app").Plugin<{
32
32
  defaultLocale: () => string | undefined;
33
33
  getLocales: () => Locale[];
34
34
  getRouteName: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric, locale?: string) => string;
35
- t: (key: string, params?: Params, defaultValue?: string) => Translation;
35
+ t: (key: string, params?: Params, defaultValue?: string | null) => Translation;
36
36
  ts: (key: string, params?: Params, defaultValue?: string) => string;
37
37
  tc: (key: string, params: number | Params, defaultValue?: string) => string;
38
38
  tn: (value: number, options?: Intl.NumberFormatOptions) => string;
@@ -122,7 +122,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
122
122
  if (isDev && import.meta.client) {
123
123
  console.warn(`Not found '${key}' key in '${locale}' locale messages.`);
124
124
  }
125
- value = defaultValue || key;
125
+ value = defaultValue === void 0 ? key : defaultValue;
126
126
  }
127
127
  return typeof value === "string" && params ? interpolate(value, params) : value;
128
128
  },
@@ -148,7 +148,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
148
148
  return translationService.formatRelativeTime(value, currentLocale, options);
149
149
  },
150
150
  has: (key) => {
151
- return !!provideData.t(key);
151
+ return !!provideData.t(key, {}, null);
152
152
  },
153
153
  mergeTranslations: (newTranslations) => {
154
154
  const route = routeService.getCurrentRoute();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "1.65.2",
3
+ "version": "1.65.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":"7c39f1aa-be74-4ec0-9bb5-f41b62da6a20","timestamp":1737366458763,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}