mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-26 13:29:31 -04:00
Fixlint
This commit is contained in:
parent
aad7a8b423
commit
05384c581f
@ -71,8 +71,13 @@ final class CompactViewController: UIHostingController<AnyView>, UISearchControl
|
||||
func willPresentSearchController(_ searchController: UISearchController) {
|
||||
navigationController?.setToolbarHidden(true, animated: true)
|
||||
navigationItem.setRightBarButton(
|
||||
UIBarButtonItem(title: "common.button.cancel".localized, style: .done, target: self, action: #selector(onSearchCancelled))
|
||||
, animated: true
|
||||
UIBarButtonItem(
|
||||
title: "common.button.cancel".localized,
|
||||
style: .done,
|
||||
target: self,
|
||||
action: #selector(onSearchCancelled)
|
||||
),
|
||||
animated: true
|
||||
)
|
||||
}
|
||||
@objc func onSearchCancelled() {
|
||||
|
@ -11,15 +11,33 @@ import Foundation
|
||||
extension String {
|
||||
|
||||
var localized: String {
|
||||
return NSLocalizedString(self, tableName: nil, bundle: DefaultLanguages.currentBundle, value: "", comment: "")
|
||||
NSLocalizedString(
|
||||
self,
|
||||
tableName: nil,
|
||||
bundle: DefaultLanguages.currentBundle,
|
||||
value: "",
|
||||
comment: ""
|
||||
)
|
||||
}
|
||||
|
||||
func localized(withComment: String) -> String {
|
||||
return NSLocalizedString(self, tableName: nil, bundle: DefaultLanguages.currentBundle, value: "", comment: withComment)
|
||||
return NSLocalizedString(
|
||||
self,
|
||||
tableName: nil,
|
||||
bundle: DefaultLanguages.currentBundle,
|
||||
value: "",
|
||||
comment: withComment
|
||||
)
|
||||
}
|
||||
|
||||
func localizedWithFormat(withArgs: CVarArg...) -> String {
|
||||
let format = NSLocalizedString(self, tableName: nil, bundle: DefaultLanguages.currentBundle, value: "", comment: "")
|
||||
let format = NSLocalizedString(
|
||||
self,
|
||||
tableName: nil,
|
||||
bundle: DefaultLanguages.currentBundle,
|
||||
value: "",
|
||||
comment: ""
|
||||
)
|
||||
|
||||
switch withArgs.count {
|
||||
case 1: return String.localizedStringWithFormat(format, withArgs[0])
|
||||
@ -27,5 +45,4 @@ extension String {
|
||||
default: return String.localizedStringWithFormat(format, withArgs)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user