Merge c35728c1de5c53b4dcc9a11b666299a7aaa12ade into 9b84b361225facd8e623f25d76f889d3dc54a879

This commit is contained in:
Felix-Ayush 2026-08-11 09:05:57 +02:00 committed by GitHub
commit 4c4a1b9aaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 195 additions and 1 deletions

View File

@ -83910,6 +83910,195 @@
}
}
},
"image_preview.accessibility.image" : {
"comment" : "Accessibility label for the fullscreen image in the media preview viewer",
"extractionState" : "manual",
"localizations" : {
"ar" : {
"stringUnit" : {
"state" : "translated",
"value" : "معاينة الصورة"
}
},
"bn" : {
"stringUnit" : {
"state" : "translated",
"value" : "ছবির প্রিভিউ"
}
},
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Bildvorschau"
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Image preview"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Vista previa de imagen"
}
},
"fa" : {
"stringUnit" : {
"state" : "translated",
"value" : "پیش‌نمایش تصویر"
}
},
"fil" : {
"stringUnit" : {
"state" : "translated",
"value" : "Preview ng larawan"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Aperçu de l'image"
}
},
"he" : {
"stringUnit" : {
"state" : "translated",
"value" : "תצוגה מקדימה של תמונה"
}
},
"hi" : {
"stringUnit" : {
"state" : "translated",
"value" : "छवि पूर्वावलोकन"
}
},
"id" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pratinjau gambar"
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Anteprima immagine"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "画像プレビュー"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "이미지 미리보기"
}
},
"ms" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pratonton imej"
}
},
"ne" : {
"stringUnit" : {
"state" : "translated",
"value" : "छवि पूर्वावलोकन"
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Afbeeldingsvoorbeeld"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Podgląd obrazu"
}
},
"pt" : {
"stringUnit" : {
"state" : "translated",
"value" : "Pré-visualização da imagem"
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Prévia da imagem"
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
"value" : "Просмотр изображения"
}
},
"sv" : {
"stringUnit" : {
"state" : "translated",
"value" : "Bildförhandsvisning"
}
},
"ta" : {
"stringUnit" : {
"state" : "translated",
"value" : "பட முன்நோக்கு"
}
},
"th" : {
"stringUnit" : {
"state" : "translated",
"value" : "ดูตัวอย่างรูปภาพ"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Görsel önizleme"
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
"value" : "Попередній перегляд зображення"
}
},
"ur" : {
"stringUnit" : {
"state" : "translated",
"value" : "تصویر کا پیش نظارہ"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
"value" : "Xem trước hình ảnh"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "图片预览"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "圖片預覽"
}
}
}
},
"save" : {
"comment" : "Button to save media to device",
"localizations" : {

View File

@ -33,16 +33,19 @@ struct ImagePreviewView: View {
.resizable()
.aspectRatio(contentMode: .fit)
.padding()
.accessibilityLabel(Text("image_preview.accessibility.image"))
#else
Image(nsImage: image)
.resizable()
.aspectRatio(contentMode: .fit)
.padding()
.accessibilityLabel(Text("image_preview.accessibility.image"))
#endif
} else {
ProgressView()
.progressViewStyle(.circular)
.tint(.white)
.accessibilityLabel(Text("image_preview.accessibility.image"))
}
Spacer()
HStack {
@ -96,7 +99,9 @@ struct ImagePreviewView: View {
let panel = NSSavePanel()
panel.canCreateDirectories = true
panel.nameFieldStringValue = url.lastPathComponent
panel.prompt = "save"
// SwiftUI Text("save") resolves via the catalog; NSSavePanel.prompt
// is a plain String and must be localized explicitly.
panel.prompt = String(localized: "save", defaultValue: "save", comment: "Button to save media to device")
if panel.runModal() == .OK, let destination = panel.url {
do {
if FileManager.default.fileExists(atPath: destination.path) {