Skip to content

Add Swedish localization#1186

Merged
steipete merged 2 commits into
steipete:mainfrom
yeager:add-swedish-localization
May 28, 2026
Merged

Add Swedish localization#1186
steipete merged 2 commits into
steipete:mainfrom
yeager:add-swedish-localization

Conversation

@yeager
Copy link
Copy Markdown

@yeager yeager commented May 27, 2026

Summary

  • Add Swedish (sv) localization with full Localizable.strings coverage
  • Add Swedish as a selectable app language
  • Add the Swedish language label to the English fallback localization
  • Rebase the PR branch onto current main (ca63a8e7) and refresh Swedish coverage for new upstream keys

Validation

  • plutil -lint Sources/CodexBar/Resources/en.lproj/Localizable.strings Sources/CodexBar/Resources/sv.lproj/Localizable.strings
  • English/Swedish key parity: en=1025 sv=1025 missing=0 extra=0 placeholder_mismatches=0
  • swift test --filter LocalizationBundleTests
  • make check
  • CODEXBAR_SIGNING=adhoc ./Scripts/package_app.sh debug

Runtime proof

Copied live output from the packaged debug app after selecting Swedish via appLanguage=sv:

CodexBar PR #1186 Swedish runtime proof
bundle_path=/Users/bosse/workspace-main/CodexBar/CodexBar.app
bundle_id=com.steipete.codexbar.debug
defaults_appLanguage=sv
defaults_AppleLanguages=(     sv )
running_process=23228 /Users/bosse/workspace-main/CodexBar/CodexBar.app/Contents/MacOS/CodexBar

Packaged app Swedish strings:
  "Add Account" => "Lägg till konto"
  "language_swedish" => "Svenska"
  "language_title" => "Språk"
  "No usage configured." => "Ingen användning konfigurerad."
  "quota_warning_notification_title" => "%1$@ %2$@-kvot låg"
  "Settings" => "Inställningar"
  "Settings..." => "Inställningar..."

source_key_parity en=1025 sv=1025 missing=0 extra=0 placeholder_mismatches=0

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 27, 2026

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 4:53 PM ET / 20:53 UTC.

Summary
The PR adds Swedish as a selectable app language, adds the English fallback language label, adds a full sv.lproj/Localizable.strings, and updates the changelog entry for the localization.

Reproducibility: not applicable. this is a localization feature PR, not a bug report. The relevant verification is key parity, packaged-app localization proof, and maintainer wording review.

Review metrics: 2 noteworthy metrics.

  • Localization coverage: 1025 en keys, 1025 sv keys, 0 key differences. Full key parity is the main correctness signal for a complete locale resource addition.
  • Changed surface: 4 files changed, 1 new locale resource. The patch is broad in string count but narrow in code surface, which keeps merge review focused on localization behavior and wording.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Wait for required GitHub checks to finish green on head 84154de135a5374ff361671efde485b96bf74a29.
  • [P2] Have a Swedish-speaking reviewer or maintainer skim the new strings before merge.

Risk before merge

  • [P1] GitHub context reports head 84154de135a5374ff361671efde485b96bf74a29 as mergeable but mergeableState is unstable, so required checks should be green before merge.
  • [P1] Source inspection and key parity do not validate Swedish wording quality; a Swedish-speaking reviewer or maintainer should skim the new strings before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the Swedish localization after required checks are green and a maintainer is comfortable with the translation wording, keeping the existing enum-plus-resource-bundle localization pattern.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is needed; maintainers should review Swedish wording and merge after required checks pass.

Security
Cleared: The diff is limited to localization resources, the app-language enum, and a changelog entry; it does not add dependencies, scripts, secret handling, or code-execution paths.

Review details

Best possible solution:

Land the Swedish localization after required checks are green and a maintainer is comfortable with the translation wording, keeping the existing enum-plus-resource-bundle localization pattern.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a localization feature PR, not a bug report. The relevant verification is key parity, packaged-app localization proof, and maintainer wording review.

Is this the best way to solve the issue?

Yes, the implementation is the narrow maintainable path: it adds a new AppLanguage case and a matching sv.lproj resource under the existing SwiftPM resource packaging. The only non-automatable part is Swedish wording review.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 1115d2d63a78.

Label changes

Label justifications:

  • P3: This is a low-risk localization feature with limited blast radius and no core runtime regression signal.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR includes copied live output from a packaged debug app after selecting Swedish, including visible Swedish strings and key/placeholder parity.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR includes copied live output from a packaged debug app after selecting Swedish, including visible Swedish strings and key/placeholder parity.
Evidence reviewed

What I checked:

  • Current main lacks Swedish language support: Current AppLanguage on main lists system, English, Spanish, Catalan, Simplified Chinese, Traditional Chinese, and Brazilian Portuguese only, so the central PR change is not already implemented on main. (Sources/CodexBar/PreferencesGeneralPane.swift:5, 1115d2d63a78)
  • PR adds Swedish to the selectable app languages: The PR head adds case swedish = "sv" and maps it to L("language_swedish"), matching the existing enum-driven picker pattern. (Sources/CodexBar/PreferencesGeneralPane.swift:13, 84154de135a5)
  • PR adds the fallback language label: The PR head adds language_swedish = Svenska to the English fallback localization, so non-Swedish resource bundles can still label the new language through the existing fallback behavior. (Sources/CodexBar/Resources/en.lproj/Localizable.strings:402, 84154de135a5)
  • Swedish localization has source key parity: A read-only key comparison against the PR head found 1025 English keys, 1025 Swedish keys, and no key differences in comm -3 output. (Sources/CodexBar/Resources/sv.lproj/Localizable.strings:1, 84154de135a5)
  • Resource packaging uses the existing Resources bundle: The CodexBar executable target processes Resources, so adding an sv.lproj resource follows the same packaging path as the existing localizations. (Package.swift:106, 1115d2d63a78)
  • Runtime proof is present in the PR discussion: The PR body and follow-up comment include copied live output from a packaged debug app with appLanguage=sv, showing Swedish strings and source_key_parity en=1025 sv=1025 missing=0 extra=0 placeholder_mismatches=0. (84154de135a5)

Likely related people:

  • steipete: Blame and history show Peter Steinberger on the current AppLanguage and English localization lines through 14b2b25, and the PR branch also includes a changelog commit by steipete. (role: recent area contributor and release integrator; confidence: high; commits: 14b2b2524f7c, 84154de135a5; files: Sources/CodexBar/PreferencesGeneralPane.swift, Sources/CodexBar/Resources/en.lproj/Localizable.strings, CHANGELOG.md)
  • jack24254029: The recent popup/provider localization expansion touched Localization.swift, PreferencesGeneralPane.swift, and the English strings that this PR extends. (role: recent localization contributor; confidence: medium; commits: ff2fc132a2da; files: Sources/CodexBar/Localization.swift, Sources/CodexBar/PreferencesGeneralPane.swift, Sources/CodexBar/Resources/en.lproj/Localizable.strings)
  • manuzimferreira: Recent full Brazilian Portuguese parity work is the closest current-main analogue for adding or refreshing complete locale coverage. (role: adjacent locale coverage contributor; confidence: medium; commits: 61d5a217b2ce; files: Sources/CodexBar/Resources/pt-BR.lproj/Localizable.strings)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels May 27, 2026
@yeager yeager force-pushed the add-swedish-localization branch from eaee97b to e9fc4eb Compare May 28, 2026 19:42
@yeager
Copy link
Copy Markdown
Author

yeager commented May 28, 2026

Updated the PR branch and added the missing behavior proof.

What changed:

  • Rebased add-swedish-localization onto current main (ca63a8e7).
  • Refreshed sv.lproj/Localizable.strings for the new upstream localization keys.
  • Removed the stale Designs key.
  • Fixed the Swedish placeholder order for quota_warning_notification_title.

Validation:

  • plutil -lint for English and Swedish .strings: OK
  • Key/placeholder parity: en=1025 sv=1025 missing=0 extra=0 placeholder_mismatches=0
  • swift test --filter LocalizationBundleTests: 5/5 passed
  • make check: passed
  • CODEXBAR_SIGNING=adhoc ./Scripts/package_app.sh debug: packaged CodexBar.app

Runtime proof copied from the packaged debug app with Swedish selected:

CodexBar PR #1186 Swedish runtime proof
bundle_path=/Users/bosse/workspace-main/CodexBar/CodexBar.app
bundle_id=com.steipete.codexbar.debug
defaults_appLanguage=sv
defaults_AppleLanguages=(     sv )
running_process=23228 /Users/bosse/workspace-main/CodexBar/CodexBar.app/Contents/MacOS/CodexBar

Packaged app Swedish strings:
  "Add Account" => "Lägg till konto"
  "language_swedish" => "Svenska"
  "language_title" => "Språk"
  "No usage configured." => "Ingen användning konfigurerad."
  "quota_warning_notification_title" => "%1$@ %2$@-kvot låg"
  "Settings" => "Inställningar"
  "Settings..." => "Inställningar..."

source_key_parity en=1025 sv=1025 missing=0 extra=0 placeholder_mismatches=0

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 28, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 28, 2026
@steipete steipete force-pushed the add-swedish-localization branch from e9fc4eb to 84154de Compare May 28, 2026 20:48
@steipete steipete merged commit 8579740 into steipete:main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants