Skip to content

Commit bfdec63

Browse files
baozhoutaoclaude
andcommitted
fix(app-shell,i18n): drop the developer-voiced default form subtitle
Every create/edit record form (console dialog in AppContent and the full-page RecordFormPage) hardcoded a default description under the title: 'Add a new {{object}} to your database.' / 'Update details for {{object}}'. The copy is admin-panel boilerplate leaking into end-user business apps — end users have no business being told about 'the database' — and neither call site let a form view override it. Both call sites stop passing 'description', and the now-unused 'form.createDescription' / 'form.editDescription' keys are removed from all ten locale bundles ('workspace.createDescription' is unrelated and stays). i18n tests updated accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 07de839 commit bfdec63

14 files changed

Lines changed: 22 additions & 37 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"@object-ui/app-shell": patch
3+
"@object-ui/i18n": patch
4+
---
5+
6+
fix(app-shell,i18n): record forms no longer render the developer-voiced default subtitle
7+
8+
Every create/edit record form (both the console dialog in `AppContent` and the
9+
full-page `RecordFormPage`) hardcoded a platform default description under the
10+
title: "Add a new {{object}} to your database." / "Update details for
11+
{{object}}" (zh: 「向数据库添加新的{{object}}。」/「更新{{object}}的详情」).
12+
13+
The copy is developer-tooling voice leaking into end-user business apps — a
14+
scheduling clerk filling in a 排班计划 has no business being told about "the
15+
database", and the phrasing came straight from admin-panel boilerplate. The
16+
line carried no information the form title didn't already have, and neither
17+
call site let a form view override it.
18+
19+
The default subtitle is now gone: both call sites stop passing `description`,
20+
and the unused `form.createDescription` / `form.editDescription` keys are
21+
removed from all ten locale bundles (the `workspace.createDescription` key is
22+
unrelated and stays).

packages/app-shell/src/console/AppContent.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,6 @@ export function AppContent({ extraRoutes, extraRoutesNoApp }: AppContentProps =
786786
title: editingRecord
787787
? t('form.editTitle', { object: objectLabel(formObjectDef as any) })
788788
: t('form.createTitle', { object: objectLabel(formObjectDef as any) }),
789-
description: editingRecord
790-
? t('form.editDescription', { object: objectLabel(formObjectDef as any) })
791-
: t('form.createDescription', { object: objectLabel(formObjectDef as any) }),
792789
open: isDialogOpen,
793790
onOpenChange: (open: boolean) => { if (!open) closeRecordForm(); },
794791
layout: 'vertical',

packages/app-shell/src/views/RecordFormPage.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,6 @@ export function RecordFormPage({ mode }: RecordFormPageProps) {
337337
...(formDef.buttons && { buttons: formDef.buttons }),
338338
...(formDef.defaults && { defaults: formDef.defaults }),
339339
title: pageTitle,
340-
description:
341-
mode === 'create'
342-
? t('form.createDescription', {
343-
object: label,
344-
defaultValue: `Create a new ${label}.`,
345-
})
346-
: t('form.editDescription', {
347-
object: label,
348-
defaultValue: `Edit this ${label}.`,
349-
}),
350340
layout: 'vertical',
351341
fields,
352342
// Master-detail by config: if the object's form view declares

packages/i18n/src/__tests__/i18n.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ describe('@object-ui/i18n', () => {
5656
const i18n = createI18n({ defaultLanguage: 'en', detectBrowserLanguage: false });
5757
expect(i18n.t('form.createTitle', { object: 'Contact' })).toBe('Create Contact');
5858
expect(i18n.t('form.editTitle', { object: 'Contact' })).toBe('Edit Contact');
59-
expect(i18n.t('form.createDescription', { object: 'Contact' })).toBe('Add a new Contact to your database.');
60-
expect(i18n.t('form.editDescription', { object: 'Contact' })).toBe('Update details for Contact');
6159
expect(i18n.t('form.saveRecord')).toBe('Save');
6260
});
6361

@@ -75,8 +73,6 @@ describe('@object-ui/i18n', () => {
7573
const i18n = createI18n({ defaultLanguage: 'zh', detectBrowserLanguage: false });
7674
expect(i18n.t('form.createTitle', { object: '联系人' })).toBe('新建联系人');
7775
expect(i18n.t('form.editTitle', { object: '联系人' })).toBe('编辑联系人');
78-
expect(i18n.t('form.createDescription', { object: '联系人' })).toBe('向数据库添加新的联系人。');
79-
expect(i18n.t('form.editDescription', { object: '联系人' })).toBe('更新联系人的详情');
8076
expect(i18n.t('form.saveRecord')).toBe('保存');
8177
});
8278

packages/i18n/src/locales/ar.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ const ar = {
127127
stepOf: "الخطوة {{current}} من {{total}}",
128128
createTitle: "إنشاء {{object}}",
129129
editTitle: "تعديل {{object}}",
130-
createDescription: "إضافة {{object}} جديد إلى قاعدة البيانات.",
131-
editDescription: "تحديث تفاصيل {{object}}",
132130
saveRecord: "حفظ السجل",
133131
create: "إنشاء",
134132
update: "تحديث",

packages/i18n/src/locales/de.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ const de = {
127127
stepOf: "Schritt {{current}} von {{total}}",
128128
createTitle: "{{object}} erstellen",
129129
editTitle: "{{object}} bearbeiten",
130-
createDescription: "Neues {{object}} zur Datenbank hinzufügen.",
131-
editDescription: "Details für {{object}} aktualisieren",
132130
saveRecord: "Datensatz speichern",
133131
create: "Erstellen",
134132
update: "Aktualisieren",

packages/i18n/src/locales/en.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ const en = {
133133
stepOf: 'Step {{current}} of {{total}}',
134134
createTitle: 'Create {{object}}',
135135
editTitle: 'Edit {{object}}',
136-
createDescription: 'Add a new {{object}} to your database.',
137-
editDescription: 'Update details for {{object}}',
138136
saveRecord: 'Save',
139137
create: 'Create',
140138
update: 'Update',

packages/i18n/src/locales/es.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ const es = {
127127
stepOf: "Paso {{current}} de {{total}}",
128128
createTitle: "Crear {{object}}",
129129
editTitle: "Editar {{object}}",
130-
createDescription: "Agregar un nuevo {{object}} a su base de datos.",
131-
editDescription: "Actualizar detalles de {{object}}",
132130
saveRecord: "Guardar registro",
133131
create: "Crear",
134132
update: "Actualizar",

packages/i18n/src/locales/fr.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ const fr = {
127127
stepOf: "Étape {{current}} sur {{total}}",
128128
createTitle: "Créer {{object}}",
129129
editTitle: "Modifier {{object}}",
130-
createDescription: "Ajouter un nouveau {{object}} à votre base de données.",
131-
editDescription: "Mettre à jour les détails de {{object}}",
132130
saveRecord: "Enregistrer",
133131
create: "Créer",
134132
update: "Mettre à jour",

packages/i18n/src/locales/ja.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ const ja = {
127127
stepOf: "ステップ {{current}} / {{total}}",
128128
createTitle: "{{object}}を作成",
129129
editTitle: "{{object}}を編集",
130-
createDescription: "新しい{{object}}をデータベースに追加します。",
131-
editDescription: "{{object}}の詳細を更新",
132130
saveRecord: "レコードを保存",
133131
create: "作成",
134132
update: "更新",

0 commit comments

Comments
 (0)