Skip to content

Fix localized preview toolbar actions - #3

Open
wadjj wants to merge 1 commit into
Squarelight-ai:mainfrom
wadjj:agent/localize-preview-action
Open

Fix localized preview toolbar actions#3
wadjj wants to merge 1 commit into
Squarelight-ai:mainfrom
wadjj:agent/localize-preview-action

Conversation

@wadjj

@wadjj wadjj commented Aug 18, 2026

Copy link
Copy Markdown

What changed

  • resolve the Preview Mode Change Mode action name using the same locale mapping as MarkEdit-preview (Change Mode, 切换模式, or 切換模式)
  • migrate an existing localized toolbar item to the active locale when setup is applied
  • remove duplicate localized toggle items and make Revert recognize every supported action name
  • document locale-aware behavior in the English and Korean READMEs
  • add bundle-level regression tests for locale migration, deduplication, and Revert

Why

MarkEdit custom toolbar actions are resolved by their visible main-menu title. Direct Preview always wrote the English Change Mode title, while MarkEdit-preview registers localized titles for Simplified and Traditional Chinese. On a Chinese system, the eye toolbar button therefore could not find its action and did nothing.

User impact

The one-click preview toolbar button now works in English, Simplified Chinese, and Traditional Chinese. Existing configurations are migrated on the next Apply One-Click Toggle Setup… without creating duplicate buttons.

Validation

  • ./node_modules/.bin/tsc --noEmit
  • npm test (Vite production build plus 6 passing Node tests)

@wadjj
wadjj marked this pull request as ready for review August 18, 2026 14:55
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