Add language selection and DMG packaging#163
Open
JairHan wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a user-selectable app language (English / Simplified Chinese) and applies bilingual strings across the UI, errors, and notifications, plus a helper script for building a distributable DMG.
Changes:
- Introduce
AppLanguage+AppTextand persist selected language inSettingsStore - Localize Settings / menu bar / overlay UI strings and several error/notification messages
- Add
script/package_dmg.shDMG packaging script and ignoredist/
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| script/package_dmg.sh | Adds a build + DMG packaging script outputting into dist/ |
| BetterCaptureTests/SettingsStoreTests.swift | Adds tests for default + persistence behavior of appLanguage |
| BetterCaptureTests/FrameRateTests.swift | Verifies localized FrameRate display name |
| BetterCaptureTests/ErrorTests.swift | Makes permission-error assertions robust across EN/ZH strings |
| BetterCapture/View/SettingsView.swift | Localizes settings tabs and settings screens; adds language picker and wires settings into shortcuts view |
| BetterCapture/View/RecordingOverlayView.swift | Localizes overlay button/labels |
| BetterCapture/View/PreviewThumbnailView.swift | Adds language plumbing for localized “LIVE” badge |
| BetterCapture/View/MenuBarView.swift | Localizes menu bar UI and propagates language into child components |
| BetterCapture/View/MenuBarSettingsView.swift | Localizes menu bar settings sections/pickers and device default labels |
| BetterCapture/View/AreaSelectionOverlay.swift | Localizes confirm/cancel button titles |
| BetterCapture/Service/NotificationService.swift | Localizes notification titles/bodies; re-registers categories before sending |
| BetterCapture/Service/CaptureEngine.swift | Localizes CaptureError messages |
| BetterCapture/Service/AssetWriter.swift | Localizes AssetWriterError messages |
| BetterCapture/Model/SettingsStore.swift | Adds persisted appLanguage, localized display names for FrameRate and VideoQuality |
| BetterCapture/Model/ContentSelectionMode.swift | Localizes selection mode labels |
| BetterCapture/Model/AppLanguage.swift | Introduces AppLanguage enum + AppText helper |
| .gitignore | Ignores generated dist/ directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+19
| static var current: AppLanguage { | ||
| let rawValue = UserDefaults.standard.string(forKey: "appLanguage") ?? AppLanguage.english.rawValue | ||
| return AppLanguage(rawValue: rawValue) ?? .english | ||
| } |
Comment on lines
+87
to
+91
| @Test func appLanguagePersists() { | ||
| let store = makeStore() | ||
| store.appLanguage = .simplifiedChinese | ||
| #expect(store.appLanguage == .simplifiedChinese) | ||
| } |
Comment on lines
100
to
105
| /// Sends a notification for a successfully saved recording | ||
| /// - Parameter fileURL: The URL of the saved recording file | ||
| func sendRecordingSavedNotification(fileURL: URL) { | ||
| registerNotificationCategories() | ||
| let language = settings.appLanguage | ||
| let content = UNMutableNotificationContent() |
Comment on lines
+5
to
+7
| APP_NAME="BetterCapture" | ||
| CONFIGURATION="${CONFIGURATION:-Debug}" | ||
| CODE_SIGNING_ALLOWED="${CODE_SIGNING_ALLOWED:-NO}" |
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.
Add language selection and DMG packaging