Add localization to "No such user"-alert (IOS-141)
This commit is contained in:
parent
15436738d5
commit
7abc536d01
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue