diff --git a/bitchat/Localizable.xcstrings b/bitchat/Localizable.xcstrings index e498a20e..91ea7821 100644 --- a/bitchat/Localizable.xcstrings +++ b/bitchat/Localizable.xcstrings @@ -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" : { diff --git a/bitchat/Views/Image Viewers/ImagePreviewView.swift b/bitchat/Views/Image Viewers/ImagePreviewView.swift index c7b4fb92..08200ed3 100644 --- a/bitchat/Views/Image Viewers/ImagePreviewView.swift +++ b/bitchat/Views/Image Viewers/ImagePreviewView.swift @@ -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) {