@axewo/fin-locale 3.0.3 → 3.0.4

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue-i18n"),p=require("vue"),o=require("@axewo/fin-core/locale"),L=require("./locales/zh-CN/index.cjs"),z=require("./locales/zh-CN/formula-additions.cjs"),F=require("./locales/en/index.cjs"),M=require("./locales/en/formula-additions.cjs"),_=require("./locales/zh-CN/platform.cjs"),b=require("./locales/en/platform.cjs");function a(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const i=o.mergeLocaleMessages(o.mergeLocaleMessages(L,z),_),l=o.mergeLocaleMessages(o.mergeLocaleMessages(F,M),b);function g(e,t="zh-CN"){let n=o.normalizeFinLocale(t)==="en"?l:i;for(const s of e.split("."))n=a(n)?n[s]:void 0;return typeof n=="string"?n:e}function d(e){const t={"zh-CN":o.mergeLocaleMessages({},i),en:o.mergeLocaleMessages({},l)};if(!a(e))return t;for(const[n,s]of Object.entries(e)){const r=o.normalizeAppLocale(n,"");!r||!a(s)||(t[r]=t[r]?o.mergeLocaleMessages(t[r],s):o.mergeLocaleMessages({},s))}return t}function f(e){const{messages:t,...n}=e||{};return u.createI18n({fallbackLocale:"zh-CN",legacy:!1,missingWarn:!1,fallbackWarn:!1,...n,locale:o.normalizeAppLocale(n.locale),messages:d(t)})}function m(){const{t:e,locale:t}=u.useI18n({useScope:"global"});return{t:e,locale:t,setLocale:n=>{t.value=o.normalizeAppLocale(n)}}}function I(){var n;const e=(n=p.getCurrentInstance())==null?void 0:n.appContext.app;if(!(e!=null&&e.__VUE_I18N_SYMBOL__))return s=>g(s);const{t}=m();return s=>t(s)}function q(e,t){const n=e,s=n.__VUE_I18N_SYMBOL__;if(s){const c=n._context.provides[s];if(c)return c}const r=f(t);return e.use(r),r}Object.defineProperty(exports,"normalizeAppLocale",{enumerable:!0,get:()=>o.normalizeAppLocale});Object.defineProperty(exports,"normalizeFinLocale",{enumerable:!0,get:()=>o.normalizeFinLocale});exports.createFinI18n=f;exports.en=l;exports.installFinI18n=q;exports.translateFinBuiltin=g;exports.useFinLocale=m;exports.useFinText=I;exports.zhCN=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("vue-i18n"),p=require("vue"),o=require("@axewo/fin-core/locale"),L=require("./locales/zh-CN/index.cjs"),d=require("./locales/zh-CN/formula-additions.cjs"),z=require("./locales/en/index.cjs"),F=require("./locales/en/formula-additions.cjs"),M=require("./locales/zh-CN/platform.cjs"),_=require("./locales/en/platform.cjs");function l(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const i=o.mergeLocaleMessages(o.mergeLocaleMessages(L,d),M),u=o.mergeLocaleMessages(o.mergeLocaleMessages(z,F),_);function c(e,t="zh-CN"){let n=o.normalizeFinLocale(t)==="en"?u:i;for(const r of e.split("."))n=l(n)?n[r]:void 0;return typeof n=="string"?n:e}function b(e){const t={"zh-CN":o.mergeLocaleMessages({},i),en:o.mergeLocaleMessages({},u)};if(!l(e))return t;for(const[n,r]of Object.entries(e)){const s=o.normalizeAppLocale(n,"");!s||!l(r)||(t[s]=t[s]?o.mergeLocaleMessages(t[s],r):o.mergeLocaleMessages({},r))}return t}function f(e){const{messages:t,...n}=e||{};return g.createI18n({fallbackLocale:"zh-CN",legacy:!1,missingWarn:!1,fallbackWarn:!1,...n,locale:o.normalizeAppLocale(n.locale),messages:b(t)})}function m(){const{t:e,locale:t}=g.useI18n({useScope:"global"});return{t:e,locale:t,setLocale:n=>{t.value=o.normalizeAppLocale(n)}}}function I(){var r;const e=(r=p.getCurrentInstance())==null?void 0:r.appContext.app;if(!(e!=null&&e.__VUE_I18N_SYMBOL__))return s=>c(s);const{t,locale:n}=m();return s=>{const a=t(s);return a===s?c(s,n.value):a}}function q(e,t){const n=e,r=n.__VUE_I18N_SYMBOL__;if(r){const a=n._context.provides[r];if(a)return a}const s=f(t);return e.use(s),s}Object.defineProperty(exports,"normalizeAppLocale",{enumerable:!0,get:()=>o.normalizeAppLocale});Object.defineProperty(exports,"normalizeFinLocale",{enumerable:!0,get:()=>o.normalizeFinLocale});exports.createFinI18n=f;exports.en=u;exports.installFinI18n=q;exports.translateFinBuiltin=c;exports.useFinLocale=m;exports.useFinText=I;exports.zhCN=i;
@@ -1,82 +1,85 @@
1
- import { createI18n as m, useI18n as u } from "vue-i18n";
2
- import { getCurrentInstance as p } from "vue";
3
- import { mergeLocaleMessages as r, normalizeAppLocale as a, normalizeFinLocale as g } from "@axewo/fin-core/locale";
1
+ import { createI18n as u, useI18n as p } from "vue-i18n";
2
+ import { getCurrentInstance as g } from "vue";
3
+ import { mergeLocaleMessages as s, normalizeAppLocale as l, normalizeFinLocale as _ } from "@axewo/fin-core/locale";
4
4
  import { normalizeAppLocale as U, normalizeFinLocale as V } from "@axewo/fin-core/locale";
5
- import _ from "./locales/zh-CN/index.mjs";
6
- import z from "./locales/zh-CN/formula-additions.mjs";
7
- import L from "./locales/en/index.mjs";
8
- import F from "./locales/en/formula-additions.mjs";
9
- import h from "./locales/zh-CN/platform.mjs";
10
- import C from "./locales/en/platform.mjs";
11
- function i(e) {
5
+ import z from "./locales/zh-CN/index.mjs";
6
+ import L from "./locales/zh-CN/formula-additions.mjs";
7
+ import F from "./locales/en/index.mjs";
8
+ import h from "./locales/en/formula-additions.mjs";
9
+ import C from "./locales/zh-CN/platform.mjs";
10
+ import I from "./locales/en/platform.mjs";
11
+ function a(e) {
12
12
  return typeof e == "object" && e !== null && !Array.isArray(e);
13
13
  }
14
- const l = r(r(_, z), h), f = r(r(L, F), C);
15
- function I(e, o = "zh-CN") {
16
- let n = g(o) === "en" ? f : l;
17
- for (const t of e.split(".")) n = i(n) ? n[t] : void 0;
14
+ const f = s(s(z, L), C), m = s(s(F, h), I);
15
+ function c(e, o = "zh-CN") {
16
+ let n = _(o) === "en" ? m : f;
17
+ for (const r of e.split(".")) n = a(n) ? n[r] : void 0;
18
18
  return typeof n == "string" ? n : e;
19
19
  }
20
20
  function N(e) {
21
21
  const o = {
22
- "zh-CN": r({}, l),
23
- en: r({}, f)
22
+ "zh-CN": s({}, f),
23
+ en: s({}, m)
24
24
  };
25
- if (!i(e))
25
+ if (!a(e))
26
26
  return o;
27
- for (const [n, t] of Object.entries(e)) {
28
- const s = a(n, "");
29
- !s || !i(t) || (o[s] = o[s] ? r(o[s], t) : r({}, t));
27
+ for (const [n, r] of Object.entries(e)) {
28
+ const t = l(n, "");
29
+ !t || !a(r) || (o[t] = o[t] ? s(o[t], r) : s({}, r));
30
30
  }
31
31
  return o;
32
32
  }
33
- function b(e) {
33
+ function d(e) {
34
34
  const { messages: o, ...n } = e || {};
35
- return m({
35
+ return u({
36
36
  fallbackLocale: "zh-CN",
37
37
  legacy: !1,
38
38
  missingWarn: !1,
39
39
  fallbackWarn: !1,
40
40
  ...n,
41
- locale: a(n.locale),
41
+ locale: l(n.locale),
42
42
  messages: N(o)
43
43
  });
44
44
  }
45
- function d() {
46
- const { t: e, locale: o } = u({ useScope: "global" });
45
+ function b() {
46
+ const { t: e, locale: o } = p({ useScope: "global" });
47
47
  return {
48
48
  t: e,
49
49
  locale: o,
50
50
  setLocale: (n) => {
51
- o.value = a(n);
51
+ o.value = l(n);
52
52
  }
53
53
  };
54
54
  }
55
- function v() {
56
- var n;
57
- const e = (n = p()) == null ? void 0 : n.appContext.app;
58
- if (!(e != null && e.__VUE_I18N_SYMBOL__)) return (t) => I(t);
59
- const { t: o } = d();
60
- return (t) => o(t);
55
+ function j() {
56
+ var r;
57
+ const e = (r = g()) == null ? void 0 : r.appContext.app;
58
+ if (!(e != null && e.__VUE_I18N_SYMBOL__)) return (t) => c(t);
59
+ const { t: o, locale: n } = b();
60
+ return (t) => {
61
+ const i = o(t);
62
+ return i === t ? c(t, n.value) : i;
63
+ };
61
64
  }
62
65
  function E(e, o) {
63
- const n = e, t = n.__VUE_I18N_SYMBOL__;
64
- if (t) {
65
- const c = n._context.provides[t];
66
- if (c)
67
- return c;
66
+ const n = e, r = n.__VUE_I18N_SYMBOL__;
67
+ if (r) {
68
+ const i = n._context.provides[r];
69
+ if (i)
70
+ return i;
68
71
  }
69
- const s = b(o);
70
- return e.use(s), s;
72
+ const t = d(o);
73
+ return e.use(t), t;
71
74
  }
72
75
  export {
73
- b as createFinI18n,
74
- f as en,
76
+ d as createFinI18n,
77
+ m as en,
75
78
  E as installFinI18n,
76
79
  U as normalizeAppLocale,
77
80
  V as normalizeFinLocale,
78
- I as translateFinBuiltin,
79
- d as useFinLocale,
80
- v as useFinText,
81
- l as zhCN
81
+ c as translateFinBuiltin,
82
+ b as useFinLocale,
83
+ j as useFinText,
84
+ f as zhCN
82
85
  };
@@ -1 +1 @@
1
- "use strict";const e={fin:{confirmation:{logoutTitle:"Sign out of the system?",logoutContent:"Unsaved changes will be lost after signing out.",logoutConfirm:"Sign out",unsavedTitle:"Discard changes?",unsavedContent:"The following changes have not been saved and will be lost when you leave.",continueEditing:"Continue editing",discardConfirm:"Discard and leave",currentPage:"Current page",unsavedForms:"Pages and forms with unsaved changes"},shell:{closePopover:"Close popover",expand:"Expand sidebar",collapse:"Collapse sidebar",search:"Search menus",searchPlaceholder:"Search menus and apps…",searchTitle:"Menu search",noResults:"No matching menus",notifications:"Notifications",noMessages:"Message service is not connected",messageHint:"Notifications will appear here after the service is connected.",profile:"My profile",exiting:"Confirming sign out…",closeTabMenu:"Close tab menu",leftTabs:"Scroll tabs left",rightTabs:"Scroll tabs right",openedPages:"Open pages",moreTabs:"More tab actions",tabMenu:"Tab actions",refresh:"Refresh page",close:"Close current",closeOthers:"Close others",closeLeft:"Close left",closeRight:"Close right",closeAll:"Close all business pages",mainNav:"Main navigation",ready:"Workspace is ready",closeTab:"Close",pageLoading:"Loading page…",pageFailed:"Page failed to load",reload:"Reload"},errors:{unauthenticated:"Your session has expired. Please sign in again.",forbidden:"403: You do not have permission for this action.",timeout:"The operation timed out. Please try again.",network:"Connection failed. Please check your network.",unknown:"The operation failed. Please try again or contact support.",cancelled:"Operation cancelled"},auth:{independent:"Standalone mode",login:"Sign in",logout:"Sign out",username:"Username",password:"Password",required:"Sign in to access business features.",devSettings:"Development settings",token:"Test token",verify:"Verify and apply",clear:"Clear credentials",close:"Close",configured:"Credentials configured",unconfigured:"No credentials configured",memoryHint:"Credentials are stored in memory and cleared when the page reloads.",developmentStorageHint:"Development credentials are stored locally and validated on reload. Clear credentials or sign out to remove them.",verifyHint:"User and permissions are updated only after the session endpoint validates the token.",saved:"Credentials verified",cleared:"Credentials cleared"},micro:{connected:"Connected to host",disconnected:"Host unavailable",workspace:"Workspace",language:"Language",standalone:"Standalone mode",loading:"Starting application, please wait…",retry:"Retry startup",startupFailed:"Application failed to start",startupCancelled:"Startup was cancelled. You can retry."}}};module.exports=e;
1
+ "use strict";const e={fin:{confirmation:{logoutTitle:"Sign out of the system?",logoutContent:"Unsaved changes will be lost after signing out.",logoutConfirm:"Sign out",unsavedTitle:"Discard changes?",unsavedContent:"The following changes have not been saved and will be lost when you leave.",continueEditing:"Continue editing",discardConfirm:"Discard and leave",currentPage:"Current page",unsavedForms:"Pages and forms with unsaved changes"},shell:{closePopover:"Close popover",expand:"Expand sidebar",collapse:"Collapse sidebar",search:"Search menus",searchPlaceholder:"Search menus and apps…",searchTitle:"Menu search",noResults:"No matching menus",notifications:"Notifications",noMessages:"Message service is not connected",messageHint:"Notifications will appear here after the service is connected.",profile:"My profile",exiting:"Confirming sign out…",closeTabMenu:"Close tab menu",leftTabs:"Scroll tabs left",rightTabs:"Scroll tabs right",openedPages:"Open pages",moreTabs:"More tab actions",tabMenu:"Tab actions",refresh:"Refresh page",close:"Close current",closeOthers:"Close others",closeLeft:"Close left",closeRight:"Close right",closeAll:"Close all business pages",mainNav:"Main navigation",ready:"Workspace is ready",closeTab:"Close",pageLoading:"Loading page…",pageFailed:"Page failed to load",reload:"Reload"},errors:{unauthenticated:"Your session has expired. Please sign in again.",forbidden:"403: You do not have permission for this action.",timeout:"The operation timed out. Please try again.",network:"Connection failed. Please check your network.",unknown:"The operation failed. Please try again or contact support.",cancelled:"Operation cancelled"},auth:{independent:"Standalone mode",login:"Sign in",logout:"Sign out",username:"Username",password:"Password",required:"Sign in to access business features.",devSettings:"Development settings",token:"Test token",verify:"Verify and apply",clear:"Clear credentials",close:"Close",configured:"Credentials configured",unconfigured:"No credentials configured",memoryHint:"Credentials are stored in memory and cleared when the page reloads.",developmentStorageHint:"Development credentials are stored locally and validated on reload. Clear credentials or sign out to remove them.",verifyHint:"User and permissions are updated only after the session endpoint validates the token.",saved:"Credentials verified",cleared:"Credentials cleared"},micro:{connected:"Connected to host",disconnected:"Host unavailable",workspace:"Workspace",language:"Language",standalone:"Standalone mode",loading:"Starting application, please wait…",retry:"Retry startup",appLoading:"Loading application…",loadFailed:"Application failed to load",loadFailedDescription:"Please reload or contact your administrator",reload:"Reload",startupFailed:"Application failed to start",startupCancelled:"Startup was cancelled. You can retry."}}};module.exports=e;
@@ -79,6 +79,10 @@ const e = {
79
79
  standalone: "Standalone mode",
80
80
  loading: "Starting application, please wait…",
81
81
  retry: "Retry startup",
82
+ appLoading: "Loading application…",
83
+ loadFailed: "Application failed to load",
84
+ loadFailedDescription: "Please reload or contact your administrator",
85
+ reload: "Reload",
82
86
  startupFailed: "Application failed to start",
83
87
  startupCancelled: "Startup was cancelled. You can retry."
84
88
  }
@@ -1 +1 @@
1
- "use strict";const e={fin:{confirmation:{logoutTitle:"是否退出管理系统?",logoutContent:"退出后,未保存的内容将丢失。",logoutConfirm:"确认退出",unsavedTitle:"是否放弃修改?",unsavedContent:"以下内容尚未保存,离开后本次修改将丢失。",continueEditing:"继续编辑",discardConfirm:"放弃修改并离开",currentPage:"当前页面",unsavedForms:"未保存的页面和表单"},shell:{closePopover:"关闭弹出菜单",expand:"展开侧栏",collapse:"折叠侧栏",search:"搜索菜单",searchPlaceholder:"搜索菜单、应用…",searchTitle:"菜单搜索",noResults:"未找到匹配的菜单",notifications:"消息通知",noMessages:"尚未接入消息服务",messageHint:"接入后将在这里显示真实的通知消息。",profile:"个人中心",exiting:"正在确认退出…",closeTabMenu:"关闭页签菜单",leftTabs:"向左查看页签",rightTabs:"向右查看页签",openedPages:"已打开页面",moreTabs:"更多页签操作",tabMenu:"页签操作菜单",refresh:"刷新页面",close:"关闭当前",closeOthers:"关闭其他",closeLeft:"关闭左侧",closeRight:"关闭右侧",closeAll:"关闭全部业务页",mainNav:"主导航",ready:"工作空间已就绪",closeTab:"关闭",pageLoading:"页面加载中…",pageFailed:"页面加载失败",reload:"重新加载"},errors:{unauthenticated:"登录已失效,请重新登录",forbidden:"403:无权执行此操作,请联系管理员",timeout:"操作超时,请稍后重试",network:"连接失败,请检查网络后重试",unknown:"操作失败,请稍后重试或联系管理员",cancelled:"操作已取消"},auth:{independent:"独立运行",login:"登录",logout:"退出登录",username:"账号",password:"密码",required:"请登录后访问业务功能",devSettings:"开发设置",token:"测试 Token",verify:"验证并应用",clear:"清除凭据",close:"关闭",configured:"已配置凭据",unconfigured:"未配置凭据",memoryHint:"凭据仅保存在内存,刷新页面后需重新设置。",developmentStorageHint:"开发凭据保存在本地,刷新后自动验证恢复;清除凭据或退出登录时删除。",verifyHint:"验证会话接口成功后才会更新用户与权限。",saved:"凭据已验证",cleared:"凭据已清除"},micro:{connected:"宿主已连接",disconnected:"未连接宿主",workspace:"工作空间",language:"语言",standalone:"独立运行",loading:"正在启动应用,请稍候…",retry:"重试启动",startupFailed:"应用启动失败",startupCancelled:"应用启动已取消,可重试启动"}}};module.exports=e;
1
+ "use strict";const e={fin:{confirmation:{logoutTitle:"是否退出管理系统?",logoutContent:"退出后,未保存的内容将丢失。",logoutConfirm:"确认退出",unsavedTitle:"是否放弃修改?",unsavedContent:"以下内容尚未保存,离开后本次修改将丢失。",continueEditing:"继续编辑",discardConfirm:"放弃修改并离开",currentPage:"当前页面",unsavedForms:"未保存的页面和表单"},shell:{closePopover:"关闭弹出菜单",expand:"展开侧栏",collapse:"折叠侧栏",search:"搜索菜单",searchPlaceholder:"搜索菜单、应用…",searchTitle:"菜单搜索",noResults:"未找到匹配的菜单",notifications:"消息通知",noMessages:"尚未接入消息服务",messageHint:"接入后将在这里显示真实的通知消息。",profile:"个人中心",exiting:"正在确认退出…",closeTabMenu:"关闭页签菜单",leftTabs:"向左查看页签",rightTabs:"向右查看页签",openedPages:"已打开页面",moreTabs:"更多页签操作",tabMenu:"页签操作菜单",refresh:"刷新页面",close:"关闭当前",closeOthers:"关闭其他",closeLeft:"关闭左侧",closeRight:"关闭右侧",closeAll:"关闭全部业务页",mainNav:"主导航",ready:"工作空间已就绪",closeTab:"关闭",pageLoading:"页面加载中…",pageFailed:"页面加载失败",reload:"重新加载"},errors:{unauthenticated:"登录已失效,请重新登录",forbidden:"403:无权执行此操作,请联系管理员",timeout:"操作超时,请稍后重试",network:"连接失败,请检查网络后重试",unknown:"操作失败,请稍后重试或联系管理员",cancelled:"操作已取消"},auth:{independent:"独立运行",login:"登录",logout:"退出登录",username:"账号",password:"密码",required:"请登录后访问业务功能",devSettings:"开发设置",token:"测试 Token",verify:"验证并应用",clear:"清除凭据",close:"关闭",configured:"已配置凭据",unconfigured:"未配置凭据",memoryHint:"凭据仅保存在内存,刷新页面后需重新设置。",developmentStorageHint:"开发凭据保存在本地,刷新后自动验证恢复;清除凭据或退出登录时删除。",verifyHint:"验证会话接口成功后才会更新用户与权限。",saved:"凭据已验证",cleared:"凭据已清除"},micro:{connected:"宿主已连接",disconnected:"未连接宿主",workspace:"工作空间",language:"语言",standalone:"独立运行",loading:"正在启动应用,请稍候…",retry:"重试启动",appLoading:"子应用加载中…",loadFailed:"子应用加载失败",loadFailedDescription:"请重新加载或联系管理员",reload:"重新加载",startupFailed:"应用启动失败",startupCancelled:"应用启动已取消,可重试启动"}}};module.exports=e;
@@ -79,6 +79,10 @@ const e = {
79
79
  standalone: "独立运行",
80
80
  loading: "正在启动应用,请稍候…",
81
81
  retry: "重试启动",
82
+ appLoading: "子应用加载中…",
83
+ loadFailed: "子应用加载失败",
84
+ loadFailedDescription: "请重新加载或联系管理员",
85
+ reload: "重新加载",
82
86
  startupFailed: "应用启动失败",
83
87
  startupCancelled: "应用启动已取消,可重试启动"
84
88
  }
@@ -80,6 +80,10 @@ declare const _default: {
80
80
  standalone: string;
81
81
  loading: string;
82
82
  retry: string;
83
+ appLoading: string;
84
+ loadFailed: string;
85
+ loadFailedDescription: string;
86
+ reload: string;
83
87
  startupFailed: string;
84
88
  startupCancelled: string;
85
89
  };
@@ -80,6 +80,10 @@ declare const _default: {
80
80
  standalone: string;
81
81
  loading: string;
82
82
  retry: string;
83
+ appLoading: string;
84
+ loadFailed: string;
85
+ loadFailedDescription: string;
86
+ reload: string;
83
87
  startupFailed: string;
84
88
  startupCancelled: string;
85
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axewo/fin-locale",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",