Repository navigation
Conversation
Shevilll
requested review from
AlessioGr,
JarrodMFlesch and
jacobsfletch
as code owners
June 20, 2026 10:05
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17069
What
On the admin dashboard, each collection card's "create new" button rendered
aria-label="[object Object] neu erstellen"(and the same intitle) when the collection used a localized label object, e.g.{ en: 'Pages', de: 'Seiten' }.Why
packages/ui/src/widgets/CollectionCards/index.tsxpassed the rawlabelobject straight into the i18n interpolation:The
createNewLabelstrings are interpolation templates (Create new {{label}}/{{label}} neu erstellen), so the localized object gets string-coerced to[object Object]. Payload'sButtonalso copiesaria-labelintotitle(packages/ui/src/elements/Button/index.tsx), so both attributes were affected.Fix
Resolve the label to a string for the active locale with the existing
getTranslationhelper before interpolating — matching every othercreateNewLabelcall site (ListCreateNewDocButton, QueryPresetBar, Hierarchy/Tree, RelationshipTable, views/List) and the card's owntitle/buttonAriaLabel, which already usegetTranslation(label, i18n):Verification
getTranslationresolves aRecord<string, string>label tolabel[i18n.language](with fallback), returning a plain string — verified againstpackages/translations/src/utilities/getTranslation.ts.labelis typedStaticLabel, whichgetTranslationaccepts and narrows tostring; the change is type-consistent with the 5 other call sites.