Skip to content

feat(settings): apply a language change without restarting - #10

Merged
howar31 merged 2 commits into
mainfrom
feat/live-language-switch
Oct 3, 2026
Merged

howar31 merged 2 commits into
mainfrom
feat/live-language-switch

Conversation

@howar31

@howar31 howar31 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Cause

Changing the language in Settings > General only took effect after restarting Glimpr. Each engine resolved the choice once at boot, the macOS menu-bar strings were resolved once per launch, and the Windows tray and recording-strip labels were sent once at boot.

Change

  • lib/settings/app_locale.dart: loadAppLocaleOverride can be called again and reports whether the language changed. syncNativeLanguage sends the Windows tray and recording-strip labels (moved here from lib/main.dart) and, on macOS, tells the native side to re-read the choice.
  • lib/settings/settings_app.dart: picking a language reloads it, rebuilds the window, updates the native strings, and refreshes the tray update label and the What's new sections. The restart hint and button under the language picker are removed, together with the string settingsLanguageAppliesAfterRestart.
  • lib/overlay/overlay_app.dart: the overlay engine re-resolves the language after each reveal and after a Settings detour.
  • lib/image_editor/image_editor_app.dart: the Image Editor re-resolves the language when its window regains focus or Settings closes.
  • macos/Runner/MainFlutterWindow.swift, macos/Runner/StatusItemController.swift: a languageChanged call re-reads the choice, rebuilds the menu-bar menu (keeping the recording state, the recent list and the update label) and re-applies the window titles.
  • windows/runner/record_channel.cpp: comment only.
  • Tests for the reload, the Windows label push, the macOS call, and the Settings window switching language in place.
  • Version 1.25.0+42.

When each surface follows a change: the Settings window and the menu-bar / tray menu right away; the screenshot overlay on the next screenshot; an open Image Editor when its window regains focus; the recording strip on the next recording.

Verification

  • flutter analyze and the full flutter test suite pass on macOS and on Windows.
  • The macOS native test target passes. flutter build macos --debug and flutter build windows --release succeed.
  • Checked on screen in development builds on macOS and Windows: Settings window, menu-bar / tray menu, screenshot overlay, Image Editor, recording strip.

Picking a language in Settings > General now takes effect in place. The
Settings window and the menu-bar / tray menu switch right away; the
screenshot overlay follows on the next screenshot, the Image Editor when
its window regains focus, and the recording strip on the next recording.
The restart hint and button under the language picker are gone.
@howar31
howar31 merged commit bba29d2 into main Oct 3, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
github-pages — bba29d26 Deployed Oct 3, 2026 by howar31 via deploy #67
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