Repository navigation
Conversation
Each interface language now has its own file under Sources/InkletApp/Localization, so adding a key means editing ten small files instead of scrolling one 3,300-line dictionary. Lookup, fallback and in-app language switching are unchanged. Localization source tests read the split files through a shared fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DzisdHuvFVePscX66cn3Lw
wanming
marked this pull request as ready for review
October 4, 2026 23:31
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.
Before: all ten interface languages lived in one 3,341-line
InkletLocalization.swift. To add a string, you had to find ten spots in that file.After: each language has its own file under
Sources/InkletApp/Localization/(L10n+en.swift,L10n+ja.swift, and so on).InkletLocalization.swiftis down to about 190 lines of lookup logic. The app looks and behaves exactly the same, including switching languages from inside the app.The tables are still Swift dictionaries, not
.stringsresource files. That keepsL10nlookup, fallback and runtime switching unchanged, and it avoids any change to how the app bundle is packaged. A script confirmed that all 312 keys in all 10 tables match the old file exactly.How: each
private static let <lang>table became astatic letin anextension L10nfile. The localization source tests now read the split files through a sharedLocalizationSourceFixture, which joins them intranslationTablesorder, so their ordering assertions still hold. CONTRIBUTING.md now says where interface text lives and that the localization check fails when a key is missing from any table.🤖 Generated with Claude Code
https://claude.ai/code/session_01DzisdHuvFVePscX66cn3Lw
Generated by Claude Code