@object-ui/i18n 5.0.2 → 5.1.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/CHANGELOG.md +32 -0
- package/dist/locales/en.d.ts +10 -0
- package/dist/locales/en.js +11 -0
- package/dist/locales/index.d.ts +20 -0
- package/dist/locales/zh.d.ts +10 -0
- package/dist/locales/zh.js +11 -0
- package/dist/useObjectLabel.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @object-ui/i18n
|
|
2
2
|
|
|
3
|
+
## 5.1.1
|
|
4
|
+
|
|
5
|
+
## 5.1.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 49b1760: Polish the ConcurrentUpdateDialog and add i18n.
|
|
10
|
+
- Internationalise all dialog strings (title, body, button labels, "your edit" / "current value" headings, audit-trail line) through `useDetailTranslation`. Locale strings added to `@object-ui/i18n` for English and Chinese.
|
|
11
|
+
- Replace the plain dialog header with an amber warning badge + `AlertTriangle` icon to communicate that this is a conflict, not a routine confirmation.
|
|
12
|
+
- Visually differentiate the two value blocks: amber tint for the user's pending edit, sky tint for the server's current value. Both wrap long values cleanly.
|
|
13
|
+
- Surface audit provenance for the racer's write (`updated_at`, plus `updated_by_name`/`updated_by_label` when supplied). Opaque ID-looking `updated_by` tokens are suppressed.
|
|
14
|
+
- Re-prioritise the action buttons: **Reload latest** is now the primary/recommended action (autofocused), **Overwrite anyway** is rendered as a destructive-outline button so the dangerous path requires deliberate intent, and **Cancel** falls back to a ghost variant.
|
|
15
|
+
|
|
16
|
+
- c0b236f: Platform detail/form polish:
|
|
17
|
+
- **Auto-section grouping**: When an object has no authored `views.form.sections`, the detail page now splits fields into a primary section and a collapsible "More details" section based on a field-type/name heuristic (textarea / markdown / description / notes / remarks). Eliminates the wall-of-fields layout on objects without explicit detail metadata.
|
|
18
|
+
- **FormSection card chrome**: `FormSection` now accepts `showBorder`. Defaults to `true` for titled sections (Card wrapper) and `false` for untitled sections (flat). Same auto-default already applied to `DetailSection`.
|
|
19
|
+
- **Origin breadcrumb**: Navigating from a list/kanban into a record now records the source view; the detail page shows a `← <view label>` back-link above the page header.
|
|
20
|
+
- New i18n key `detail.sectionMoreDetails` (en + zh-CN).
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 1976691: Fix the drawer "Open as full page" (maximize) button on the record drawer
|
|
25
|
+
which threw `TypeError: name.indexOf is not a function` and prevented
|
|
26
|
+
navigation to the dedicated detail page.
|
|
27
|
+
- `@object-ui/app-shell` `ObjectView`: pass `objectDef.name` (string) — not
|
|
28
|
+
the whole `objectDef` — into `viewLabel(...)` when computing the
|
|
29
|
+
`originState.from.label` for both drawer-navigate and list-navigate
|
|
30
|
+
flows. Two call sites fixed.
|
|
31
|
+
- `@object-ui/i18n` `useObjectLabel`: harden `stripNamespace` so it
|
|
32
|
+
tolerates non-string inputs and returns an empty string instead of
|
|
33
|
+
throwing, providing a safety net for similar future regressions.
|
|
34
|
+
|
|
3
35
|
## 5.0.2
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/dist/locales/en.d.ts
CHANGED
|
@@ -306,6 +306,16 @@ declare const en: {
|
|
|
306
306
|
readonly linkCopyFailed: "Failed to copy link";
|
|
307
307
|
readonly cancel: "Cancel";
|
|
308
308
|
readonly cancelEdit: "Discard changes";
|
|
309
|
+
readonly sectionMoreDetails: "More details";
|
|
310
|
+
readonly concurrentUpdateTitle: "This record was modified by someone else";
|
|
311
|
+
readonly concurrentUpdateDescription: "Another user saved a newer version of {{field}} while you were editing. To prevent silently overwriting their change, please choose how to resolve the conflict.";
|
|
312
|
+
readonly concurrentUpdateYourEdit: "Your edit";
|
|
313
|
+
readonly concurrentUpdateCurrentValue: "Current value";
|
|
314
|
+
readonly concurrentUpdateUpdatedBy: "Updated by {{name}}";
|
|
315
|
+
readonly concurrentUpdateUpdatedAt: "Updated at {{when}}";
|
|
316
|
+
readonly concurrentUpdateReload: "Reload latest";
|
|
317
|
+
readonly concurrentUpdateOverwrite: "Overwrite anyway";
|
|
318
|
+
readonly concurrentUpdateCancel: "Cancel";
|
|
309
319
|
readonly openInNewTab: "Open in new tab";
|
|
310
320
|
readonly share: "Share";
|
|
311
321
|
readonly duplicate: "Duplicate";
|
package/dist/locales/en.js
CHANGED
|
@@ -306,6 +306,17 @@ const en = {
|
|
|
306
306
|
linkCopyFailed: 'Failed to copy link',
|
|
307
307
|
cancel: 'Cancel',
|
|
308
308
|
cancelEdit: 'Discard changes',
|
|
309
|
+
sectionMoreDetails: 'More details',
|
|
310
|
+
// Concurrent update (OCC) dialog
|
|
311
|
+
concurrentUpdateTitle: 'This record was modified by someone else',
|
|
312
|
+
concurrentUpdateDescription: 'Another user saved a newer version of {{field}} while you were editing. To prevent silently overwriting their change, please choose how to resolve the conflict.',
|
|
313
|
+
concurrentUpdateYourEdit: 'Your edit',
|
|
314
|
+
concurrentUpdateCurrentValue: 'Current value',
|
|
315
|
+
concurrentUpdateUpdatedBy: 'Updated by {{name}}',
|
|
316
|
+
concurrentUpdateUpdatedAt: 'Updated at {{when}}',
|
|
317
|
+
concurrentUpdateReload: 'Reload latest',
|
|
318
|
+
concurrentUpdateOverwrite: 'Overwrite anyway',
|
|
319
|
+
concurrentUpdateCancel: 'Cancel',
|
|
309
320
|
openInNewTab: 'Open in new tab',
|
|
310
321
|
share: 'Share',
|
|
311
322
|
duplicate: 'Duplicate',
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -318,6 +318,16 @@ export declare const builtInLocales: {
|
|
|
318
318
|
readonly linkCopyFailed: "Failed to copy link";
|
|
319
319
|
readonly cancel: "Cancel";
|
|
320
320
|
readonly cancelEdit: "Discard changes";
|
|
321
|
+
readonly sectionMoreDetails: "More details";
|
|
322
|
+
readonly concurrentUpdateTitle: "This record was modified by someone else";
|
|
323
|
+
readonly concurrentUpdateDescription: "Another user saved a newer version of {{field}} while you were editing. To prevent silently overwriting their change, please choose how to resolve the conflict.";
|
|
324
|
+
readonly concurrentUpdateYourEdit: "Your edit";
|
|
325
|
+
readonly concurrentUpdateCurrentValue: "Current value";
|
|
326
|
+
readonly concurrentUpdateUpdatedBy: "Updated by {{name}}";
|
|
327
|
+
readonly concurrentUpdateUpdatedAt: "Updated at {{when}}";
|
|
328
|
+
readonly concurrentUpdateReload: "Reload latest";
|
|
329
|
+
readonly concurrentUpdateOverwrite: "Overwrite anyway";
|
|
330
|
+
readonly concurrentUpdateCancel: "Cancel";
|
|
321
331
|
readonly openInNewTab: "Open in new tab";
|
|
322
332
|
readonly share: "Share";
|
|
323
333
|
readonly duplicate: "Duplicate";
|
|
@@ -1820,6 +1830,16 @@ export declare const builtInLocales: {
|
|
|
1820
1830
|
readonly linkCopyFailed: "复制链接失败";
|
|
1821
1831
|
readonly cancel: "取消";
|
|
1822
1832
|
readonly cancelEdit: "放弃更改";
|
|
1833
|
+
readonly sectionMoreDetails: "更多详情";
|
|
1834
|
+
readonly concurrentUpdateTitle: "该记录已被他人修改";
|
|
1835
|
+
readonly concurrentUpdateDescription: "在你编辑期间,另一位用户保存了 {{field}} 的新版本。为避免无声覆盖对方的改动,请选择如何处理该冲突。";
|
|
1836
|
+
readonly concurrentUpdateYourEdit: "你的修改";
|
|
1837
|
+
readonly concurrentUpdateCurrentValue: "当前值";
|
|
1838
|
+
readonly concurrentUpdateUpdatedBy: "由 {{name}} 更新";
|
|
1839
|
+
readonly concurrentUpdateUpdatedAt: "更新于 {{when}}";
|
|
1840
|
+
readonly concurrentUpdateReload: "加载最新";
|
|
1841
|
+
readonly concurrentUpdateOverwrite: "仍然覆盖";
|
|
1842
|
+
readonly concurrentUpdateCancel: "取消";
|
|
1823
1843
|
readonly openInNewTab: "在新标签页打开";
|
|
1824
1844
|
readonly share: "分享";
|
|
1825
1845
|
readonly duplicate: "复制";
|
package/dist/locales/zh.d.ts
CHANGED
|
@@ -306,6 +306,16 @@ declare const zh: {
|
|
|
306
306
|
readonly linkCopyFailed: "复制链接失败";
|
|
307
307
|
readonly cancel: "取消";
|
|
308
308
|
readonly cancelEdit: "放弃更改";
|
|
309
|
+
readonly sectionMoreDetails: "更多详情";
|
|
310
|
+
readonly concurrentUpdateTitle: "该记录已被他人修改";
|
|
311
|
+
readonly concurrentUpdateDescription: "在你编辑期间,另一位用户保存了 {{field}} 的新版本。为避免无声覆盖对方的改动,请选择如何处理该冲突。";
|
|
312
|
+
readonly concurrentUpdateYourEdit: "你的修改";
|
|
313
|
+
readonly concurrentUpdateCurrentValue: "当前值";
|
|
314
|
+
readonly concurrentUpdateUpdatedBy: "由 {{name}} 更新";
|
|
315
|
+
readonly concurrentUpdateUpdatedAt: "更新于 {{when}}";
|
|
316
|
+
readonly concurrentUpdateReload: "加载最新";
|
|
317
|
+
readonly concurrentUpdateOverwrite: "仍然覆盖";
|
|
318
|
+
readonly concurrentUpdateCancel: "取消";
|
|
309
319
|
readonly openInNewTab: "在新标签页打开";
|
|
310
320
|
readonly share: "分享";
|
|
311
321
|
readonly duplicate: "复制";
|
package/dist/locales/zh.js
CHANGED
|
@@ -306,6 +306,17 @@ const zh = {
|
|
|
306
306
|
linkCopyFailed: '复制链接失败',
|
|
307
307
|
cancel: '取消',
|
|
308
308
|
cancelEdit: '放弃更改',
|
|
309
|
+
sectionMoreDetails: '更多详情',
|
|
310
|
+
// Concurrent update (OCC) dialog
|
|
311
|
+
concurrentUpdateTitle: '该记录已被他人修改',
|
|
312
|
+
concurrentUpdateDescription: '在你编辑期间,另一位用户保存了 {{field}} 的新版本。为避免无声覆盖对方的改动,请选择如何处理该冲突。',
|
|
313
|
+
concurrentUpdateYourEdit: '你的修改',
|
|
314
|
+
concurrentUpdateCurrentValue: '当前值',
|
|
315
|
+
concurrentUpdateUpdatedBy: '由 {{name}} 更新',
|
|
316
|
+
concurrentUpdateUpdatedAt: '更新于 {{when}}',
|
|
317
|
+
concurrentUpdateReload: '加载最新',
|
|
318
|
+
concurrentUpdateOverwrite: '仍然覆盖',
|
|
319
|
+
concurrentUpdateCancel: '取消',
|
|
309
320
|
openInNewTab: '在新标签页打开',
|
|
310
321
|
share: '分享',
|
|
311
322
|
duplicate: '复制',
|
package/dist/useObjectLabel.js
CHANGED
|
@@ -75,6 +75,8 @@ export function useObjectLabel() {
|
|
|
75
75
|
* package namespace from the base name; everything after is preserved.
|
|
76
76
|
*/
|
|
77
77
|
const stripNamespace = (name) => {
|
|
78
|
+
if (typeof name !== 'string')
|
|
79
|
+
return '';
|
|
78
80
|
const idx = name.indexOf('__');
|
|
79
81
|
return idx > 0 ? name.slice(idx + 2) : name;
|
|
80
82
|
};
|