Skip to content

l10n: add Swedish localization - #271

Open
yeager wants to merge 2 commits into
Homebrew:mainfrom
yeager:l10n/swedish
Open

yeager wants to merge 2 commits into
Homebrew:mainfrom
yeager:l10n/swedish

Conversation

@yeager

@yeager yeager commented Oct 14, 2026 •

Copy link
Copy Markdown

What and why

Add a complete Swedish (sv) localization for BrewUI's main application, shared components, configuration, console, discovery, diagnostics, installed packages, self-upgrade, and services views. Swedish can now be selected as an app language; untranslated fallback is no longer needed for these catalogs.

Validation

  • scripts/localize verify

  • scripts/localize status reports sv 278 translated 0 untranslated

  • scripts/test was run. Two Discover number-format assertions fail under this machine's Swedish system locale; the identical failures reproduce on unmodified main.

  • Swedish review: svlang skrivregler found no writing-rule violations; Hunspell results were reviewed as Homebrew, BrewUI, brew, Brewfile, and other project terms.

  • Catalog review: JSON parsing, duplicate-key detection, and source/Swedish placeholder comparison passed.

  • gitleaks protect --staged --redact --source .

  • I followed the conventions and workflow, checked for duplicate PRs and kept this change focused.

  • Automated regression coverage is impractical for localization-only catalog content; catalog validation and the full test suite were run instead.

Screenshots

Not applicable. This changes localized catalog text only; it does not change layouts or interactions.

AI assistance

  • AI was used to generate or assist with generating this PR.

Codex assisted with Swedish draft translations. The resulting catalogs were checked against the source strings and their UI comments, then validated with the project verifier, tests, Swedish writing-rule checks, placeholder checks, and Gitleaks.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2a788c2d-212a-41d7-9ac6-0ded79713c73
📥 Commits

Reviewing files that changed from the base of the PR and between f284b0c and 9c10ac4.

📒 Files selected for processing: 4
  • Homebrew/Localizable.xcstrings
  • Sources/BrewFeatureConsole/Resources/Localizable.xcstrings
  • Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings
  • Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings
🚧 Files skipped from review as they are similar to previous changes: 4
  • Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings
  • Homebrew/Localizable.xcstrings
  • Sources/BrewFeatureConsole/Resources/Localizable.xcstrings
  • Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 5
  • GitHub Check: workflow_syntax
  • GitHub Check: Live end-to-end canaries
  • GitHub Check: SwiftFormat + SwiftLint + BrewUILint
  • GitHub Check: Build + unit/integration tests
  • GitHub Check: UI tests
📝 Summary

Summary by CodeRabbit

  • Localization
    • Added Swedish translations throughout Homebrew, including navigation, package discovery and management, console, services, configuration, and upgrade interfaces.
    • Swedish text now covers status messages, search and loading states, errors, accessibility labels, settings guidance, and common actions.
    • Existing English and other language translations remain unchanged.

This change adds Swedish translations across shared app strings and the Configuration, Console, Discover, Doctor, Installed, Self Upgrade, and Services features. Existing source strings and other localizations remain unchanged.

Changes: Swedish localization

Layer / File(s) Summary
App and shared interface translations
Homebrew/Localizable.xcstrings, Sources/BrewFeatureConfig/Resources/Localizable.xcstrings, Sources/BrewUIComponents/Resources/Localizable.xcstrings
Swedish translations are added for app navigation and messages, Configuration labels and guidance, and shared UI text for relative times, commands, and Homebrew errors.
Discover and installed-package translations
Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings, Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings
Swedish translations are added for package search, details, statuses, accessibility labels, upgrade and uninstall actions, and related errors and empty states.
Console, Services, Doctor, and self-upgrade translations
Sources/BrewFeatureConsole/Resources/Localizable.xcstrings, Sources/BrewFeatureServices/Resources/Localizable.xcstrings, Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings, Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings
Swedish translations are added for console controls and statuses, service information, Brew Doctor messages, and self-upgrade prompts.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Merge Risk: 🔵 Low · up to 9c10a

Swedish running statuses use different punctuation from the source text. This is a minor presentation concern and does not block merging.

### Architecture Summary

Architecture risk: 🔵 Low · up to f284b

The change affects 2 systems.

Changed systems: Sources, Homebrew

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Sources (service) was modified; 8 changed files map to changed impact.
  • observed — Homebrew (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Homebrew/Localizable.xcstrings: Added a Swedish translation for the crash-report dialog body.
  • observed — Modified behavior in Homebrew/Localizable.xcstrings: Added a Swedish translation for the catalog browsing and search subtitle, retaining the %lld+ package count placeholder.
  • observed — Modified behavior in Homebrew/Localizable.xcstrings: Added a Swedish translation for the installed-packages browsing and search subtitle.
  • observed — Modified behavior in Homebrew/Localizable.xcstrings: Added a Swedish translation for the Homebrew installation diagnostics subtitle.
Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description clearly explains the Swedish localization, affected areas, validation steps, and known test behavior. It is directly related to the changeset.
Title check Passed The title clearly and concisely identifies the main change: adding Swedish localization.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 287d8ac9-ffa3-48b4-be8e-96b5bca8f6db
📥 Commits

Reviewing files that changed from the base of the PR and between 7bc5efa and f284b0c.

📒 Files selected for processing: 9
  • Homebrew/Localizable.xcstrings
  • Sources/BrewFeatureConfig/Resources/Localizable.xcstrings
  • Sources/BrewFeatureConsole/Resources/Localizable.xcstrings
  • Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings
  • Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings
  • Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings
  • Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings
  • Sources/BrewFeatureServices/Resources/Localizable.xcstrings
  • Sources/BrewUIComponents/Resources/Localizable.xcstrings

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout: 3
  • GitHub Check: UI tests
  • GitHub Check: Build + unit/integration tests
  • GitHub Check: Live end-to-end canaries

Comment thread Homebrew/Localizable.xcstrings Outdated
"stringUnit" : {
"state" : "translated",
"value" : "— %@"
"value" : "%@"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the running-status separator.

ConsoleStatusBar.summaryText localizes Text("— \(shortLabel)", ...) through the "— %@" key. These values replace the separator with %@, so Spanish, Chinese, and Swedish running statuses lose the dash. Keep — %@ in these values.

Also applies to: 613-613, 619-620, 625-625

Comment thread Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings Outdated
Comment thread Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings Outdated
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.

1 participant