Skip to content

Add language selection and DMG packaging#163

Open
JairHan wants to merge 1 commit into
jsattler:mainfrom
JairHan:main
Open

Add language selection and DMG packaging#163
JairHan wants to merge 1 commit into
jsattler:mainfrom
JairHan:main

Conversation

@JairHan
Copy link
Copy Markdown

@JairHan JairHan commented May 30, 2026

Add language selection and DMG packaging

Copilot AI review requested due to automatic review settings May 30, 2026 06:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 + AppText and persist selected language in SettingsStore
  • Localize Settings / menu bar / overlay UI strings and several error/notification messages
  • Add script/package_dmg.sh DMG packaging script and ignore dist/

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 thread script/package_dmg.sh
Comment on lines +5 to +7
APP_NAME="BetterCapture"
CONFIGURATION="${CONFIGURATION:-Debug}"
CODE_SIGNING_ALLOWED="${CODE_SIGNING_ALLOWED:-NO}"
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