[WIP] Plural Localization for banner-subtitle (IOS-241)
Caveat: doesn't work yet 🤡
This commit is contained in:
parent
ffc80268c5
commit
287587fcf1
|
@ -649,5 +649,21 @@
|
||||||
<string>%lds ago</string>
|
<string>%lds ago</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>plural.filtered_notification_banner.subtitle</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringLocalizedFormatKey</key>
|
||||||
|
<string>%#@number_of_requests@</string>
|
||||||
|
<key>number_of_requests</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringFormatSpecTypeKey</key>
|
||||||
|
<string>NSStringPluralRuleType</string>
|
||||||
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
|
<string>ld</string>
|
||||||
|
<key>one</key>
|
||||||
|
<string>One person you may know</string>
|
||||||
|
<key>other</key>
|
||||||
|
<string>%ld people you may know</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -649,5 +649,21 @@
|
||||||
<string>%lds ago</string>
|
<string>%lds ago</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>plural.filtered_notification_banner.subtitle</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringLocalizedFormatKey</key>
|
||||||
|
<string>%#@number_of_requests@</string>
|
||||||
|
<key>number_of_requests</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringFormatSpecTypeKey</key>
|
||||||
|
<string>NSStringPluralRuleType</string>
|
||||||
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
|
<string>ld</string>
|
||||||
|
<key>one</key>
|
||||||
|
<string>One person you may know</string>
|
||||||
|
<key>other</key>
|
||||||
|
<string>%ld people you may know</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -649,5 +649,21 @@
|
||||||
<string>%lds ago</string>
|
<string>%lds ago</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>plural.filtered_notification_banner.subtitle</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringLocalizedFormatKey</key>
|
||||||
|
<string>%#@number_of_requests@</string>
|
||||||
|
<key>number_of_requests</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringFormatSpecTypeKey</key>
|
||||||
|
<string>NSStringPluralRuleType</string>
|
||||||
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
|
<string>ld</string>
|
||||||
|
<key>one</key>
|
||||||
|
<string>One person you may know</string>
|
||||||
|
<key>other</key>
|
||||||
|
<string>%ld people you may know</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in New Issue