Fix locales

This commit is contained in:
Arkadiusz Fal
2026-02-09 00:13:46 +01:00
parent 05f921d605
commit 8464464199
55 changed files with 644 additions and 548 deletions

View File

@@ -17,7 +17,7 @@ struct AboutView: View {
communityLink("GitHub", icon: "github", url: "https://github.com/yattee/yattee")
communityLink("Discord", icon: "discord", url: "https://yattee.stream/discord")
} header: {
Text("Community")
Text(String(localized: "settings.about.community"))
}
Section {

View File

@@ -35,13 +35,13 @@ struct SourceTestResultSection: View {
.foregroundStyle(.green)
if bandwidth.hasWriteAccess {
if let upload = bandwidth.formattedUploadSpeed {
Label("Upload: \(upload)", systemImage: "arrow.up.circle")
Label(String(localized: "sources.bandwidth.upload \(upload)"), systemImage: "arrow.up.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
if let download = bandwidth.formattedDownloadSpeed {
Label("Download: \(download)", systemImage: "arrow.down.circle")
Label(String(localized: "sources.bandwidth.download \(download)"), systemImage: "arrow.down.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}

View File

@@ -72,7 +72,7 @@ struct AddSourceView: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}

View File

@@ -728,13 +728,13 @@ private struct EditFileSourceContent: View {
.foregroundStyle(.green)
if bandwidth.hasWriteAccess {
if let upload = bandwidth.formattedUploadSpeed {
Label("Upload: \(upload)", systemImage: "arrow.up.circle")
Label(String(localized: "sources.bandwidth.upload \(upload)"), systemImage: "arrow.up.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
if let download = bandwidth.formattedDownloadSpeed {
Label("Download: \(download)", systemImage: "arrow.down.circle")
Label(String(localized: "sources.bandwidth.download \(download)"), systemImage: "arrow.down.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}

View File

@@ -58,7 +58,7 @@ struct InstancePickerSheet: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}
@@ -95,7 +95,7 @@ private struct PickerInstanceRow: View {
.font(.caption)
.foregroundStyle(.secondary)
Text("")
Text(verbatim: "")
.font(.caption)
.foregroundStyle(.tertiary)

View File

@@ -241,7 +241,7 @@ private struct LogEntryDetailView: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}
@@ -300,7 +300,7 @@ private struct LogFiltersSheet: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}

View File

@@ -166,7 +166,7 @@ struct PeerTubeInstancesExploreView: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}

View File

@@ -191,7 +191,7 @@ struct TapGesturesSettingsView: View {
Button(role: .cancel) {
selectedZonePosition = nil
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}

View File

@@ -323,7 +323,7 @@ private struct PreviewButton: View {
}
} else if configuration.buttonType == .timeDisplay {
// Time display
Text("0:00 / 3:45")
Text(verbatim: "0:00 / 3:45")
.font(fontStyle.font(.caption))
.foregroundStyle(.white.opacity(0.9))
} else if configuration.buttonType == .brightness || configuration.buttonType == .volume {
@@ -372,7 +372,7 @@ private struct PreviewButton: View {
.fill(.white.opacity(0.3))
.frame(width: avatarSize, height: avatarSize)
.overlay {
Text("Y")
Text(verbatim: "Y")
.font(.system(size: size * 0.6, weight: .semibold))
.foregroundStyle(.white.opacity(0.8))
}
@@ -382,14 +382,14 @@ private struct PreviewButton: View {
if settings.showTitle || settings.showSourceName {
VStack(alignment: .leading, spacing: 0) {
if settings.showTitle {
Text("Video Title")
Text(String(localized: "common.videoTitle"))
.font(fontStyle.font(size: size * 0.5, weight: .medium))
.foregroundStyle(.white.opacity(0.9))
.lineLimit(1)
}
if settings.showSourceName {
Text("Channel")
Text(String(localized: "common.channel"))
.font(fontStyle.font(size: size * 0.4))
.foregroundStyle(.white.opacity(0.6))
.lineLimit(1)

View File

@@ -288,7 +288,7 @@ private struct PreviewButtonView: View {
.frame(width: spacerWidth)
}
} else if configuration.buttonType == .timeDisplay {
Text("0:00 / 3:45")
Text(verbatim: "0:00 / 3:45")
.font(fontStyle.font(size: size * 0.6, weight: .medium))
.foregroundStyle(.white.opacity(0.9))
} else if configuration.buttonType == .brightness || configuration.buttonType == .volume {
@@ -340,7 +340,7 @@ private struct PreviewButtonView: View {
.fill(.white.opacity(0.3))
.frame(width: avatarSize, height: avatarSize)
.overlay {
Text("Y")
Text(verbatim: "Y")
.font(.system(size: size * 0.7, weight: .semibold))
.foregroundStyle(.white.opacity(0.8))
}
@@ -350,14 +350,14 @@ private struct PreviewButtonView: View {
if settings.showTitle || settings.showSourceName {
VStack(alignment: .leading, spacing: 1) {
if settings.showTitle {
Text("Video Title")
Text(verbatim: "Video Title")
.font(fontStyle.font(size: size * 0.55, weight: .medium))
.foregroundStyle(.white.opacity(0.9))
.lineLimit(1)
}
if settings.showSourceName {
Text("Channel Name")
Text(verbatim: "Channel Name")
.font(fontStyle.font(size: size * 0.45))
.foregroundStyle(.white.opacity(0.6))
.lineLimit(1)

View File

@@ -10,7 +10,7 @@ import SwiftUI
struct RemoteControlSettingsView: View {
var body: some View {
RemoteControlContentView(navigationStyle: .link)
.navigationTitle("Remote Control")
.navigationTitle(String(localized: "remoteControl.title"))
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif

View File

@@ -74,7 +74,7 @@ struct SettingsView: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
}
@@ -184,7 +184,7 @@ struct SettingsView: View {
Section {
VStack(spacing: 4) {
Text("Yattee")
Text(verbatim: "Yattee")
.font(.headline)
Text("\(appVersion) (\(buildNumber))")
.font(.subheadline)
@@ -205,7 +205,7 @@ struct SettingsView: View {
Button(role: .cancel) {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
Label(String(localized: "common.close"), systemImage: "xmark")
.labelStyle(.iconOnly)
}
.accessibilityIdentifier("settings.doneButton")

View File

@@ -51,7 +51,7 @@ struct SubtitlesSettingsView: View {
// tvOS uses Picker instead of Slider (Slider unavailable)
Picker(String(localized: "settings.subtitles.fontSize"), selection: $settings.fontSize) {
ForEach([20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100], id: \.self) { size in
Text("\(size) pt").tag(size)
Text("settings.subtitles.fontSize \(size)").tag(size)
}
}
.onChange(of: settings.fontSize) { _, _ in saveSettings() }
@@ -73,7 +73,7 @@ struct SubtitlesSettingsView: View {
.frame(width: 60)
.multilineTextAlignment(.center)
.onChange(of: settings.fontSize) { _, _ in saveSettings() }
Text("pt")
Text(String(localized: "common.unit.points"))
.foregroundStyle(.secondary)
}
}

View File

@@ -267,7 +267,7 @@ struct iCloudSettingsView: View {
Section {
// iCloud Account Status
HStack {
Label("Account", systemImage: "person.crop.circle")
Label(String(localized: "settings.icloud.account"), systemImage: "person.crop.circle")
Spacer()
HStack(spacing: 6) {
accountStatusIcon
@@ -278,7 +278,7 @@ struct iCloudSettingsView: View {
// Sync Status
HStack {
Label("Status", systemImage: "arrow.triangle.2.circlepath")
Label(String(localized: "settings.icloud.status"), systemImage: "arrow.triangle.2.circlepath")
Spacer()
HStack(spacing: 6) {
syncStatusIcon
@@ -290,9 +290,9 @@ struct iCloudSettingsView: View {
// Pending Changes (if any)
if let count = cloudKitSync?.pendingChangesCount, count > 0 {
HStack {
Label("Pending", systemImage: "clock")
Label(String(localized: "settings.icloud.pending"), systemImage: "clock")
Spacer()
Text("\(count) item\(count == 1 ? "" : "s")")
Text(verbatim: "\(count) item\(count == 1 ? "" : "s")")
.foregroundStyle(.secondary)
}
}
@@ -300,7 +300,7 @@ struct iCloudSettingsView: View {
// Last Sync (automatic)
if let lastSync = cloudKitSync?.lastSyncDate {
HStack {
Label("Last Synced", systemImage: "checkmark.circle")
Label(String(localized: "settings.icloud.lastSynced"), systemImage: "checkmark.circle")
Spacer()
Text(lastSync, style: .relative)
.foregroundStyle(.secondary)
@@ -338,13 +338,13 @@ struct iCloudSettingsView: View {
Button {
syncNow()
} label: {
Label("Sync Now", systemImage: syncNowIcon)
Label(String(localized: "settings.icloud.syncNow"), systemImage: syncNowIcon)
}
.disabled(cloudKitSync?.isSyncing == true)
} footer: {
if let lastSync = lastManualSyncRelative {
Text("Last manual sync: \(lastSync)")
Text(String(localized: "settings.icloud.lastManualSync \(lastSync)"))
}
}
.animation(.easeInOut(duration: 0.3), value: cloudKitSync?.syncStatus)
@@ -423,7 +423,7 @@ struct iCloudSettingsView: View {
HStack {
Image(systemName: "exclamationmark.circle.fill")
.foregroundStyle(.red)
Text("Sync Error")
Text(String(localized: "settings.icloud.syncError"))
.foregroundStyle(.primary)
Spacer()
Image(systemName: expandedError ? "chevron.up" : "chevron.down")
@@ -446,7 +446,7 @@ struct iCloudSettingsView: View {
await cloudKitSync?.sync()
}
} label: {
Label("Retry Sync", systemImage: "arrow.clockwise")
Label(String(localized: "settings.icloud.retrySync"), systemImage: "arrow.clockwise")
.font(.caption)
}
.buttonStyle(.bordered)