@ubean/i18n 0.3.3 → 0.3.5
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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as extractLocaleFromPath, c as switchLocalePath, i as compileLocalePaths, l as toVueRouterLocalePath, n as parseLocaleCookie, o as getVueLocaleParam, r as serializeLocaleCookie, s as localizePath, t as detectLocaleFromAcceptLanguage } from "./detect-BIURd4aL.js";
|
|
2
|
-
import { C as t, S as setLocaleMeta, _ as n, a as d, b as setFallbackLocale, c as getI18nScope, d as getLocaleMeta, f as getLocaleName, g as mergeLocaleMessages, h as listLocaleCodes, i as createRequestContext, l as getLocaleDir, m as getRequestLocale, n as getPathWithoutLocale, o as ensureLocaleMessages, p as getRegisteredLocalesMeta, r as getRequestLocale$1, s as getFallbackLocale, t as createI18nMiddleware, u as getLocaleMessages, v as registerLocaleLoader, x as setLocaleMessages, y as runWithI18n } from "./routing-
|
|
2
|
+
import { C as t, S as setLocaleMeta, _ as n, a as d, b as setFallbackLocale, c as getI18nScope, d as getLocaleMeta, f as getLocaleName, g as mergeLocaleMessages, h as listLocaleCodes, i as createRequestContext, l as getLocaleDir, m as getRequestLocale, n as getPathWithoutLocale, o as ensureLocaleMessages, p as getRegisteredLocalesMeta, r as getRequestLocale$1, s as getFallbackLocale, t as createI18nMiddleware, u as getLocaleMessages, v as registerLocaleLoader, x as setLocaleMessages, y as runWithI18n } from "./routing-Psxmai55.js";
|
|
3
3
|
import { t as buildLocaleHead } from "./head-BzEFwnlD.js";
|
|
4
4
|
export { buildLocaleHead, compileLocalePaths, createI18nMiddleware, createRequestContext, d, detectLocaleFromAcceptLanguage, ensureLocaleMessages, extractLocaleFromPath, getRequestLocale as getAlsLocale, getFallbackLocale, getI18nScope, getLocaleDir, getLocaleMessages, getLocaleMeta, getLocaleName, getPathWithoutLocale, getRegisteredLocalesMeta, getRequestLocale$1 as getRequestLocale, getVueLocaleParam, listLocaleCodes, localizePath, mergeLocaleMessages, n, parseLocaleCookie, registerLocaleLoader, runWithI18n, serializeLocaleCookie, setFallbackLocale, setLocaleMessages, setLocaleMeta, switchLocalePath, t, toVueRouterLocalePath };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as extractLocaleFromPath, n as parseLocaleCookie, r as serializeLocaleCookie, s as localizePath, t as detectLocaleFromAcceptLanguage } from "./detect-BIURd4aL.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
-
import {
|
|
3
|
+
import { createCoreContext, datetime, number, translate } from "@intlify/core";
|
|
4
4
|
//#region src/context.ts
|
|
5
5
|
/**
|
|
6
6
|
* Request-scoped i18n engine (@intlify/core).
|
|
@@ -16,15 +16,13 @@ import { compile, createCoreContext, datetime, number, registerMessageCompiler,
|
|
|
16
16
|
* 挂在 `globalThis` 上,保证两份模块读写同一份状态;`t()` 委托 scope 上
|
|
17
17
|
* 绑定的 translate(与创建 ctx 的那份 `@intlify/core` 一致)。
|
|
18
18
|
*/
|
|
19
|
-
registerMessageCompiler(compile);
|
|
20
19
|
function createI18nCoreContext(locale, fallback, messages) {
|
|
21
20
|
return createCoreContext({
|
|
22
21
|
locale,
|
|
23
22
|
fallbackLocale: fallback,
|
|
24
23
|
messages,
|
|
25
24
|
missingWarn: false,
|
|
26
|
-
fallbackWarn: false
|
|
27
|
-
messageCompiler: compile
|
|
25
|
+
fallbackWarn: false
|
|
28
26
|
});
|
|
29
27
|
}
|
|
30
28
|
const ENGINE_KEY = "__UBEAN_I18N_ENGINE__";
|
package/dist/routing.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as extractLocaleFromPath, c as switchLocalePath, i as compileLocalePaths, s as localizePath } from "./detect-BIURd4aL.js";
|
|
2
|
-
import { n as getPathWithoutLocale, r as getRequestLocale, t as createI18nMiddleware } from "./routing-
|
|
2
|
+
import { n as getPathWithoutLocale, r as getRequestLocale, t as createI18nMiddleware } from "./routing-Psxmai55.js";
|
|
3
3
|
export { compileLocalePaths, createI18nMiddleware, extractLocaleFromPath, getPathWithoutLocale, getRequestLocale, localizePath, switchLocalePath };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/i18n",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "i18n for ubean (vue-i18n / @intlify/core, compact locale routing, ALS)",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@intlify/core": "11.4.10",
|
|
28
|
-
"@ubean/shared": "0.3.
|
|
28
|
+
"@ubean/shared": "0.3.5",
|
|
29
29
|
"hono": "4.13.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|