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