Merge pull request #205 from tootsuite/fix/plural-i18n

Fix i18n string plural issue
This commit is contained in:
CMK 2021-07-06 15:01:28 +08:00 committed by GitHub
commit fea3638669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 334 additions and 141 deletions

View File

@ -129,14 +129,6 @@
"media_content_warning": "Tap anywhere to reveal",
"poll": {
"vote": "Vote",
"vote_count": {
"single": "%d vote",
"multiple": "%d votes"
},
"voter_count": {
"single": "%d voter",
"multiple": "%d voters"
},
"time_left": "%s left",
"closed": "Closed"
},
@ -200,12 +192,6 @@
"count_favorites": "%s favorites"
}
}
},
"countable": {
"photo": {
"single": "photo",
"multiple": "photos"
}
}
},
"scene": {
@ -386,8 +372,6 @@
"direct": "Only people I mention"
},
"auto_complete": {
"single_people_talking": "%ld people talking",
"multiple_people_talking": "%ld people talking",
"space_to_add": "Space to add"
},
"accessibility": {
@ -411,7 +395,6 @@
}
},
"profile": {
"subtitle": "%s posts",
"dashboard": {
"posts": "posts",
"following": "following",
@ -499,15 +482,7 @@
},
"thread": {
"back_title": "Post",
"title": "Post from %s",
"reblog": {
"single": "%s reblog",
"multiple": "%s reblogs"
},
"favorite": {
"single": "%s favorite",
"multiple": "%s favorites"
}
"title": "Post from %s"
},
"settings": {
"title": "Settings",

View File

@ -242,6 +242,7 @@
DB427DED25BAA00100D1B89D /* MastodonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB427DEC25BAA00100D1B89D /* MastodonTests.swift */; };
DB427DF825BAA00100D1B89D /* MastodonUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB427DF725BAA00100D1B89D /* MastodonUITests.swift */; };
DB44384F25E8C1FA008912A2 /* CALayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB44384E25E8C1FA008912A2 /* CALayer.swift */; };
DB443CD22694326A00159B29 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DB443CD0269415D200159B29 /* Localizable.stringsdict */; };
DB44767B260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */; };
DB447681260B3ED600B66B82 /* CustomEmojiPickerSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB447680260B3ED600B66B82 /* CustomEmojiPickerSection.swift */; };
DB44768B260B3F2100B66B82 /* CustomEmojiPickerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB44768A260B3F2100B66B82 /* CustomEmojiPickerItem.swift */; };
@ -875,6 +876,8 @@
DB427DF725BAA00100D1B89D /* MastodonUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MastodonUITests.swift; sourceTree = "<group>"; };
DB427DF925BAA00100D1B89D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DB44384E25E8C1FA008912A2 /* CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CALayer.swift; sourceTree = "<group>"; };
DB443CCF269415D200159B29 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
DB443CD1269415D800159B29 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerInputView.swift; sourceTree = "<group>"; };
DB447680260B3ED600B66B82 /* CustomEmojiPickerSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerSection.swift; sourceTree = "<group>"; };
DB44768A260B3F2100B66B82 /* CustomEmojiPickerItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerItem.swift; sourceTree = "<group>"; };
@ -1831,6 +1834,7 @@
164F0EBB267D4FE400249499 /* BoopSound.caf */,
DB427DDE25BAA00100D1B89D /* Assets.xcassets */,
DB118A8125E4B6E600FAB162 /* Preview Assets.xcassets */,
DB443CD0269415D200159B29 /* Localizable.stringsdict */,
DB3D100F25BAA75E00EAA174 /* Localizable.strings */,
DB2B3ABE25E37E15007045F9 /* InfoPlist.strings */,
);
@ -2933,6 +2937,7 @@
files = (
164F0EBC267D4FE400249499 /* BoopSound.caf in Resources */,
DB427DE225BAA00100D1B89D /* LaunchScreen.storyboard in Resources */,
DB443CD22694326A00159B29 /* Localizable.stringsdict in Resources */,
DB3D100D25BAA75E00EAA174 /* Localizable.strings in Resources */,
DB427DDF25BAA00100D1B89D /* Assets.xcassets in Resources */,
DB427DDD25BAA00100D1B89D /* Main.storyboard in Resources */,
@ -3749,6 +3754,16 @@
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
DB443CD0269415D200159B29 /* Localizable.stringsdict */ = {
isa = PBXVariantGroup;
children = (
DB443CCF269415D200159B29 /* en */,
DB443CD1269415D800159B29 /* ar */,
);
name = Localizable.stringsdict;
path = /Users/mainasuk/Developer/Mastodon/Mastodon/Resources;
sourceTree = "<absolute>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */

View File

@ -55,11 +55,7 @@ extension AutoCompleteSection {
.prefix(2)
.compactMap { Int($0.accounts) }
.reduce(0, +)
if count > 1 {
return L10n.Scene.Compose.AutoComplete.multiplePeopleTalking(count)
} else {
return L10n.Scene.Compose.AutoComplete.singlePeopleTalking(count)
}
return L10n.Plural.peopleTalking(count)
}()
cell.avatarImageView.isHidden = true
}

View File

@ -479,21 +479,13 @@ extension StatusSection {
cell.threadMetaView.dateLabel.accessibilityLabel = DateFormatter.localizedString(from: status.createdAt, dateStyle: .medium, timeStyle: .short)
let reblogCountTitle: String = {
let count = status.reblogsCount.intValue
if count > 1 {
return L10n.Scene.Thread.Reblog.multiple(String(count))
} else {
return L10n.Scene.Thread.Reblog.single(String(count))
}
return L10n.Plural.Count.reblog(count)
}()
cell.threadMetaView.reblogButton.setTitle(reblogCountTitle, for: .normal)
let favoriteCountTitle: String = {
let count = status.favouritesCount.intValue
if count > 1 {
return L10n.Scene.Thread.Favorite.multiple(String(count))
} else {
return L10n.Scene.Thread.Favorite.single(String(count))
}
return L10n.Plural.Count.favorite(count)
}()
cell.threadMetaView.favoriteButton.setTitle(favoriteCountTitle, for: .normal)
@ -832,18 +824,10 @@ extension StatusSection {
cell.statusView.pollVoteCountLabel.text = {
if poll.multiple {
let count = poll.votersCount?.intValue ?? 0
if count > 1 {
return L10n.Common.Controls.Status.Poll.VoterCount.single(count)
} else {
return L10n.Common.Controls.Status.Poll.VoterCount.multiple(count)
}
return L10n.Plural.Count.voter(count)
} else {
let count = poll.votesCount.intValue
if count > 1 {
return L10n.Common.Controls.Status.Poll.VoteCount.single(count)
} else {
return L10n.Common.Controls.Status.Poll.VoteCount.multiple(count)
}
return L10n.Plural.Count.vote(count)
}
}()
if poll.expired {

View File

@ -299,26 +299,6 @@ internal enum L10n {
}
/// Vote
internal static let vote = L10n.tr("Localizable", "Common.Controls.Status.Poll.Vote")
internal enum VoteCount {
/// %d votes
internal static func multiple(_ p1: Int) -> String {
return L10n.tr("Localizable", "Common.Controls.Status.Poll.VoteCount.Multiple", p1)
}
/// %d vote
internal static func single(_ p1: Int) -> String {
return L10n.tr("Localizable", "Common.Controls.Status.Poll.VoteCount.Single", p1)
}
}
internal enum VoterCount {
/// %d voters
internal static func multiple(_ p1: Int) -> String {
return L10n.tr("Localizable", "Common.Controls.Status.Poll.VoterCount.Multiple", p1)
}
/// %d voter
internal static func single(_ p1: Int) -> String {
return L10n.tr("Localizable", "Common.Controls.Status.Poll.VoterCount.Single", p1)
}
}
}
internal enum Tag {
/// Email
@ -400,14 +380,6 @@ internal enum L10n {
}
}
}
internal enum Countable {
internal enum Photo {
/// photos
internal static let multiple = L10n.tr("Localizable", "Common.Countable.Photo.Multiple")
/// photo
internal static let single = L10n.tr("Localizable", "Common.Countable.Photo.Single")
}
}
}
internal enum Scene {
@ -459,14 +431,6 @@ internal enum L10n {
internal static let video = L10n.tr("Localizable", "Scene.Compose.Attachment.Video")
}
internal enum AutoComplete {
/// %ld people talking
internal static func multiplePeopleTalking(_ p1: Int) -> String {
return L10n.tr("Localizable", "Scene.Compose.AutoComplete.MultiplePeopleTalking", p1)
}
/// %ld people talking
internal static func singlePeopleTalking(_ p1: Int) -> String {
return L10n.tr("Localizable", "Scene.Compose.AutoComplete.SinglePeopleTalking", p1)
}
/// Space to add
internal static let spaceToAdd = L10n.tr("Localizable", "Scene.Compose.AutoComplete.SpaceToAdd")
}
@ -634,10 +598,6 @@ internal enum L10n {
}
}
internal enum Profile {
/// %@ posts
internal static func subtitle(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Profile.Subtitle", String(describing: p1))
}
internal enum Dashboard {
/// followers
internal static let followers = L10n.tr("Localizable", "Scene.Profile.Dashboard.Followers")
@ -1026,32 +986,43 @@ internal enum L10n {
internal static func title(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Thread.Title", String(describing: p1))
}
internal enum Favorite {
/// %@ favorites
internal static func multiple(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Thread.Favorite.Multiple", String(describing: p1))
}
/// %@ favorite
internal static func single(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Thread.Favorite.Single", String(describing: p1))
}
}
internal enum Reblog {
/// %@ reblogs
internal static func multiple(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Thread.Reblog.Multiple", String(describing: p1))
}
/// %@ reblog
internal static func single(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Thread.Reblog.Single", String(describing: p1))
}
}
}
internal enum Welcome {
/// Social networking\nback in your hands.
internal static let slogan = L10n.tr("Localizable", "Scene.Welcome.Slogan")
}
}
internal enum Plural {
/// Plural format key: "%#@count_people_talking@"
internal static func peopleTalking(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.people_talking", p1)
}
internal enum Count {
/// Plural format key: "%#@favorite_count@"
internal static func favorite(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.count.favorite", p1)
}
/// Plural format key: "%#@reblog_count@"
internal static func reblog(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.count.reblog", p1)
}
/// Plural format key: "%#@vote_count@"
internal static func vote(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.count.vote", p1)
}
/// Plural format key: "%#@voter_count@"
internal static func voter(_ p1: Int) -> String {
return L10n.tr("Localizable", "plural.count.voter", p1)
}
internal enum MetricFormatted {
/// Plural format key: "%@ %#@post_count@"
internal static func post(_ p1: Any, _ p2: Int) -> String {
return L10n.tr("Localizable", "plural.count.metric_formatted.post", String(describing: p1), p2)
}
}
}
}
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces

View File

@ -101,10 +101,6 @@ Please check your internet connection.";
"Common.Controls.Status.Poll.Closed" = "Closed";
"Common.Controls.Status.Poll.TimeLeft" = "%@ left";
"Common.Controls.Status.Poll.Vote" = "Vote";
"Common.Controls.Status.Poll.VoteCount.Multiple" = "%d votes";
"Common.Controls.Status.Poll.VoteCount.Single" = "%d vote";
"Common.Controls.Status.Poll.VoterCount.Multiple" = "%d voters";
"Common.Controls.Status.Poll.VoterCount.Single" = "%d voter";
"Common.Controls.Status.ShowPost" = "Show Post";
"Common.Controls.Status.ShowUserProfile" = "Show user profile";
"Common.Controls.Status.Tag.Email" = "Email";
@ -140,8 +136,6 @@ Your account looks like this to them.";
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
"Common.Controls.Timeline.Timestamp.Now" = "Now";
"Common.Controls.Timeline.Timestamp.TimeAgo" = "%@ ago";
"Common.Countable.Photo.Multiple" = "photos";
"Common.Countable.Photo.Single" = "photo";
"Scene.Compose.Accessibility.AppendAttachment" = "Append attachment";
"Scene.Compose.Accessibility.AppendPoll" = "Append poll";
"Scene.Compose.Accessibility.CustomEmojiPicker" = "Custom emoji picker";
@ -157,8 +151,6 @@ uploaded to Mastodon.";
"Scene.Compose.Attachment.DescriptionVideo" = "Describe whats happening for low vision people...";
"Scene.Compose.Attachment.Photo" = "photo";
"Scene.Compose.Attachment.Video" = "video";
"Scene.Compose.AutoComplete.MultiplePeopleTalking" = "%ld people talking";
"Scene.Compose.AutoComplete.SinglePeopleTalking" = "%ld people talking";
"Scene.Compose.AutoComplete.SpaceToAdd" = "Space to add";
"Scene.Compose.ComposeAction" = "Publish";
"Scene.Compose.ContentInputPlaceholder" = "Type or paste whats on your mind";
@ -235,7 +227,6 @@ tap the link to confirm your account.";
"Scene.Profile.SegmentedControl.Media" = "Media";
"Scene.Profile.SegmentedControl.Posts" = "Posts";
"Scene.Profile.SegmentedControl.Replies" = "Replies";
"Scene.Profile.Subtitle" = "%@ posts";
"Scene.PublicTimeline.Title" = "Public";
"Scene.Register.Error.Item.Agreement" = "Agreement";
"Scene.Register.Error.Item.Email" = "Email";
@ -345,10 +336,6 @@ any server.";
"Scene.SuggestionAccount.FollowExplain" = "When you follow someone, youll see their posts in your home feed.";
"Scene.SuggestionAccount.Title" = "Find People to Follow";
"Scene.Thread.BackTitle" = "Post";
"Scene.Thread.Favorite.Multiple" = "%@ favorites";
"Scene.Thread.Favorite.Single" = "%@ favorite";
"Scene.Thread.Reblog.Multiple" = "%@ reblogs";
"Scene.Thread.Reblog.Single" = "%@ reblog";
"Scene.Thread.Title" = "Post from %@";
"Scene.Welcome.Slogan" = "Social networking
back in your hands.";

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>plural.count.metric_formatted.post</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%@ %#@post_count@</string>
<key>post_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>posts</string>
<key>one</key>
<string>post</string>
<key>few</key>
<string>posts</string>
<key>many</key>
<string>posts</string>
<key>other</key>
<string>posts</string>
</dict>
</dict>
<key>plural.count.favorite</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@favorite_count@</string>
<key>favorite_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 favorites</string>
<key>one</key>
<string>1 favorite</string>
<key>few</key>
<string>%ld favorites</string>
<key>many</key>
<string>%ld favorites</string>
<key>other</key>
<string>%ld favorites</string>
</dict>
</dict>
<key>plural.count.reblog</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@reblog_count@</string>
<key>reblog_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 reblogs</string>
<key>one</key>
<string>1 reblog</string>
<key>few</key>
<string>%ld reblogs</string>
<key>many</key>
<string>%ld reblogs</string>
<key>other</key>
<string>%ld reblogs</string>
</dict>
</dict>
<key>plural.count.vote</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@vote_count@</string>
<key>vote_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 votes</string>
<key>one</key>
<string>1 vote</string>
<key>few</key>
<string>%ld votes</string>
<key>many</key>
<string>%ld votes</string>
<key>other</key>
<string>%ld votes</string>
</dict>
</dict>
<key>plural.count.voter</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@voter_count@</string>
<key>voter_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 voters</string>
<key>one</key>
<string>1 voter</string>
<key>few</key>
<string>%ld voters</string>
<key>many</key>
<string>%ld voters</string>
<key>other</key>
<string>%ld voters</string>
</dict>
</dict>
<key>plural.people_talking</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@count_people_talking@</string>
<key>count_people_talking</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 people talking</string>
<key>one</key>
<string>1 people talking</string>
<key>few</key>
<string>%ld people talking</string>
<key>many</key>
<string>%ld people talking</string>
<key>other</key>
<string>%ld people talking</string>
</dict>
</dict>
</dict>
</plist>

View File

@ -101,10 +101,6 @@ Please check your internet connection.";
"Common.Controls.Status.Poll.Closed" = "Closed";
"Common.Controls.Status.Poll.TimeLeft" = "%@ left";
"Common.Controls.Status.Poll.Vote" = "Vote";
"Common.Controls.Status.Poll.VoteCount.Multiple" = "%d votes";
"Common.Controls.Status.Poll.VoteCount.Single" = "%d vote";
"Common.Controls.Status.Poll.VoterCount.Multiple" = "%d voters";
"Common.Controls.Status.Poll.VoterCount.Single" = "%d voter";
"Common.Controls.Status.ShowPost" = "Show Post";
"Common.Controls.Status.ShowUserProfile" = "Show user profile";
"Common.Controls.Status.Tag.Email" = "Email";
@ -140,8 +136,6 @@ Your account looks like this to them.";
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
"Common.Controls.Timeline.Timestamp.Now" = "Now";
"Common.Controls.Timeline.Timestamp.TimeAgo" = "%@ ago";
"Common.Countable.Photo.Multiple" = "photos";
"Common.Countable.Photo.Single" = "photo";
"Scene.Compose.Accessibility.AppendAttachment" = "Append attachment";
"Scene.Compose.Accessibility.AppendPoll" = "Append poll";
"Scene.Compose.Accessibility.CustomEmojiPicker" = "Custom emoji picker";
@ -157,8 +151,6 @@ uploaded to Mastodon.";
"Scene.Compose.Attachment.DescriptionVideo" = "Describe whats happening for low vision people...";
"Scene.Compose.Attachment.Photo" = "photo";
"Scene.Compose.Attachment.Video" = "video";
"Scene.Compose.AutoComplete.MultiplePeopleTalking" = "%ld people talking";
"Scene.Compose.AutoComplete.SinglePeopleTalking" = "%ld people talking";
"Scene.Compose.AutoComplete.SpaceToAdd" = "Space to add";
"Scene.Compose.ComposeAction" = "Publish";
"Scene.Compose.ContentInputPlaceholder" = "Type or paste whats on your mind";
@ -235,7 +227,6 @@ tap the link to confirm your account.";
"Scene.Profile.SegmentedControl.Media" = "Media";
"Scene.Profile.SegmentedControl.Posts" = "Posts";
"Scene.Profile.SegmentedControl.Replies" = "Replies";
"Scene.Profile.Subtitle" = "%@ posts";
"Scene.PublicTimeline.Title" = "Public";
"Scene.Register.Error.Item.Agreement" = "Agreement";
"Scene.Register.Error.Item.Email" = "Email";
@ -345,10 +336,6 @@ any server.";
"Scene.SuggestionAccount.FollowExplain" = "When you follow someone, youll see their posts in your home feed.";
"Scene.SuggestionAccount.Title" = "Find People to Follow";
"Scene.Thread.BackTitle" = "Post";
"Scene.Thread.Favorite.Multiple" = "%@ favorites";
"Scene.Thread.Favorite.Single" = "%@ favorite";
"Scene.Thread.Reblog.Multiple" = "%@ reblogs";
"Scene.Thread.Reblog.Single" = "%@ reblog";
"Scene.Thread.Title" = "Post from %@";
"Scene.Welcome.Slogan" = "Social networking
back in your hands.";

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>plural.count.metric_formatted.post</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%@ %#@post_count@</string>
<key>post_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>posts</string>
<key>one</key>
<string>post</string>
<key>few</key>
<string>posts</string>
<key>many</key>
<string>posts</string>
<key>other</key>
<string>posts</string>
</dict>
</dict>
<key>plural.count.favorite</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@favorite_count@</string>
<key>favorite_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 favorites</string>
<key>one</key>
<string>1 favorite</string>
<key>few</key>
<string>%ld favorites</string>
<key>many</key>
<string>%ld favorites</string>
<key>other</key>
<string>%ld favorites</string>
</dict>
</dict>
<key>plural.count.reblog</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@reblog_count@</string>
<key>reblog_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 reblogs</string>
<key>one</key>
<string>1 reblog</string>
<key>few</key>
<string>%ld reblogs</string>
<key>many</key>
<string>%ld reblogs</string>
<key>other</key>
<string>%ld reblogs</string>
</dict>
</dict>
<key>plural.count.vote</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@vote_count@</string>
<key>vote_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 votes</string>
<key>one</key>
<string>1 vote</string>
<key>few</key>
<string>%ld votes</string>
<key>many</key>
<string>%ld votes</string>
<key>other</key>
<string>%ld votes</string>
</dict>
</dict>
<key>plural.count.voter</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@voter_count@</string>
<key>voter_count</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 voters</string>
<key>one</key>
<string>1 voter</string>
<key>few</key>
<string>%ld voters</string>
<key>many</key>
<string>%ld voters</string>
<key>other</key>
<string>%ld voters</string>
</dict>
</dict>
<key>plural.people_talking</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@count_people_talking@</string>
<key>count_people_talking</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>0 people talking</string>
<key>one</key>
<string>1 people talking</string>
<key>few</key>
<string>%ld people talking</string>
<key>many</key>
<string>%ld people talking</string>
<key>other</key>
<string>%ld people talking</string>
</dict>
</dict>
</dict>
</plist>

View File

@ -322,7 +322,7 @@ extension ProfileViewController {
self.titleView.isHidden = true
return
}
let subtitle = L10n.Scene.Profile.subtitle(formattedStatusCount)
let subtitle = L10n.Plural.Count.MetricFormatted.post(formattedStatusCount, statusesCount)
self.titleView.update(title: title, subtitle: subtitle, emojiDict: emojiDict)
self.titleView.isHidden = false
}

View File

@ -165,7 +165,7 @@ final class StatusView: UIView {
let label = UILabel()
label.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 12, weight: .regular))
label.textColor = Asset.Colors.Label.secondary.color
label.text = L10n.Common.Controls.Status.Poll.VoteCount.single(0)
label.text = L10n.Plural.Count.vote(0)
return label
}()
let pollStatusDotLabel: UILabel = {

View File

@ -1,5 +1,7 @@
strings:
inputs: Mastodon/Resources/en.lproj/Localizable.strings
inputs:
- Mastodon/Resources/en.lproj/Localizable.strings
- Mastodon/Resources/en.lproj/Localizable.stringsdict
outputs:
- templateName: structured-swift5
output: Mastodon/Generated/Strings.swift
@ -7,4 +9,4 @@ xcassets:
inputs: Mastodon/Resources/Assets.xcassets
outputs:
templateName: swift5
output: Mastodon/Generated/Assets.swift
output: Mastodon/Generated/Assets.swift