Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- **What's new follows a language you switch to.** In the native window, the
release notes stayed in the language they were first read in after you
changed the interface language, under group names in the new one.

## [0.70.0] - 2026-10-17

### Added
Expand Down
1 change: 1 addition & 0 deletions native/cmd/lich-native/settings_language.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func (s *settingsScreen) chooseLanguage(l i18n.Locale) {
func (s *settingsScreen) keepLanguage(l i18n.Locale) {
i18n.SetCurrent(l)
s.invalidate()
go s.updates.readNotes(s)
go func() {
if err := s.client.SetSetting(s.ctx, uiLanguageKey, "", string(l)); err != nil {
log.Printf("settings: save %s: %v", uiLanguageKey, err)
Expand Down
14 changes: 14 additions & 0 deletions native/cmd/lich-native/settings_language_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,17 @@ func TestAFailedOrCanceledDownloadKeepsTheLanguage(t *testing.T) {
t.Errorf("current %s", i18n.Current())
}
}

// The notes are read once and kept; a new interface language reads them
// again, or the dialog names its groups in one language and lists them in
// the other.
func TestChoosingALanguageRereadsThePatchNotes(t *testing.T) {
s := languageScreen(t)
s.updates.readNotes(s)
s.keepLanguage(i18n.RU)
eventually(t, "the notes in Russian", func() bool {
s.updates.mu.Lock()
defer s.updates.mu.Unlock()
return s.updates.notes.Groups[0].Items[0] == string(i18n.RU)
})
}
2 changes: 2 additions & 0 deletions native/cmd/lich-native/sidebar_prefs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ func (f *sidebarBackend) answer(method string, args []json.RawMessage) any {
_ = json.Unmarshal(args[0], &opts)
f.settings["appearance.theme@"] = opts.ID
return nil
case "patchnotes.Current":
return lichclient.PatchNotes{Version: "1.0.0", Groups: []lichclient.PatchNotesGroup{{Label: "Added", Items: []string{str(0)}}}}
case "themes.SetFollowSystem":
f.settings["appearance.followSystem@"] = string(args[0])
return nil
Expand Down
Loading