You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All UI text is written as English string literals. We'd love translations, but first the app needs to be localizable. This issue covers the scaffolding and moving every user-facing string into a catalog, not the translations themselves.
Where strings live
SwiftUI views in Sources/Snapcap/Views/ (including SettingsView.swift, OnboardingView.swift, QuickRecordView.swift and EditorView.swift) and in Sources/Snapcap/Windows/RecordingPanels.swift. Literals passed to Text, Button and Toggle are already LocalizedStringKeys, but strings passed as String aren't. Examples: SliderRow(title:), Banner(title:message:), HUDButton(help:), and EditorModel.showToast(_:) messages.
AppKit strings:NSMenuItem titles in Sources/Snapcap/App/AppDelegate.swift (makeMainMenu) and StatusItemController.swift (buildMenu), plus NSAlert text in AppModel.swift, AppDelegate.swift and LibraryView.swift.
SnapcapCore labels shown in the UI:CameraShape.label, CameraAspect.label, ExportResolution.label, ExportCodec.label and RecorderError.errorDescription.
Sources/Snapcap/Windows/RegionSelector.swift, which draws text with NSString.draw.
Resources/Info.plist: NSCameraUsageDescription and NSMicrophoneUsageDescription, which need an InfoPlist.strings.
Build:Package.swift has no defaultLocalization or resources yet, and scripts/build-app.sh assembles Snapcap.app by hand.
Proposal
Add a String Catalog (Localizable.xcstrings) with English as the development language. SwiftUI and String(localized:) look in Bundle.main by default, so the simplest route is to compile the catalog into en.lproj inside Snapcap.app/Contents/Resources during build-app.sh (for example with xcrun xcstringstool compile). The alternative is SwiftPM resources with bundle: .module everywhere. Pick one and document it.
Convert String parameters to LocalizedStringResource or String(localized:). Use plural variations for counts, such as "1 recording" and "2 recordings" in LibraryView.
Add CFBundleLocalizations to Info.plist.
Acceptance criteria
Every user-facing string (SwiftUI, AppKit menus and alerts, toasts, core labels and errors, permission prompts) is in the catalog.
Launching with build/Snapcap.app/Contents/MacOS/Snapcap -NSDoubleLocalizedStrings YES doubles every visible string in the setup window, HUD, countdown, editor, Recordings, Settings, onboarding, popover and menus, which shows nothing is left hard-coded.
Plurals are handled correctly.
make run and make test still work, and the English UI is unchanged.
CONTRIBUTING.md gains a short "Adding a translation" section.
Context
All UI text is written as English string literals. We'd love translations, but first the app needs to be localizable. This issue covers the scaffolding and moving every user-facing string into a catalog, not the translations themselves.
Where strings live
Sources/Snapcap/Views/(includingSettingsView.swift,OnboardingView.swift,QuickRecordView.swiftandEditorView.swift) and inSources/Snapcap/Windows/RecordingPanels.swift. Literals passed toText,ButtonandToggleare alreadyLocalizedStringKeys, but strings passed asStringaren't. Examples:SliderRow(title:),Banner(title:message:),HUDButton(help:), andEditorModel.showToast(_:)messages.NSMenuItemtitles inSources/Snapcap/App/AppDelegate.swift(makeMainMenu) andStatusItemController.swift(buildMenu), plusNSAlerttext inAppModel.swift,AppDelegate.swiftandLibraryView.swift.CameraShape.label,CameraAspect.label,ExportResolution.label,ExportCodec.labelandRecorderError.errorDescription.Sources/Snapcap/Windows/RegionSelector.swift, which draws text withNSString.draw.Resources/Info.plist:NSCameraUsageDescriptionandNSMicrophoneUsageDescription, which need anInfoPlist.strings.Package.swifthas nodefaultLocalizationor resources yet, andscripts/build-app.shassemblesSnapcap.appby hand.Proposal
Localizable.xcstrings) with English as the development language. SwiftUI andString(localized:)look inBundle.mainby default, so the simplest route is to compile the catalog intoen.lprojinsideSnapcap.app/Contents/Resourcesduringbuild-app.sh(for example withxcrun xcstringstool compile). The alternative is SwiftPM resources withbundle: .moduleeverywhere. Pick one and document it.Stringparameters toLocalizedStringResourceorString(localized:). Use plural variations for counts, such as "1 recording" and "2 recordings" inLibraryView.CFBundleLocalizationstoInfo.plist.Acceptance criteria
build/Snapcap.app/Contents/MacOS/Snapcap -NSDoubleLocalizedStrings YESdoubles every visible string in the setup window, HUD, countdown, editor, Recordings, Settings, onboarding, popover and menus, which shows nothing is left hard-coded.make runandmake teststill work, and the English UI is unchanged.