feat: Arabic (ar) localization + sidebar localization fix#70
Open
zeck00 wants to merge 1 commit intomomenbasel:mainfrom
Open
feat: Arabic (ar) localization + sidebar localization fix#70zeck00 wants to merge 1 commit intomomenbasel:mainfrom
zeck00 wants to merge 1 commit intomomenbasel:mainfrom
Conversation
- Add Arabic localization (PureMac/ar.lproj/Localizable.strings, 137 strings) using formal MSA / Apple's standard macOS terminology - Add Arabic README (docs/README.ar.md) with RTL-aware blocks - Add Arabic to the language switcher across all translated READMEs - Localize the sidebar in MainWindow.swift: groups (Home, Applications, Cleaning) and items (Installed Apps, Orphaned Files) now use LocalizedStringKey instead of raw String, so all locales — not just Arabic — finally translate properly - Localize EmptyStateView's title/description/actionLabel as LocalizedStringKey so the empty state in MainWindow translates too - Add the corresponding 6 new sidebar keys to all 6 .strings files (en, ar, es, ja, zh-Hans, zh-Hant) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Adds Arabic localization and fixes a long-standing issue where the sidebar stayed in English regardless of the user's locale.
Arabic localization
PureMac/ar.lproj/Localizable.stringswith all 137 strings translated using formal Modern Standard Arabic and Apple's standard macOS terminology (e.g. الوصول الكامل إلى القرص for Full Disk Access, سلة المهملات for Trash, المساحة القابلة للإزالة for Purgeable Space)docs/README.ar.mdwithdir="rtl"blocks for proper RTL rendering on GitHubSidebar localization fix (benefits every locale)
While testing Arabic I noticed the sidebar stayed in English even when other parts of the UI translated. Root cause:
MainWindow.swiftpassed rawStringvalues toSection()andLabel(), which bypasses SwiftUI'sLocalizedStringKeylookup entirely.MainWindow.swift: sidebar groups (Home, Applications, Cleaning) and items (Installed Apps, Orphaned Files) now useLocalizedStringKey. Category labels useLocalizedStringKey(category.rawValue)so the existing translated category names (Smart Scan, System Junk, etc.) finally appear in the sidebarEmptyStateView.swift:title/description/actionLabelare nowLocalizedStringKeyso the default landing-state text translates too.stringsfiles — en, ar, es, ja, zh-Hans, zh-HantThis fix means Spanish, Japanese, Simplified Chinese, and Traditional Chinese users finally see the sidebar in their language too.
Notes
.stringsfiles, view code, and READMEs are committed — the Xcode project regenerates viaxcodegen(same pattern as PR Add Japanese (ja) localization #41 and feat: Spanish (es) localization + multilingual README #65)EmptyStateView's parameter type change is source-compatible: every existing call site passes string literals, which auto-convert toLocalizedStringKeyNavigationSplitViewsidebars on the left even in RTL languages — this matches Apple's own apps (System Settings, Finder), so no layout-direction override is neededTest plan
xcodegen generate—arshould appear inknownRegionsdefaults write com.puremac.app AppleLanguages -array ar en && open /Applications/PureMac.appdefaults write com.puremac.app AppleLanguages -array es en— sidebar should now show Inicio / Aplicaciones / Limpiezadefaults delete com.puremac.app AppleLanguages🤖 Generated with Claude Code