Skip to content

fix(ui): translate DiffCollapser expand/collapse aria-label#16992

Open
jhjh1214 wants to merge 1 commit into
payloadcms:mainfrom
jhjh1214:fix/diff-collapser-expand-collapse-translation
Open

fix(ui): translate DiffCollapser expand/collapse aria-label#16992
jhjh1214 wants to merge 1 commit into
payloadcms:mainfrom
jhjh1214:fix/diff-collapser-expand-collapse-translation

Conversation

@jhjh1214

Copy link
Copy Markdown

What?

The expand/collapse toggle button in DiffCollapser used hardcoded English strings 'Expand' and 'Collapse' for its aria-label. The translation keys general:expand and general:collapse already exist, and useTranslation was already imported and t already in scope — the strings just weren't being used.

How?

aria-label={isCollapsed ? t('general:expand') : t('general:collapse')}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant