mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-18 13:16:49 +00:00
Some fixes for spanish localization and double done button on QuickLook preview (#343)
* Fixed spanish location plural for single new post * - Fix for double Done button appearing on iPhone. - Added localized text for "Done" on QuickLook preview navigation bar. Co-authored-by: Roberto Pastor <roberto.pastor@cabify.com>
This commit is contained in:
parent
b68d91044d
commit
204427c1e5
2 changed files with 10 additions and 10 deletions
|
@ -51,19 +51,19 @@ struct QuickLookPreview: UIViewControllerRepresentable {
|
|||
|
||||
class AppQLPreviewController: QLPreviewController {
|
||||
private var closeButton: UIBarButtonItem {
|
||||
.init(title: "Done", style: .plain, target: self, action: #selector(onCloseButton))
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
if UIDevice.current.userInterfaceIdiom != .pad {
|
||||
navigationItem.rightBarButtonItem = closeButton
|
||||
}
|
||||
.init(
|
||||
title: NSLocalizedString("action.done", comment: ""),
|
||||
style: .plain,
|
||||
target: self,
|
||||
action: #selector(onCloseButton)
|
||||
)
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
navigationItem.rightBarButtonItem = closeButton
|
||||
if UIDevice.current.userInterfaceIdiom != .pad {
|
||||
navigationItem.rightBarButtonItem = closeButton
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func onCloseButton() {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>lld</string>
|
||||
<key>one</key>
|
||||
<string>%lld new post</string>
|
||||
<string>%lld nueva publicación</string>
|
||||
<key>other</key>
|
||||
<string>%lld nuevas publicaciones</string>
|
||||
</dict>
|
||||
|
|
Loading…
Reference in a new issue