feat(localization): add French localization support#176
Open
itishermann wants to merge 1 commit intosozercan:mainfrom
Open
feat(localization): add French localization support#176itishermann wants to merge 1 commit intosozercan:mainfrom
itishermann wants to merge 1 commit intosozercan:mainfrom
Conversation
* Introduce French localization strings for the app. * Update SettingsManager to include French as a supported language. * Add unit tests to verify French localization for specific strings. Signed-off-by: Hermann Kao <38349706+itishermann@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds French UI localization support to Kaset, wiring a new selectable UI language into settings and providing French translations in the string catalog and generated .strings resources.
Changes:
- Add
SettingsManager.ContentLanguage.frenchwith display name andfrlanguage code. - Add French (
fr) translations toLocalizable.xcstringsand generatefr.lproj/Localizable.strings. - Add unit tests verifying French bundle localization and formatted-string behavior.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Tests/KasetTests/AppLocalizationTests.swift | Adds a French localization test covering a plain key (Artist) and formatted key (Subscribe %@). |
| Sources/Kaset/Services/SettingsManager.swift | Introduces ContentLanguage.french and maps it to language code fr for bundle lookup/locale. |
| Sources/Kaset/Resources/Localizable.xcstrings | Adds fr localizations (and normalizes formatting) including keys used by settings/UI. |
| Sources/Kaset/Resources/fr.lproj/Localizable.strings | Adds generated French strings resource file for runtime localization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
Adds French (Français) as a selectable app UI language, introduces localized strings for all 280 keys including Romanize Lyrics and
Enable %@ Scrobbling, and normalizesLocalizable.xcstringswith Xcode-style spacing ("key" : value).AI Prompt (Optional)
🤖 AI Prompt Used
AI Tool: Claude Code
Type of Change
Changes Made
fr):frlocalizations added acrossLocalizable.xcstrings(alongside existingar/ko/tr/id), fullfr.lproj/Localizable.strings(280 entries),SettingsManager.ContentLanguage.french(languageCode: fr, picker label Français).AppLocalizationTestscovers French Artist ("Artiste") and Subscribe %@ ("S'abonner") formatting."Romaniser les paroles"), matching entry infr.lproj."Activer le Scrobbling %@") in catalog and.lproj;%@placeholder moves to end to match French grammar.Localizable.xcstrings: Normalized to Xcode-style JSON (space before:) after edits so future diffs are mostly substantive.Testing
swift test --skip KasetUITests— 1121 tests, all passing)Checklist
swiftlint --strict && swiftformat .Additional Notes
%@inEnable %@ Scrobblinglets French place the service name (e.g. Last.fm) where grammar requires — here at the end:"Activer le Scrobbling %@".«guillemets»for quotation marks in longer strings (e.g. the passkey note), following typographic convention.xcstringsafter a tool emits compact JSON: