Skip to content

fix(i18n): localize hardcoded tooltips and aria-labels - #668

Merged
agegr merged 2 commits into
agegr:mainfrom
odn775:fix/i18n-hardcoded-tooltips
Sep 5, 2026
Merged

agegr merged 2 commits into
agegr:mainfrom
odn775:fix/i18n-hardcoded-tooltips

Conversation

@odn775

@odn775 odn775 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

A few user-facing strings in ChatInput and ChatMinimap were still hardcoded in English, so they rendered untranslated when the UI was set to Simplified or Traditional Chinese. This routes them through the i18n layer.

Changes

ChatInput

  • ModelErrorBanner and ModelScopeWarningBanner now use useI18n() for their titles.
  • Localized the title attributes on the "Input history" panel header and the Steer / Follow-up buttons.

ChatMinimap

  • Localized the aria-label and title of the "Locate assistant message" jump button.

Messages
Added 7 keys to en, zh-CN, and zh-TW:

  • chat.steerHint
  • chat.followUpHint
  • chat.inputHistory
  • chat.modelError
  • chat.modelScopeWarning
  • chat.modelScopeWarnings
  • chatMinimap.locateAssistant

Notes

  • Follows the convention in docs/i18n.md that title / aria-label / placeholder values go through t().
  • Updated the three banner tests in components/ChatInput.test.mjs to render inside I18nProvider, since the banners now consume the i18n context.

Testing

  • npm test — all passing.

@agegr
agegr merged commit 6ac72b2 into agegr:main Sep 5, 2026
sleepinginsummer pushed a commit to sleepinginsummer/pi-web that referenced this pull request Sep 9, 2026
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.

2 participants