@object-ui/i18n 13.2.0 → 14.0.0

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.
@@ -254,6 +254,7 @@ declare const zh: {
254
254
  };
255
255
  readonly downloadTemplate: "下载模板";
256
256
  readonly downloadTemplateHint: "获取带正确列的 CSV(必填字段标 *)。";
257
+ readonly templateFileName: "{{object}}-导入模板";
257
258
  readonly validate: "校验数据";
258
259
  readonly validateHint: "导入前在服务端逐行校验。";
259
260
  readonly validating: "校验中…";
@@ -418,6 +419,28 @@ declare const zh: {
418
419
  readonly inlineEditLabel: "行内编辑记录(点击单元格进行编辑)";
419
420
  readonly recordEditingTitle: "记录编辑";
420
421
  };
422
+ readonly managedByBadge: {
423
+ readonly config: {
424
+ readonly short: "管理配置";
425
+ readonly title: "管理员配置";
426
+ readonly body: "这些记录定义平台的运行时行为。请在此处编写配置;其产生的运行时数据存放在单独的表中。";
427
+ };
428
+ readonly system: {
429
+ readonly short: "系统管理";
430
+ readonly title: "由平台管理";
431
+ readonly body: "当源记录上的操作运行时,这里的行会自动创建。下方列表是只读监控界面——行级操作(批准、撤回、重发等)在每一行上。";
432
+ };
433
+ readonly appendOnly: {
434
+ readonly short: "只读 · 审计日志";
435
+ readonly title: "只读历史记录";
436
+ readonly body: "不可变审计日志。行由平台在事件发生时写入,不能在界面上创建、编辑或删除。可使用导出功能下载以供合规审查。";
437
+ };
438
+ readonly betterAuth: {
439
+ readonly short: "身份";
440
+ readonly title: "由身份提供方管理";
441
+ readonly body: "此对象的架构由 {{provider}} 管理。直接编辑会绕过密码哈希、会话校验、两步验证检查和审计钩子。请通过身份认证提供方的登录、邀请和安全流程管理这些记录。";
442
+ };
443
+ };
421
444
  readonly kanban: {
422
445
  readonly addCard: "添加卡片";
423
446
  readonly addColumn: "添加列";
@@ -477,7 +500,7 @@ declare const zh: {
477
500
  readonly row: {
478
501
  readonly expand: "展开";
479
502
  readonly collapse: "收起";
480
- readonly locate: "在甘特图上定位";
503
+ readonly open: "打开详情";
481
504
  };
482
505
  readonly aria: {
483
506
  readonly taskList: "任务列表";
@@ -493,6 +516,25 @@ declare const zh: {
493
516
  readonly addSuccessor: "添加后置任务…";
494
517
  readonly removeDependency: "移除依赖";
495
518
  readonly noCandidates: "无可用任务";
519
+ readonly searchTasks: "搜索任务…";
520
+ readonly qrcode: "移动端二维码";
521
+ };
522
+ readonly qr: {
523
+ readonly title: "在手机上打开";
524
+ readonly hint: "用手机扫码打开详情页";
525
+ readonly copy: "复制链接";
526
+ readonly copied: "已复制";
527
+ readonly close: "关闭";
528
+ };
529
+ readonly delete: {
530
+ readonly title: "删除此任务?";
531
+ readonly body: "\"{{title}}\" 将被永久删除,此操作无法撤销。";
532
+ readonly cancel: "取消";
533
+ readonly confirm: "删除";
534
+ readonly deleting: "删除中…";
535
+ };
536
+ readonly drawer: {
537
+ readonly fallbackTitle: "任务详情";
496
538
  };
497
539
  readonly linkType: {
498
540
  readonly fs: "完成 → 开始";
@@ -514,6 +556,8 @@ declare const zh: {
514
556
  };
515
557
  readonly readOnly: "只读";
516
558
  readonly readOnlyHint: "此视图已禁用编辑。";
559
+ readonly lockedHint: "无编辑权限";
560
+ readonly writeFailed: "保存失败,已恢复修改前状态";
517
561
  };
518
562
  readonly view: {
519
563
  readonly editViewConfig: "编辑视图配置";
@@ -1265,6 +1309,7 @@ declare const zh: {
1265
1309
  readonly seedWarn: "已发布,但部分示例数据未能载入。";
1266
1310
  readonly openBuiltApp: "打开应用";
1267
1311
  readonly previewDraft: "预览";
1312
+ readonly previewApp: "预览应用";
1268
1313
  readonly resizeSplit: "调整对话与预览的宽度";
1269
1314
  readonly hideChats: "隐藏对话列表";
1270
1315
  readonly showChats: "显示对话列表";
@@ -1571,6 +1616,7 @@ declare const zh: {
1571
1616
  readonly errors: {
1572
1617
  readonly invalidCredentials: "邮箱或密码错误,请重试。";
1573
1618
  readonly emailNotVerified: "请先验证您的邮箱后再登录。";
1619
+ readonly oauthCallbackFailed: "单点登录未能完成——登录链接已过期或已被使用,请重新发起登录。";
1574
1620
  };
1575
1621
  };
1576
1622
  readonly register: {
@@ -1709,6 +1755,43 @@ declare const zh: {
1709
1755
  readonly tenantHostHint: "您正在登录此工作区";
1710
1756
  };
1711
1757
  };
1758
+ readonly profile: {
1759
+ readonly title: "个人资料";
1760
+ readonly subtitle: "管理您的账户设置";
1761
+ readonly saving: "保存中…";
1762
+ readonly avatar: {
1763
+ readonly upload: "上传";
1764
+ readonly replace: "更换";
1765
+ readonly remove: "移除";
1766
+ };
1767
+ readonly info: {
1768
+ readonly title: "个人信息";
1769
+ readonly description: "更新您的姓名并查看账户详情";
1770
+ readonly saved: "个人资料已更新。";
1771
+ readonly name: "姓名";
1772
+ readonly email: "邮箱";
1773
+ readonly emailImmutable: "邮箱不可修改。";
1774
+ readonly role: "角色";
1775
+ readonly save: "保存更改";
1776
+ };
1777
+ readonly password: {
1778
+ readonly changeTitle: "修改密码";
1779
+ readonly setTitle: "设置本地密码";
1780
+ readonly changeDescription: "更新您在此环境登录所用的密码。";
1781
+ readonly setDescription: "您通过单点登录进入。设置本地密码后,也可以在此环境使用邮箱和密码登录。";
1782
+ readonly current: "当前密码";
1783
+ readonly new: "新密码";
1784
+ readonly password: "密码";
1785
+ readonly confirm: "确认密码";
1786
+ readonly tooShort: "密码长度至少为 8 个字符";
1787
+ readonly mismatch: "两次输入的密码不一致";
1788
+ readonly enterCurrent: "请输入当前密码";
1789
+ readonly changed: "密码已修改。";
1790
+ readonly localSet: "本地密码已设置。现在您可以在此环境使用邮箱和密码登录。";
1791
+ readonly changeAction: "修改密码";
1792
+ readonly setAction: "设置密码";
1793
+ };
1794
+ };
1712
1795
  readonly errors: {
1713
1796
  readonly networkError: "网络错误,请检查网络连接。";
1714
1797
  readonly serverError: "服务器错误,请稍后重试。";
@@ -2033,6 +2116,8 @@ declare const zh: {
2033
2116
  readonly deleteFailed: "删除 {{label}} 失败";
2034
2117
  readonly noRecordId: "未提供记录 ID";
2035
2118
  readonly deleteConfirm: "确定要删除此记录吗?";
2119
+ readonly resetPackageSetConfirm: "该权限集随已安装的软件包发布,无法删除。删除操作将丢弃环境定制并把它重置为发布基线。是否继续?";
2120
+ readonly resetPackageSetSuccess: "权限集已重置为发布基线";
2036
2121
  readonly bulkDeleteSuccess: "已删除 {{count}} 条 {{label}} 记录";
2037
2122
  readonly bulkDeletePartial: "成功 {{succeeded}} 条,失败 {{failed}} 条";
2038
2123
  };
@@ -256,6 +256,7 @@ const zh = {
256
256
  // 下载模板
257
257
  downloadTemplate: '下载模板',
258
258
  downloadTemplateHint: '获取带正确列的 CSV(必填字段标 *)。',
259
+ templateFileName: '{{object}}-导入模板',
259
260
  // 校验(服务端 dryRun 预检)
260
261
  validate: '校验数据',
261
262
  validateHint: '导入前在服务端逐行校验。',
@@ -427,6 +428,28 @@ const zh = {
427
428
  inlineEditLabel: '行内编辑记录(点击单元格进行编辑)',
428
429
  recordEditingTitle: '记录编辑',
429
430
  },
431
+ managedByBadge: {
432
+ config: {
433
+ short: '管理配置',
434
+ title: '管理员配置',
435
+ body: '这些记录定义平台的运行时行为。请在此处编写配置;其产生的运行时数据存放在单独的表中。',
436
+ },
437
+ system: {
438
+ short: '系统管理',
439
+ title: '由平台管理',
440
+ body: '当源记录上的操作运行时,这里的行会自动创建。下方列表是只读监控界面——行级操作(批准、撤回、重发等)在每一行上。',
441
+ },
442
+ appendOnly: {
443
+ short: '只读 · 审计日志',
444
+ title: '只读历史记录',
445
+ body: '不可变审计日志。行由平台在事件发生时写入,不能在界面上创建、编辑或删除。可使用导出功能下载以供合规审查。',
446
+ },
447
+ betterAuth: {
448
+ short: '身份',
449
+ title: '由身份提供方管理',
450
+ body: '此对象的架构由 {{provider}} 管理。直接编辑会绕过密码哈希、会话校验、两步验证检查和审计钩子。请通过身份认证提供方的登录、邀请和安全流程管理这些记录。',
451
+ },
452
+ },
430
453
  kanban: {
431
454
  addCard: '添加卡片',
432
455
  addColumn: '添加列',
@@ -486,7 +509,7 @@ const zh = {
486
509
  row: {
487
510
  expand: '展开',
488
511
  collapse: '收起',
489
- locate: '在甘特图上定位',
512
+ open: '打开详情',
490
513
  },
491
514
  aria: {
492
515
  taskList: '任务列表',
@@ -502,6 +525,25 @@ const zh = {
502
525
  addSuccessor: '添加后置任务…',
503
526
  removeDependency: '移除依赖',
504
527
  noCandidates: '无可用任务',
528
+ searchTasks: '搜索任务…',
529
+ qrcode: '移动端二维码',
530
+ },
531
+ qr: {
532
+ title: '在手机上打开',
533
+ hint: '用手机扫码打开详情页',
534
+ copy: '复制链接',
535
+ copied: '已复制',
536
+ close: '关闭',
537
+ },
538
+ delete: {
539
+ title: '删除此任务?',
540
+ body: '"{{title}}" 将被永久删除,此操作无法撤销。',
541
+ cancel: '取消',
542
+ confirm: '删除',
543
+ deleting: '删除中…',
544
+ },
545
+ drawer: {
546
+ fallbackTitle: '任务详情',
505
547
  },
506
548
  linkType: {
507
549
  fs: '完成 → 开始',
@@ -523,6 +565,8 @@ const zh = {
523
565
  },
524
566
  readOnly: '只读',
525
567
  readOnlyHint: '此视图已禁用编辑。',
568
+ lockedHint: '无编辑权限',
569
+ writeFailed: '保存失败,已恢复修改前状态',
526
570
  },
527
571
  view: {
528
572
  editViewConfig: '编辑视图配置',
@@ -1289,6 +1333,7 @@ const zh = {
1289
1333
  seedWarn: '已发布,但部分示例数据未能载入。',
1290
1334
  openBuiltApp: '打开应用',
1291
1335
  previewDraft: '预览',
1336
+ previewApp: '预览应用',
1292
1337
  resizeSplit: '调整对话与预览的宽度',
1293
1338
  hideChats: '隐藏对话列表',
1294
1339
  showChats: '显示对话列表',
@@ -1601,6 +1646,7 @@ const zh = {
1601
1646
  errors: {
1602
1647
  invalidCredentials: '邮箱或密码错误,请重试。',
1603
1648
  emailNotVerified: '请先验证您的邮箱后再登录。',
1649
+ oauthCallbackFailed: '单点登录未能完成——登录链接已过期或已被使用,请重新发起登录。',
1604
1650
  },
1605
1651
  },
1606
1652
  register: {
@@ -1739,6 +1785,43 @@ const zh = {
1739
1785
  tenantHostHint: '您正在登录此工作区',
1740
1786
  },
1741
1787
  },
1788
+ profile: {
1789
+ title: '个人资料',
1790
+ subtitle: '管理您的账户设置',
1791
+ saving: '保存中…',
1792
+ avatar: {
1793
+ upload: '上传',
1794
+ replace: '更换',
1795
+ remove: '移除',
1796
+ },
1797
+ info: {
1798
+ title: '个人信息',
1799
+ description: '更新您的姓名并查看账户详情',
1800
+ saved: '个人资料已更新。',
1801
+ name: '姓名',
1802
+ email: '邮箱',
1803
+ emailImmutable: '邮箱不可修改。',
1804
+ role: '角色',
1805
+ save: '保存更改',
1806
+ },
1807
+ password: {
1808
+ changeTitle: '修改密码',
1809
+ setTitle: '设置本地密码',
1810
+ changeDescription: '更新您在此环境登录所用的密码。',
1811
+ setDescription: '您通过单点登录进入。设置本地密码后,也可以在此环境使用邮箱和密码登录。',
1812
+ current: '当前密码',
1813
+ new: '新密码',
1814
+ password: '密码',
1815
+ confirm: '确认密码',
1816
+ tooShort: '密码长度至少为 8 个字符',
1817
+ mismatch: '两次输入的密码不一致',
1818
+ enterCurrent: '请输入当前密码',
1819
+ changed: '密码已修改。',
1820
+ localSet: '本地密码已设置。现在您可以在此环境使用邮箱和密码登录。',
1821
+ changeAction: '修改密码',
1822
+ setAction: '设置密码',
1823
+ },
1824
+ },
1742
1825
  errors: {
1743
1826
  networkError: '网络错误,请检查网络连接。',
1744
1827
  serverError: '服务器错误,请稍后重试。',
@@ -2066,6 +2149,8 @@ const zh = {
2066
2149
  deleteFailed: '删除 {{label}} 失败',
2067
2150
  noRecordId: '未提供记录 ID',
2068
2151
  deleteConfirm: '确定要删除此记录吗?',
2152
+ resetPackageSetConfirm: '该权限集随已安装的软件包发布,无法删除。删除操作将丢弃环境定制并把它重置为发布基线。是否继续?',
2153
+ resetPackageSetSuccess: '权限集已重置为发布基线',
2069
2154
  bulkDeleteSuccess: '已删除 {{count}} 条 {{label}} 记录',
2070
2155
  bulkDeletePartial: '成功 {{succeeded}} 条,失败 {{failed}} 条',
2071
2156
  },
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * Accepts a plain string (passed through) or an i18n object keyed by language
5
5
  * code — e.g. `{ en: 'Pricing', 'zh-CN': '定价', zh: '定价', default: 'Pricing' }`.
6
- * Resolution order: exact language -> base language (`zh-CN` -> `zh`) -> `default`
7
- * -> `en` -> first value. Unlike a `default`/`en`-only resolver this is genuinely
6
+ * Resolution order: exact language -> base language (`zh-CN` -> `zh`) -> any
7
+ * region-qualified key sharing the base (`zh` -> `zh-CN`) -> `default` -> `en`
8
+ * -> first value. Unlike a `default`/`en`-only resolver this is genuinely
8
9
  * locale-aware, so server-driven metadata (page text, action param labels) can
9
10
  * carry inline translations instead of rendering "[object Object]" or English.
10
11
  *
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * Accepts a plain string (passed through) or an i18n object keyed by language
5
5
  * code — e.g. `{ en: 'Pricing', 'zh-CN': '定价', zh: '定价', default: 'Pricing' }`.
6
- * Resolution order: exact language -> base language (`zh-CN` -> `zh`) -> `default`
7
- * -> `en` -> first value. Unlike a `default`/`en`-only resolver this is genuinely
6
+ * Resolution order: exact language -> base language (`zh-CN` -> `zh`) -> any
7
+ * region-qualified key sharing the base (`zh` -> `zh-CN`) -> `default` -> `en`
8
+ * -> first value. Unlike a `default`/`en`-only resolver this is genuinely
8
9
  * locale-aware, so server-driven metadata (page text, action param labels) can
9
10
  * carry inline translations instead of rendering "[object Object]" or English.
10
11
  *
@@ -22,8 +23,12 @@ export function pickLocalized(value, language) {
22
23
  const o = value;
23
24
  const lang = (language || 'en').trim();
24
25
  const base = lang.split('-')[0];
26
+ // Runtime language is often a bare base code ('zh') while metadata authors
27
+ // write full BCP-47 tags ('zh-CN') — upgrade to any key sharing the base.
28
+ const regional = Object.keys(o).find((k) => k.split('-')[0] === base && typeof o[k] === 'string');
25
29
  const pick = o[lang] ??
26
30
  o[base] ??
31
+ (regional !== undefined ? o[regional] : undefined) ??
27
32
  o.default ??
28
33
  o.en ??
29
34
  Object.values(o).find((v) => typeof v === 'string');
@@ -236,4 +236,5 @@ export declare function useSafeFieldLabel(): {
236
236
  }[];
237
237
  fieldOptionLabel: (_objectName: string, _fieldName: string, _optionValue: string, fallback: string) => string;
238
238
  sectionLabel: (_objectName: string, _sectionName: string, fallback: string) => string;
239
+ actionLabel: (_objectName: string | undefined, _actionName: string, fallback: string) => string;
239
240
  };
@@ -394,6 +394,7 @@ const SAFE_FIELD_LABEL_FALLBACK = {
394
394
  translateOptions: (_objectName, _fieldName, options) => options,
395
395
  fieldOptionLabel: (_objectName, _fieldName, _optionValue, fallback) => fallback,
396
396
  sectionLabel: (_objectName, _sectionName, fallback) => fallback,
397
+ actionLabel: (_objectName, _actionName, fallback) => fallback,
397
398
  };
398
399
  /**
399
400
  * Safe wrapper for useObjectLabel that falls back to identity functions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/i18n",
3
- "version": "13.2.0",
3
+ "version": "14.0.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -30,8 +30,8 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "i18next": "^26.3.4",
34
- "react-i18next": "^17.0.8"
33
+ "i18next": "^26.3.6",
34
+ "react-i18next": "^17.0.9"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": "^18.0.0 || ^19.0.0"