Repository navigation
feat: show What's new in the interface language - #811
Merged
Merged
Conversation
The What's new dialog read CHANGELOG.md, so every non-English user saw the release notes in English. Each release is now translated into changelog/<locale>.md, one file per interface language holding only the latest release, embedded beside CHANGELOG.md. patchnotes.Current takes the window's locale and falls back to English when the release has no translation into it. Both windows name Keep a Changelog's groups from the catalogs, which is why translations keep the ### headings in English. TestTranslations holds every locale file to the latest release (groups, item counts, alert kinds, code spans, bold lead-ins), so a release cut without the new lich-changelog-i18n skill fails the gate. 0.69.0 is translated as the first case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The What's new dialog parses
CHANGELOG.md, so a user running lich in any language but English read the release notes in English. This translates them, per release, without touchingCHANGELOG.md, which stays English and canonical (the release page still reads it).changelog/<locale>.md, one per interface language except English, holds only the latest release: a build only ever reads its own section, and git keeps the old ones. Embedded besideCHANGELOG.md.patchnotes.Current(locale)reads the locale's file and falls back to English when it is missing or translates another release (dev builds, a release cut without translating).###headings in English: the windows color groups by the English word.TestTranslationsholds every locale file to the latest release inCHANGELOG.md: one section under the same heading, same groups, item counts, alert kinds, code spans and bold lead-ins. A release cut without translating fails the gate.lich-changelog-i18nskill (versioned,.gitignoreallowlist updated) is the procedure: slice the section, translate from English per locale (parallel, cheap model), keep headings, alert openers and code spans byte for byte, take interface words from the catalogs, run the test.CLAUDE.md› Releases gains the step; the i18n rules inCLAUDE.md,frontend/CLAUDE.mdandlich-i18nsay where these translations live.Known limit
In the native window, switching the interface language while the notes are loaded keeps them in the previous language until the window is reopened. The web window refetches (the resource key carries the locale).
Test plan
go test ./internal/patchnotes: locale read, fallback for a missing locale and for a translation of another release,TestTranslationsover the 6 real filesnative/:lichclientsends the locale; group labels and counts in pt-BR; catalog parity and plural formsPatchNotesDialog.test.tsxrenders the groups in pt-BRnative/)-shotwas taken