Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/drop-default-form-subtitle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"@object-ui/app-shell": patch
"@object-ui/i18n": patch
---

fix(app-shell,i18n): record forms no longer render the developer-voiced default subtitle

Every create/edit record form (both the console dialog in `AppContent` and the
full-page `RecordFormPage`) hardcoded a platform default description under the
title: "Add a new {{object}} to your database." / "Update details for
{{object}}" (zh: 「向数据库添加新的{{object}}。」/「更新{{object}}的详情」).

The copy is developer-tooling voice leaking into end-user business apps — a
scheduling clerk filling in a 排班计划 has no business being told about "the
database", and the phrasing came straight from admin-panel boilerplate. The
line carried no information the form title didn't already have, and neither
call site let a form view override it.

The default subtitle is now gone: both call sites stop passing `description`,
and the unused `form.createDescription` / `form.editDescription` keys are
removed from all ten locale bundles (the `workspace.createDescription` key is
unrelated and stays).
3 changes: 0 additions & 3 deletions packages/app-shell/src/console/AppContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,6 @@ export function AppContent({ extraRoutes, extraRoutesNoApp }: AppContentProps =
title: editingRecord
? t('form.editTitle', { object: objectLabel(formObjectDef as any) })
: t('form.createTitle', { object: objectLabel(formObjectDef as any) }),
description: editingRecord
? t('form.editDescription', { object: objectLabel(formObjectDef as any) })
: t('form.createDescription', { object: objectLabel(formObjectDef as any) }),
open: isDialogOpen,
onOpenChange: (open: boolean) => { if (!open) closeRecordForm(); },
layout: 'vertical',
Expand Down
10 changes: 0 additions & 10 deletions packages/app-shell/src/views/RecordFormPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,6 @@ export function RecordFormPage({ mode }: RecordFormPageProps) {
...(formDef.buttons && { buttons: formDef.buttons }),
...(formDef.defaults && { defaults: formDef.defaults }),
title: pageTitle,
description:
mode === 'create'
? t('form.createDescription', {
object: label,
defaultValue: `Create a new ${label}.`,
})
: t('form.editDescription', {
object: label,
defaultValue: `Edit this ${label}.`,
}),
layout: 'vertical',
fields,
// Master-detail by config: if the object's form view declares
Expand Down
4 changes: 0 additions & 4 deletions packages/i18n/src/__tests__/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ describe('@object-ui/i18n', () => {
const i18n = createI18n({ defaultLanguage: 'en', detectBrowserLanguage: false });
expect(i18n.t('form.createTitle', { object: 'Contact' })).toBe('Create Contact');
expect(i18n.t('form.editTitle', { object: 'Contact' })).toBe('Edit Contact');
expect(i18n.t('form.createDescription', { object: 'Contact' })).toBe('Add a new Contact to your database.');
expect(i18n.t('form.editDescription', { object: 'Contact' })).toBe('Update details for Contact');
expect(i18n.t('form.saveRecord')).toBe('Save');
});

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

Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const ar = {
stepOf: "الخطوة {{current}} من {{total}}",
createTitle: "إنشاء {{object}}",
editTitle: "تعديل {{object}}",
createDescription: "إضافة {{object}} جديد إلى قاعدة البيانات.",
editDescription: "تحديث تفاصيل {{object}}",
saveRecord: "حفظ السجل",
create: "إنشاء",
update: "تحديث",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const de = {
stepOf: "Schritt {{current}} von {{total}}",
createTitle: "{{object}} erstellen",
editTitle: "{{object}} bearbeiten",
createDescription: "Neues {{object}} zur Datenbank hinzufügen.",
editDescription: "Details für {{object}} aktualisieren",
saveRecord: "Datensatz speichern",
create: "Erstellen",
update: "Aktualisieren",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ const en = {
stepOf: 'Step {{current}} of {{total}}',
createTitle: 'Create {{object}}',
editTitle: 'Edit {{object}}',
createDescription: 'Add a new {{object}} to your database.',
editDescription: 'Update details for {{object}}',
saveRecord: 'Save',
create: 'Create',
update: 'Update',
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const es = {
stepOf: "Paso {{current}} de {{total}}",
createTitle: "Crear {{object}}",
editTitle: "Editar {{object}}",
createDescription: "Agregar un nuevo {{object}} a su base de datos.",
editDescription: "Actualizar detalles de {{object}}",
saveRecord: "Guardar registro",
create: "Crear",
update: "Actualizar",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const fr = {
stepOf: "Étape {{current}} sur {{total}}",
createTitle: "Créer {{object}}",
editTitle: "Modifier {{object}}",
createDescription: "Ajouter un nouveau {{object}} à votre base de données.",
editDescription: "Mettre à jour les détails de {{object}}",
saveRecord: "Enregistrer",
create: "Créer",
update: "Mettre à jour",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const ja = {
stepOf: "ステップ {{current}} / {{total}}",
createTitle: "{{object}}を作成",
editTitle: "{{object}}を編集",
createDescription: "新しい{{object}}をデータベースに追加します。",
editDescription: "{{object}}の詳細を更新",
saveRecord: "レコードを保存",
create: "作成",
update: "更新",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const ko = {
stepOf: "{{total}}단계 중 {{current}}단계",
createTitle: "{{object}} 생성",
editTitle: "{{object}} 편집",
createDescription: "새 {{object}}을(를) 데이터베이스에 추가합니다.",
editDescription: "{{object}} 세부 정보 업데이트",
saveRecord: "레코드 저장",
create: "생성",
update: "업데이트",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const pt = {
stepOf: "Etapa {{current}} de {{total}}",
createTitle: "Criar {{object}}",
editTitle: "Editar {{object}}",
createDescription: "Adicionar um novo {{object}} ao seu banco de dados.",
editDescription: "Atualizar detalhes de {{object}}",
saveRecord: "Salvar registro",
create: "Criar",
update: "Atualizar",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const ru = {
stepOf: "Шаг {{current}} из {{total}}",
createTitle: "Создать {{object}}",
editTitle: "Редактировать {{object}}",
createDescription: "Добавить новый {{object}} в базу данных.",
editDescription: "Обновить данные {{object}}",
saveRecord: "Сохранить запись",
create: "Создать",
update: "Обновить",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ const zh = {
stepOf: '第{{current}}步,共{{total}}步',
createTitle: '新建{{object}}',
editTitle: '编辑{{object}}',
createDescription: '向数据库添加新的{{object}}。',
editDescription: '更新{{object}}的详情',
saveRecord: '保存',
create: '创建',
update: '更新',
Expand Down
Loading