From 460b215e69995484f9bbd4d02123c43114bfc5f1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 14 Aug 2026 09:40:59 +0200 Subject: [PATCH] fix(collections): name the phone label chip after what it opens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chip that opens the label manager was labelled with collections.linkLabel, which is the caption of a link in the list editor. English calls that one "Label" so it happened to read correctly there, but German got "Bezeichnung", Russian "Название" and Ukrainian "Підпис": wrong word, and long enough to push the filter row out of its panel. It uses collections.labels.title now, which is the manager it opens and is shorter in every locale. collections.select was the other one over the edge. It is only an aria-label on the desktop filter bar, so the eight locales whose word did not fit are on a shorter one now. The truncate on the chip labels never worked: a flex item keeps min-width:auto, so the row grew past the panel instead of shrinking its chips. With min-w-0 a long label name or a bumped-up text size ellipsises inside the panel. --- client/src/mobile/screens/collections/MCollections.tsx | 9 +++++++-- .../tests/unit/mobile/collections/MCollections.test.tsx | 4 ++-- shared/src/i18n/br/collection.ts | 2 +- shared/src/i18n/ca/collection.ts | 2 +- shared/src/i18n/de/collection.ts | 2 +- shared/src/i18n/es/collection.ts | 2 +- shared/src/i18n/fr/collection.ts | 2 +- shared/src/i18n/hu/collection.ts | 2 +- shared/src/i18n/it/collection.ts | 2 +- shared/src/i18n/nl/collection.ts | 2 +- 10 files changed, 17 insertions(+), 12 deletions(-) diff --git a/client/src/mobile/screens/collections/MCollections.tsx b/client/src/mobile/screens/collections/MCollections.tsx index 398f85912..90a3a3044 100644 --- a/client/src/mobile/screens/collections/MCollections.tsx +++ b/client/src/mobile/screens/collections/MCollections.tsx @@ -27,8 +27,13 @@ import { CancelPill, PrimaryPill } from './MCollSheetKit' const HEADER_CIRCLE = 'flex h-[38px] w-[38px] flex-none items-center justify-center rounded-full border border-[color:var(--m-gbr)] bg-[color:var(--m-sheet)] text-m-ink shadow-[0_5px_12px_-8px_rgba(0,0,0,.18)]' +// min-w-0 is what lets the truncate on the chip labels engage: a flex item keeps +// min-width:auto by default, so the row grew past the panel instead of shrinking +// its chips. The labels are short enough to fit in every locale now, but a long +// label name in the filter chip, or a bumped-up text size, still has to ellipsise +// inside the panel rather than spill out of it. const FILTER_CHIP = - 'flex flex-1 items-center justify-center gap-[5px] rounded-full py-2 text-[0.75rem] font-semibold' + 'flex min-w-0 flex-1 items-center justify-center gap-[5px] rounded-full py-2 text-[0.75rem] font-semibold' const CHIP_IDLE = 'border border-[color:var(--m-rowbr)] bg-m-sheetop text-m-ink' const CHIP_ON = 'border border-transparent bg-m-act text-m-actfg' @@ -273,7 +278,7 @@ export default function MCollections() { {canManageLabels && ( )} {showSelect && ( diff --git a/client/tests/unit/mobile/collections/MCollections.test.tsx b/client/tests/unit/mobile/collections/MCollections.test.tsx index b6337137e..c1dd64903 100644 --- a/client/tests/unit/mobile/collections/MCollections.test.tsx +++ b/client/tests/unit/mobile/collections/MCollections.test.tsx @@ -239,7 +239,7 @@ describe('MCollections', () => { expect(screen.queryByRole('button', { name: 'collections.editListTitle' })).not.toBeInTheDocument() expect(screen.queryByRole('button', { name: 'collections.share.title' })).not.toBeInTheDocument() // No per-list labels on the union. - expect(screen.queryByRole('button', { name: /collections.linkLabel/ })).not.toBeInTheDocument() + expect(screen.queryByRole('button', { name: /collections.labels.title/ })).not.toBeInTheDocument() }) it('FE-MOB-COLSCR-005: without an active list the generic page title is used', () => { @@ -365,7 +365,7 @@ describe('MCollections', () => { fireEvent.click(chips[1]) expect(screen.getByText('collections.labels.empty')).toBeInTheDocument() - fireEvent.click(screen.getByRole('button', { name: /collections.linkLabel/ })) + fireEvent.click(screen.getByRole('button', { name: /collections.labels.title/ })) expect(fn('setShowLabelManager')).toHaveBeenCalledWith(true) }) diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts index f30f86c75..989657463 100644 --- a/shared/src/i18n/br/collection.ts +++ b/shared/src/i18n/br/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Editor', 'collections.role.admin': 'Administrador', 'collections.picker.allLists': 'Todas as listas', - 'collections.select': 'Selecionar', + 'collections.select': 'Escolher', 'collections.selectAll': 'Selecionar tudo', 'collections.deselectAll': 'Desmarcar tudo', 'collections.moveToList': 'Mover para lista', diff --git a/shared/src/i18n/ca/collection.ts b/shared/src/i18n/ca/collection.ts index 38c016505..9023b9b3c 100644 --- a/shared/src/i18n/ca/collection.ts +++ b/shared/src/i18n/ca/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Editor', 'collections.role.admin': 'Administrador', 'collections.picker.allLists': 'Totes les llistes', - 'collections.select': 'Seleccionar', + 'collections.select': 'Triar', 'collections.selectAll': 'Seleccionar-ho tot', 'collections.deselectAll': 'Deseleccionar-ho tot', 'collections.moveToList': 'Moure a la llista', diff --git a/shared/src/i18n/de/collection.ts b/shared/src/i18n/de/collection.ts index 864fda777..accbae404 100644 --- a/shared/src/i18n/de/collection.ts +++ b/shared/src/i18n/de/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Bearbeiter', 'collections.role.admin': 'Admin', 'collections.picker.allLists': 'Alle Listen', - 'collections.select': 'Auswählen', + 'collections.select': 'Wählen', 'collections.selectAll': 'Alle auswählen', 'collections.deselectAll': 'Auswahl aufheben', 'collections.moveToList': 'In Liste verschieben', diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts index 1be597344..296fc1e45 100644 --- a/shared/src/i18n/es/collection.ts +++ b/shared/src/i18n/es/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Editor', 'collections.role.admin': 'Administrador', 'collections.picker.allLists': 'Todas las listas', - 'collections.select': 'Seleccionar', + 'collections.select': 'Elegir', 'collections.selectAll': 'Seleccionar todo', 'collections.deselectAll': 'Deseleccionar todo', 'collections.moveToList': 'Mover a lista', diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts index 40067a47a..764b07c70 100644 --- a/shared/src/i18n/fr/collection.ts +++ b/shared/src/i18n/fr/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Éditeur', 'collections.role.admin': 'Admin', 'collections.picker.allLists': 'Toutes les listes', - 'collections.select': 'Sélectionner', + 'collections.select': 'Choisir', 'collections.selectAll': 'Tout sélectionner', 'collections.deselectAll': 'Tout désélectionner', 'collections.moveToList': 'Déplacer vers une liste', diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts index 9809e71ad..c9fc35d77 100644 --- a/shared/src/i18n/hu/collection.ts +++ b/shared/src/i18n/hu/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Szerkesztő', 'collections.role.admin': 'Adminisztrátor', 'collections.picker.allLists': 'Összes lista', - 'collections.select': 'Kijelölés', + 'collections.select': 'Jelölés', 'collections.selectAll': 'Összes kijelölése', 'collections.deselectAll': 'Kijelölés megszüntetése', 'collections.moveToList': 'Áthelyezés listába', diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts index 013bc24f2..37818e910 100644 --- a/shared/src/i18n/it/collection.ts +++ b/shared/src/i18n/it/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Editore', 'collections.role.admin': 'Admin', 'collections.picker.allLists': 'Tutte le liste', - 'collections.select': 'Seleziona', + 'collections.select': 'Scegli', 'collections.selectAll': 'Seleziona tutto', 'collections.deselectAll': 'Deseleziona tutto', 'collections.moveToList': 'Sposta in lista', diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts index 77cd4d7de..93d132a26 100644 --- a/shared/src/i18n/nl/collection.ts +++ b/shared/src/i18n/nl/collection.ts @@ -10,7 +10,7 @@ const collection: TranslationStrings = { 'collections.role.editor': 'Bewerker', 'collections.role.admin': 'Beheerder', 'collections.picker.allLists': 'Alle lijsten', - 'collections.select': 'Selecteren', + 'collections.select': 'Kiezen', 'collections.selectAll': 'Alles selecteren', 'collections.deselectAll': 'Selectie opheffen', 'collections.moveToList': 'Naar lijst verplaatsen',