Sprinkle in some localization (IOS-103)
This commit is contained in:
parent
6b2fe91112
commit
9b422a95ac
|
@ -101,8 +101,9 @@
|
|||
"title": "Translate from %s",
|
||||
"unknown_language": "Unknown"
|
||||
},
|
||||
"edit_post": "Edit"
|
||||
|
||||
"edit_post": "Edit",
|
||||
"bookmark": "Bookmark"
|
||||
"remove_bookmark": "Remove Bookmark",
|
||||
},
|
||||
"tabs": {
|
||||
"home": "Home",
|
||||
|
|
|
@ -112,6 +112,8 @@ public enum L10n {
|
|||
public static func blockDomain(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "Common.Controls.Actions.BlockDomain", String(describing: p1), fallback: "Block %@")
|
||||
}
|
||||
/// Bookmark
|
||||
public static let bookmark = L10n.tr("Localizable", "Common.Controls.Actions.Bookmark", fallback: "Bookmark")
|
||||
/// Cancel
|
||||
public static let cancel = L10n.tr("Localizable", "Common.Controls.Actions.Cancel", fallback: "Cancel")
|
||||
/// Compose
|
||||
|
@ -154,6 +156,8 @@ public enum L10n {
|
|||
public static let previous = L10n.tr("Localizable", "Common.Controls.Actions.Previous", fallback: "Previous")
|
||||
/// Remove
|
||||
public static let remove = L10n.tr("Localizable", "Common.Controls.Actions.Remove", fallback: "Remove")
|
||||
/// Remove Bookmark
|
||||
public static let removeBookmark = L10n.tr("Localizable", "Common.Controls.Actions.RemoveBookmark", fallback: "Remove Bookmark")
|
||||
/// Reply
|
||||
public static let reply = L10n.tr("Localizable", "Common.Controls.Actions.Reply", fallback: "Reply")
|
||||
/// Report %@
|
||||
|
|
|
@ -40,6 +40,8 @@ Please check your internet connection.";
|
|||
"Common.Controls.Actions.Discard" = "Discard";
|
||||
"Common.Controls.Actions.Done" = "Done";
|
||||
"Common.Controls.Actions.Edit" = "Edit";
|
||||
"Common.Controls.Actions.Bookmark" = "Bookmark";
|
||||
"Common.Controls.Actions.RemoveBookmark" = "Remove Bookmark";
|
||||
"Common.Controls.Actions.EditPost" = "Edit";
|
||||
"Common.Controls.Actions.FindPeople" = "Find people to follow";
|
||||
"Common.Controls.Actions.ManuallySearch" = "Manually search instead";
|
||||
|
|
|
@ -214,14 +214,14 @@ extension StatusAuthorView {
|
|||
|
||||
extension StatusAuthorView {
|
||||
@objc private func authorAvatarButtonDidPressed(_ sender: UIButton) {
|
||||
logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)")
|
||||
guard let statusView = statusView else { return }
|
||||
|
||||
statusView.delegate?.statusView(statusView, authorAvatarButtonDidPressed: avatarButton)
|
||||
}
|
||||
|
||||
@objc private func contentSensitiveeToggleButtonDidPressed(_ sender: UIButton) {
|
||||
logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)")
|
||||
guard let statusView = statusView else { return }
|
||||
|
||||
statusView.delegate?.statusView(statusView, contentSensitiveeToggleButtonDidPressed: sender)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,10 +120,10 @@ extension MastodonMenu {
|
|||
let title: String
|
||||
let image: UIImage?
|
||||
if context.isBookmarking {
|
||||
title = "Remove Bookmark" // TODO: i18n
|
||||
title = L10n.Common.Controls.Actions.removeBookmark
|
||||
image = UIImage(systemName: "bookmark.slash.fill")
|
||||
} else {
|
||||
title = "Bookmark" // TODO: i18n
|
||||
title = L10n.Common.Controls.Actions.bookmark
|
||||
image = UIImage(systemName: "bookmark")
|
||||
}
|
||||
let action = LabeledAction(title: title, image: image) { [weak delegate] in
|
||||
|
@ -133,7 +133,7 @@ extension MastodonMenu {
|
|||
return action
|
||||
case .shareStatus:
|
||||
let action = LabeledAction(
|
||||
title: "Share", // TODO: i18n
|
||||
title: L10n.Common.Controls.Actions.sharePost,
|
||||
image: UIImage(systemName: "square.and.arrow.up")
|
||||
) { [weak delegate] in
|
||||
guard let delegate = delegate else { return }
|
||||
|
|
Loading…
Reference in New Issue