Skip to content

Commit d94e010

Browse files
committed
fix(i18n): the related rows count spells every plural slot its language selects
fr, es and pt gain the `many` slot, and ar's `one` and `two` slots carry `{{count}}` as en's do. The residue pin counts the enlarged toolbar's Add as RelatedList's fourth `detail.add` site, and the FLS pin reads the top bar's crumb as the second place the record's gated name appears. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVP3twvBvDTwoLPU6J
1 parent f06019a commit d94e010

6 files changed

Lines changed: 17 additions & 9 deletions

File tree

‎ui/packages/app-shell/src/views/RecordDetailView.pageHeaderTitleFls-10499.test.tsx‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,16 @@ describe('RecordDetailView — `page:header` builds the H1 from the fields the v
204204
// `titleFormat: '{email}'` it hid `name` while the H1 printed the denied
205205
// email, and the readable name was on screen nowhere. The H1 now reads the
206206
// same row: it shows the name, and the hidden `name` row is its duplicate,
207-
// as on a backend that strips `email`. The name is on the page once, in
208-
// the H1; it does not come back as a body row.
207+
// as on a backend that strips `email`. The name is in the record once, in
208+
// the H1; it does not come back as a body row. The top bar's crumb
209+
// 「对象 › 记录名」 (objectstack#27524) names the record with the same
210+
// gated title, never the denied email.
209211
await renderRecordPage({ titleFormat: '{email}' }, denying('email'), 'Ada Lovelace');
212+
const bar = document.querySelector('[data-record-top-bar]');
213+
expect(bar?.textContent).toContain('Ada Lovelace');
214+
expect(bar?.textContent).not.toContain(EMAIL);
210215
const text = document.body.textContent ?? '';
211-
expect(text.split('Ada Lovelace').length - 1).toBe(1);
216+
expect(text.split('Ada Lovelace').length - 1 - ((bar?.textContent ?? '').split('Ada Lovelace').length - 1)).toBe(1);
212217
expect(text).toContain('555-0100');
213218
});
214219

‎ui/packages/i18n/src/__tests__/residue-namespaces-3546.test.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,14 @@ describe('objectui#3546 slice seven — the ratchet residue', () => {
387387
}
388388
}
389389
// PageView uses it twice on the same button (title + aria-label) and
390-
// RelatedList three times in three different affordances (the picker title,
390+
// RelatedList four times in four different affordances (the picker title,
391391
// the compact card's icon-only + and the full list's Add button,
392-
// objectstack#27055) — the counts are pinned so a silent drop of one of them
393-
// is visible. AppContent's two record-save toast
392+
// objectstack#27055; the enlarged face's toolbar Add, objectstack#27524) —
393+
// the counts are pinned so a silent drop of one of them is visible. AppContent's two record-save toast
394394
// sites share one message builder since objectstack-ai/objectstack#26172,
395395
// so its fallback label is written once.
396396
expect(sourceOf(PAGE_VIEW).split("t('common.editInStudio', { defaultValue: 'Edit in studio' })").length - 1).toBe(2);
397-
expect(sourceOf(RELATED_LIST).split("t('detail.add', { defaultValue: 'Add' })").length - 1).toBe(3);
397+
expect(sourceOf(RELATED_LIST).split("t('detail.add', { defaultValue: 'Add' })").length - 1).toBe(4);
398398
expect(sourceOf(APP_CONTENT).split("t('common.record', { defaultValue: 'Record' })").length - 1).toBe(1);
399399
});
400400

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,8 @@ const ar = {
13021302
relatedExport: "تصدير",
13031303
relatedRows: "{{count}} سجل",
13041304
relatedRows_zero: "{{count}} سجل",
1305-
relatedRows_one: "سجل واحد",
1306-
relatedRows_two: "سجلان",
1305+
relatedRows_one: "{{count}} سجل",
1306+
relatedRows_two: "سجلان ({{count}})",
13071307
relatedRows_few: "{{count}} سجلات",
13081308
relatedRows_many: "{{count}} سجلًا",
13091309
relatedRows_other: "{{count}} سجل",

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,7 @@ const es = {
12061206
relatedExport: "Exportar",
12071207
relatedRows: "{{count}} registros",
12081208
relatedRows_one: "{{count}} registro",
1209+
relatedRows_many: "{{count}} de registros",
12091210
relatedRows_other: "{{count}} registros",
12101211
recordNotFound: "Registro no encontrado",
12111212
recordNotFoundDescription: "El registro que busca no existe, puede haber sido eliminado o es posible que no tenga acceso a él.",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ const fr = {
12031203
relatedExport: "Exporter",
12041204
relatedRows: "{{count}} enregistrements",
12051205
relatedRows_one: "{{count}} enregistrement",
1206+
relatedRows_many: "{{count}} d'enregistrements",
12061207
relatedRows_other: "{{count}} enregistrements",
12071208
recordNotFound: "Enregistrement introuvable",
12081209
recordNotFoundDescription: "L'enregistrement que vous recherchez n'existe pas, a peut-être été supprimé, ou vous n'y avez peut-être pas accès.",

‎ui/packages/i18n/src/locales/pt.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ const pt = {
12031203
relatedExport: "Exportar",
12041204
relatedRows: "{{count}} registros",
12051205
relatedRows_one: "{{count}} registro",
1206+
relatedRows_many: "{{count}} de registros",
12061207
relatedRows_other: "{{count}} registros",
12071208
recordNotFound: "Registro não encontrado",
12081209
recordNotFoundDescription: "O registro que você está procurando não existe, pode ter sido excluído ou você pode não ter acesso a ele.",

0 commit comments

Comments
 (0)