[WIP] Plural Localization for banner-subtitle (IOS-241)

Caveat: doesn't work yet 🤡
This commit is contained in:
Nathan Mattes 2024-07-23 17:37:32 +02:00
parent ffc80268c5
commit 287587fcf1
5 changed files with 1798 additions and 1744 deletions

File diff suppressed because it is too large Load Diff

View File

@ -85,6 +85,6 @@ class NotificationFilteringBannerTableViewCell: UITableViewCell {
} }
func configure(with policy: Mastodon.Entity.NotificationPolicy) { func configure(with policy: Mastodon.Entity.NotificationPolicy) {
subtitleLabel.text = "\(policy.summary.pendingRequestsCount) people you may know" subtitleLabel.text = L10n.Plural.FilteredNotificationBanner.subtitle(policy.summary.pendingRequestsCount)
} }
} }

View File

@ -1982,6 +1982,12 @@ public enum L10n {
} }
} }
} }
public enum FilteredNotificationBanner {
/// Plural format key: "%#@number_of_requests@"
public static func subtitle(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.filtered_notification_banner.subtitle", p1, fallback: "Plural format key: \"%#@number_of_requests@\"")
}
}
} }
} }
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length // swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length