Skip to content

feat(sender): follow the macOS language order on first launch - #213

Merged
swellweb merged 1 commit into
swellweb:maint-3.6from
kenshinice-ai:sender-system-language
Oct 16, 2026
Merged

swellweb merged 1 commit into
swellweb:maint-3.6from
kenshinice-ai:sender-system-language

Conversation

@kenshinice-ai

Copy link
Copy Markdown

Without a saved language, the Sender always starts in Italian. Someone whose Mac is set to Chinese, German, French or English first meets an Italian window and has to find the language switch.

This picks the first supported language in Locale.preferredLanguages instead, and falls back to English when none is supported. A language chosen in Settings is still saved and still wins, exactly as before, so existing users see no change.

  • TBDisplaySenderLanguage.preferred(by:) matches on the base language code (zh-Hans-AU → zh), using the existing fileStem mapping, so a new language added to the enum is picked up automatically.
  • TBSenderLanguageTests covers the order, skipping unsupported languages, and the English fallback.
  • xcodebuild test: 178 tests, 0 failures (175 existing + 3 new).

The Receiver already has an Auto language mode, so it is unchanged.

🤖 Generated with Claude Code

Without a saved choice the Sender started in Italian for everyone. It now
picks the first supported language in Locale.preferredLanguages, falling
back to English. A language chosen in Settings still wins, as before.
@swellweb
swellweb changed the base branch from main to maint-3.6 October 16, 2026 14:33
@swellweb

Copy link
Copy Markdown
Owner

Thanks, this is a useful first-launch improvement. I moved it to maint-3.6 and verified the combined local test run. I added isolated-preference regression tests in the integration follow-up to confirm that an existing explicit language choice is preserved and an invalid saved value falls back safely. No user preferences were reset.

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.

2 participants