Skip to content

fix(ui): translate SidebarToggle tooltip label#16988

Open
jhjh1214 wants to merge 1 commit into
payloadcms:mainfrom
jhjh1214:fix/sidebar-toggle-translations
Open

fix(ui): translate SidebarToggle tooltip label#16988
jhjh1214 wants to merge 1 commit into
payloadcms:mainfrom
jhjh1214:fix/sidebar-toggle-translations

Conversation

@jhjh1214

Copy link
Copy Markdown

What?

Replace hardcoded English strings in SidebarToggle with the translation system.

Why?

The tooltip label was using hardcoded 'Hide Sidebar' / 'Show Sidebar' strings with a // TODO: translations comment. The translation keys general:hideSidebar and general:showSidebar already exist in the translations package — they just weren't being used.

How?

  • Import useTranslation from the Translation provider
  • Call t('general:hideSidebar') / t('general:showSidebar') for the tooltip label
  • Remove the TODO comment

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