From 2dd5ad49c5b70471dd17045a7bea6f49d97ef9d9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 23 Feb 2026 13:31:30 -0800 Subject: feat: localize accessibility fallback and value strings --- Sora/Views/FavoritesView.swift | 4 ++-- Sora/Views/Post/Grid/PostGridView.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Sora') diff --git a/Sora/Views/FavoritesView.swift b/Sora/Views/FavoritesView.swift index 3f12639..7aa6841 100644 --- a/Sora/Views/FavoritesView.swift +++ b/Sora/Views/FavoritesView.swift @@ -660,14 +660,14 @@ struct FavoritesView: View { // swiftlint:disable:this type_body_length .joined(separator: ", ") if tagSummary.isEmpty { - return "Favorite post \(favorite.postId)" + return String(localized: "Favorite post \(favorite.postId)") } return tagSummary } private func favoriteAccessibilityValue(for favorite: SettingsFavoritePost) -> String { - "Rating \(favorite.rating.rawValue.uppercased()). Provider \(favorite.provider.rawValue)." + String(localized: "Rating \(favorite.rating.rawValue). Provider \(favorite.provider.rawValue).") } } diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 37c207e..23f7c00 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -549,14 +549,14 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length .joined(separator: ", ") if tagSummary.isEmpty { - return "Post \(post.id)" + return String(localized: "Post \(post.id)") } return tagSummary } private func postAccessibilityValue(for post: BooruPost) -> String { - "Rating \(post.rating.rawValue.uppercased()). Score \(post.score)." + String(localized: "Rating \(post.rating.rawValue). Score \(post.score).") } // MARK: - Local Search Methods -- cgit v1.2.3