diff --git a/Localization/app.json b/Localization/app.json index 739573267..8a7817d40 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -651,15 +651,17 @@ } }, "searching": { - "segment": { - "all": "All", - "people": "People", - "hashtags": "Hashtags", - "posts": "Posts" - }, + "posts": "Posts with \"%@\"", + "people": "People with \"%@\"", + "profile": "Go to @%@@%@", + "url": "Open Link", "empty_state": { "no_results": "No results" }, + "no_user": { + "title": "No User Account Found", + "message": "There's no Useraccount \"%@\" on %@" + } "recent_search": "Recent searches", "clear": "Clear" } diff --git a/Mastodon/Scene/Search/SearchDetail/Search Results Overview/SearchResultsOverviewTableViewController.swift b/Mastodon/Scene/Search/SearchDetail/Search Results Overview/SearchResultsOverviewTableViewController.swift index ccfd4fc73..a90fb747a 100644 --- a/Mastodon/Scene/Search/SearchDetail/Search Results Overview/SearchResultsOverviewTableViewController.swift +++ b/Mastodon/Scene/Search/SearchDetail/Search Results Overview/SearchResultsOverviewTableViewController.swift @@ -3,6 +3,7 @@ import UIKit import MastodonCore import MastodonSDK +import MastodonLocalization protocol SearchResultsOverviewTableViewControllerDeleagte: AnyObject { func showPeople(_ viewController: UIViewController) @@ -256,8 +257,11 @@ class SearchResultsOverviewTableViewController: UIViewController, NeedsDependenc showProfile(for: account) } else { await MainActor.run { - let alertController = UIAlertController(title: "No User Account", message: "There's no Useraccount \"\(username)\" on \(domain)", preferredStyle: .alert) - let okAction = UIAlertAction(title: "OK", style: .default) + let alertTitle = L10n.Scene.Search.Searching.NoUser.title + let alertMessage = L10n.Scene.Search.Searching.NoUser.message(username, domain) + + let alertController = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: .alert) + let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default) alertController.addAction(okAction) coordinator.present(scene: .alertController(alertController: alertController), transition: .alertController(animated: true)) } diff --git a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift index 9ff595057..4484b6e96 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift +++ b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift @@ -1299,6 +1299,14 @@ public enum L10n { /// No results public static let noResults = L10n.tr("Localizable", "Scene.Search.Searching.EmptyState.NoResults", fallback: "No results") } + public enum NoUser { + /// There's no Useraccount "%@" on %@ + public static func message(_ p1: Any, _ p2: Any) -> String { + return L10n.tr("Localizable", "Scene.Search.Searching.NoUser.Message", String(describing: p1), String(describing: p2), fallback: "There's no Useraccount \"%@\" on %@") + } + /// No User Account Found + public static let title = L10n.tr("Localizable", "Scene.Search.Searching.NoUser.Title", fallback: "No User Account Found") + } } } public enum ServerPicker { diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings index 964d7ba42..0b5102ec0 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings @@ -447,6 +447,10 @@ uploaded to Mastodon."; "Scene.Search.Searching.People" = "People with \"%@\""; "Scene.Search.Searching.Profile" = "Go to @%@@%@"; "Scene.Search.Searching.Url" = "Open Link"; + +"Scene.Search.Searching.NoUser.Title" = "No User Account Found"; +"Scene.Search.Searching.NoUser.Message" = "There's no Useraccount \"%@\" on %@"; + "Scene.Search.Title" = "Search"; "Scene.ServerPicker.Button.Category.Academia" = "academia"; "Scene.ServerPicker.Button.Category.Activism" = "activism";