Localization for Banner (IOS-241)

This commit is contained in:
Nathan Mattes 2024-07-23 16:32:01 +02:00
parent 9e8de739ec
commit ffc80268c5
5 changed files with 13 additions and 3 deletions

View File

@ -753,6 +753,9 @@
"suspend": "Your account has been suspended.",
"learn_more": "Learn More"
},
"filtered_notification_banner": {
"title": "Filtered Notifications"
},
"policy": {
"title": "Filter Notifications from…",
"not_following": {

View File

@ -753,6 +753,9 @@
"suspend": "Your account has been suspended.",
"learn_more": "Learn More"
},
"filtered_notification_banner": {
"title": "Filtered Notifications"
},
"policy": {
"title": "Filter Notifications from…",
"not_following": {

View File

@ -3,6 +3,7 @@
import UIKit
import MastodonSDK
import MastodonUI
import MastodonLocalization
class NotificationFilteringBannerTableViewCell: UITableViewCell {
@ -29,8 +30,7 @@ class NotificationFilteringBannerTableViewCell: UITableViewCell {
iconImageWrapperView.addSubview(iconImageView)
titleLabel = UILabel()
//TODO: Add localization
titleLabel.text = "Filtered Notifications"
titleLabel.text = L10n.Scene.Notification.FilteredNotificationBanner.title
titleLabel.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular))
subtitleLabel = UILabel()
@ -85,7 +85,6 @@ class NotificationFilteringBannerTableViewCell: UITableViewCell {
}
func configure(with policy: Mastodon.Entity.NotificationPolicy) {
//TODO: Add localization
subtitleLabel.text = "\(policy.summary.pendingRequestsCount) people you may know"
}
}

View File

@ -895,6 +895,10 @@ public enum L10n {
}
}
public enum Notification {
public enum FilteredNotificationBanner {
/// Filtered Notifications
public static let title = L10n.tr("Localizable", "Scene.Notification.FilteredNotificationBanner.Title", fallback: "Filtered Notifications")
}
public enum FollowRequest {
/// Accept
public static let accept = L10n.tr("Localizable", "Scene.Notification.FollowRequest.Accept", fallback: "Accept")

View File

@ -316,6 +316,7 @@ uploaded to Mastodon.";
"Scene.Login.ServerSearchField.Placeholder" = "Enter URL or search for your server";
"Scene.Login.Subtitle" = "Log in with the server where you created your account.";
"Scene.Login.Title" = "Welcome Back";
"Scene.Notification.FilteredNotificationBanner.Title" = "Filtered Notifications";
"Scene.Notification.FollowRequest.Accept" = "Accept";
"Scene.Notification.FollowRequest.Accepted" = "Accepted";
"Scene.Notification.FollowRequest.Reject" = "reject";