Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Reframed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
E1000000000000000000000C /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = E1000000000000000000000B /* Sparkle */; };
E1000000000000000000000D /* SparkleUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1000000000000000000000E /* SparkleUpdater.swift */; };
E30000000000000000000001 /* VideoCompositor+ManualExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20000000000000000000001 /* VideoCompositor+ManualExport.swift */; };
ZH0000000000000000000001 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = ZH0000000000000000000002 /* Localizable.strings */; };
ZH0000000000000000000003 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ZH0000000000000000000004 /* InfoPlist.strings */; };
E30000000000000000000002 /* VideoCompositor+ParallelExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20000000000000000000002 /* VideoCompositor+ParallelExport.swift */; };
E30000000000000000000003 /* VideoCompositor+GIFExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20000000000000000000003 /* VideoCompositor+GIFExport.swift */; };
E30000000000000000000004 /* VideoCompositor+Audio.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20000000000000000000004 /* VideoCompositor+Audio.swift */; };
Expand Down Expand Up @@ -362,6 +364,8 @@
B1000000000000000000004D /* PrimaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryButton.swift; sourceTree = "<group>"; };
B1000000000000000000004E /* SelectButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectButton.swift; sourceTree = "<group>"; };
B1000000000000000000004F /* LanguagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguagePicker.swift; sourceTree = "<group>"; };
ZH0000000000000000000002 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = "Reframed/zh-Hans.lproj/Localizable.strings"; sourceTree = SOURCE_ROOT; };
ZH0000000000000000000004 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = "Reframed/zh-Hans.lproj/InfoPlist.strings"; sourceTree = SOURCE_ROOT; };
B17A303B9C60827322EAE0A9 /* VideoPreviewContainer+Cursor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VideoPreviewContainer+Cursor.swift"; sourceTree = "<group>"; };
B1F00000000000000000001 /* WindowPositionObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowPositionObserver.swift; sourceTree = "<group>"; };
B20000000000000000000001 /* WebcamCapture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebcamCapture.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -533,6 +537,8 @@
children = (
B10000000000000000000001 /* ReframedApp.swift */,
B10000000000000000000019 /* Info.plist */,
ZH0000000000000000000004 /* InfoPlist.strings */,
ZH0000000000000000000002 /* Localizable.strings */,
B1000000000000000000001A /* Reframed.entitlements */,
D10000000000000000000003 /* App */,
D10000000000000000000004 /* Logging */,
Expand Down Expand Up @@ -951,6 +957,7 @@
knownRegions = (
en,
Base,
"zh-Hans",
);
mainGroup = D10000000000000000000001;
packageReferences = (
Expand All @@ -976,6 +983,8 @@
files = (
3DCA03E12F3B511C003FE309 /* Assets.xcassets in Resources */,
AA0000000000000000000001 /* Credits.html in Resources */,
ZH0000000000000000000001 /* Localizable.strings in Resources */,
ZH0000000000000000000003 /* InfoPlist.strings in Resources */,
);
};
/* End PBXResourcesBuildPhase section */
Expand Down
4 changes: 2 additions & 2 deletions Reframed/App/WindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class WindowController: ObservableObject {
let windowNumber = windowDict[kCGWindowNumber as String] as? Int ?? 0
let title = windowDict[kCGWindowName as String] as? String ?? ""
let app = NSRunningApplication(processIdentifier: pid)
let appName = app?.localizedName ?? "Unknown"
let appName = app?.localizedName ?? "未知"

let axApp = AXUIElementCreateApplication(pid)
let axWindow = findAXWindow(for: axApp, matching: bounds) ?? axApp
Expand Down Expand Up @@ -137,7 +137,7 @@ final class WindowController: ObservableObject {
let windowNumber = windowDict[kCGWindowNumber as String] as? Int ?? 0
let title = windowDict[kCGWindowName as String] as? String ?? ""
let app = NSRunningApplication(processIdentifier: pid)
let appName = app?.localizedName ?? "Unknown"
let appName = app?.localizedName ?? "未知"

let axApp = AXUIElementCreateApplication(pid)
let axWindow = findAXWindow(for: axApp, matching: bounds) ?? axApp
Expand Down
2 changes: 1 addition & 1 deletion Reframed/CaptureModes/CaptureArea/CaptureAreaView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct CaptureAreaView: View {

private func fieldGroup<Content: View>(_ title: String, @ViewBuilder content: () -> Content) -> some View {
VStack(spacing: 6) {
Text(title)
Text(LocalizedStringKey(title))
.font(.system(size: FontSize.xxs, weight: .medium))
.foregroundStyle(secondaryTextColor)
content()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct StartRecordingOverlayView: View {

VStack(spacing: 12) {
if totalScreens > 1 {
Text("Display \(screenIndex)")
Text("显示器 \(screenIndex)")
.font(.system(size: FontSize.xxl, weight: .bold, design: .rounded))
.foregroundStyle(Color.black)
}
Expand Down
4 changes: 2 additions & 2 deletions Reframed/CaptureModes/CaptureWindow/ResizePopover.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct ResizePopover: View {
}

private func resizeSectionHeader(_ title: String) -> some View {
Text(title)
Text(LocalizedStringKey(title))
.font(.system(size: FontSize.xs, weight: .medium))
.foregroundStyle(secondaryTextColor)
.frame(maxWidth: .infinity, alignment: .leading)
Expand All @@ -170,7 +170,7 @@ private struct ResizePopoverRow: View {
var body: some View {
Button(action: action) {
HStack {
Text(label)
Text(LocalizedStringKey(label))
.font(.system(size: FontSize.xs))
Spacer()
}
Expand Down
2 changes: 1 addition & 1 deletion Reframed/Compositor/ExportSheet+Phases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension ExportSheet {
.foregroundStyle(ReframedColors.secondaryText)

if let eta = editorState.exportETA, eta > 0 {
Text("ETA \(formatDuration(seconds: Int(ceil(eta))))")
Text("预计剩余 \(formatDuration(seconds: Int(ceil(eta))))")
.font(.system(size: FontSize.xs).monospacedDigit())
.foregroundStyle(ReframedColors.secondaryText)
}
Expand Down
12 changes: 6 additions & 6 deletions Reframed/Compositor/ExportSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct ExportSheet: View {
)
}

Text(settings.gifQuality.description)
Text(LocalizedStringKey(settings.gifQuality.description))
.font(.system(size: FontSize.xs))
.foregroundStyle(ReframedColors.secondaryText)
.padding(.top, -10)
Expand All @@ -106,7 +106,7 @@ struct ExportSheet: View {
)
}

Text(settings.codec.description)
Text(LocalizedStringKey(settings.codec.description))
.font(.system(size: FontSize.xs))
.foregroundStyle(ReframedColors.secondaryText)
.padding(.top, -10)
Expand All @@ -126,7 +126,7 @@ struct ExportSheet: View {
}

if sourceFPS < 60 {
Text("Source recorded at \(sourceFPS) fps. Higher frame rates are not available.")
Text("源录制帧率为 \(sourceFPS) fps,不能导出更高帧率。")
.font(.system(size: FontSize.xs))
.foregroundStyle(ReframedColors.secondaryText)
.padding(.top, -10)
Expand Down Expand Up @@ -159,7 +159,7 @@ struct ExportSheet: View {
)
}

Text(settings.mode.description)
Text(LocalizedStringKey(settings.mode.description))
.font(.system(size: FontSize.xs))
.foregroundStyle(ReframedColors.secondaryText)
.padding(.top, -10)
Expand All @@ -174,7 +174,7 @@ struct ExportSheet: View {
)
}

Text(settings.captionExportMode.description)
Text(LocalizedStringKey(settings.captionExportMode.description))
.font(.system(size: FontSize.xs))
.foregroundStyle(ReframedColors.secondaryText)
.padding(.top, -10)
Expand Down Expand Up @@ -244,7 +244,7 @@ struct ExportSheet: View {

func settingsRow<Content: View>(label: String, @ViewBuilder content: () -> Content) -> some View {
VStack(alignment: .leading, spacing: 6) {
Text(label)
Text(LocalizedStringKey(label))
.font(.system(size: FontSize.xs, weight: .medium))
.foregroundStyle(ReframedColors.secondaryText)
content()
Expand Down
4 changes: 2 additions & 2 deletions Reframed/Editor/EditorState+Export.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ extension EditorState {

if isMicProcessing {
exportStatusMessage =
"Waiting for noise reduction… \(Int(micProcessingProgress * 100))%"
"正在等待降噪完成… \(Int(micProcessingProgress * 100))%"
while isMicProcessing {
try await Task.sleep(for: .milliseconds(100))
exportStatusMessage =
"Waiting for noise reduction… \(Int(micProcessingProgress * 100))%"
"正在等待降噪完成… \(Int(micProcessingProgress * 100))%"
}
exportStatusMessage = nil
}
Expand Down
2 changes: 1 addition & 1 deletion Reframed/Editor/EditorView+Sidebar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extension EditorView {
Image(systemName: tab.icon)
.font(.system(size: FontSize.base))
.foregroundStyle(ReframedColors.primaryText)
Text(tab.label)
Text(LocalizedStringKey(tab.label))
.font(.system(size: FontSize.xxs, weight: .semibold))
.foregroundStyle(selectedTab == tab ? ReframedColors.primaryText : ReframedColors.secondaryText)
}
Expand Down
4 changes: 2 additions & 2 deletions Reframed/Editor/EditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ struct EditorView: View {
? editorState.micProcessingProgress * 0.5
: (micWaveformGenerator.isGenerating ? 0.5 + micWaveformGenerator.progress * 0.5 : nil),
micAudioMessage: editorState.isMicProcessing
? "Denoising… \(Int(editorState.micProcessingProgress * 100))%"
? "正在降噪… \(Int(editorState.micProcessingProgress * 100))%"
: (micWaveformGenerator.isGenerating
? "Generating waveform… \(Int(micWaveformGenerator.progress * 100))%"
? "正在生成波形… \(Int(micWaveformGenerator.progress * 100))%"
: nil),
onScrub: { time in
editorState.pause()
Expand Down
2 changes: 1 addition & 1 deletion Reframed/Editor/EditorWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class EditorWindow: NSObject, NSWindowDelegate {
}
window.isReleasedWhenClosed = false
window.delegate = self
window.title = "Reframed Editor"
window.title = NSLocalizedString("Reframed Editor", comment: "")
window.level = .floating
window.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true)
Expand Down
Loading