mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 15:40:37 +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,20 +51,20 @@ struct QuickLookPreview: UIViewControllerRepresentable {
|
||||||
|
|
||||||
class AppQLPreviewController: QLPreviewController {
|
class AppQLPreviewController: QLPreviewController {
|
||||||
private var closeButton: UIBarButtonItem {
|
private var closeButton: UIBarButtonItem {
|
||||||
.init(title: "Done", style: .plain, target: self, action: #selector(onCloseButton))
|
.init(
|
||||||
}
|
title: NSLocalizedString("action.done", comment: ""),
|
||||||
|
style: .plain,
|
||||||
override func viewDidLoad() {
|
target: self,
|
||||||
super.viewDidLoad()
|
action: #selector(onCloseButton)
|
||||||
if UIDevice.current.userInterfaceIdiom != .pad {
|
)
|
||||||
navigationItem.rightBarButtonItem = closeButton
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLayoutSubviews() {
|
override func viewDidLayoutSubviews() {
|
||||||
super.viewDidLayoutSubviews()
|
super.viewDidLayoutSubviews()
|
||||||
|
if UIDevice.current.userInterfaceIdiom != .pad {
|
||||||
navigationItem.rightBarButtonItem = closeButton
|
navigationItem.rightBarButtonItem = closeButton
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc private func onCloseButton() {
|
@objc private func onCloseButton() {
|
||||||
dismiss(animated: true)
|
dismiss(animated: true)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<key>NSStringFormatValueTypeKey</key>
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
<string>lld</string>
|
<string>lld</string>
|
||||||
<key>one</key>
|
<key>one</key>
|
||||||
<string>%lld new post</string>
|
<string>%lld nueva publicación</string>
|
||||||
<key>other</key>
|
<key>other</key>
|
||||||
<string>%lld nuevas publicaciones</string>
|
<string>%lld nuevas publicaciones</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
Loading…
Reference in a new issue