diff --git a/Localization/app.json b/Localization/app.json index a9eede0d..0e34ed2d 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -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", diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 67f158fa..eed7f260 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -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 = ""; }; DB427DF925BAA00100D1B89D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DB44384E25E8C1FA008912A2 /* CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CALayer.swift; sourceTree = ""; }; + DB443CCF269415D200159B29 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; + DB443CD1269415D800159B29 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = ""; }; DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerInputView.swift; sourceTree = ""; }; DB447680260B3ED600B66B82 /* CustomEmojiPickerSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerSection.swift; sourceTree = ""; }; DB44768A260B3F2100B66B82 /* CustomEmojiPickerItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerItem.swift; sourceTree = ""; }; @@ -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 = ""; }; + DB443CD0269415D200159B29 /* Localizable.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + DB443CCF269415D200159B29 /* en */, + DB443CD1269415D800159B29 /* ar */, + ); + name = Localizable.stringsdict; + path = /Users/mainasuk/Developer/Mastodon/Mastodon/Resources; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/Mastodon/Diffiable/Section/AutoCompleteSection.swift b/Mastodon/Diffiable/Section/AutoCompleteSection.swift index 8de32a28..c5e8891a 100644 --- a/Mastodon/Diffiable/Section/AutoCompleteSection.swift +++ b/Mastodon/Diffiable/Section/AutoCompleteSection.swift @@ -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 } diff --git a/Mastodon/Diffiable/Section/StatusSection.swift b/Mastodon/Diffiable/Section/StatusSection.swift index 50e08452..d0d37a45 100644 --- a/Mastodon/Diffiable/Section/StatusSection.swift +++ b/Mastodon/Diffiable/Section/StatusSection.swift @@ -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 { diff --git a/Mastodon/Generated/Strings.swift b/Mastodon/Generated/Strings.swift index e34ec45f..98c633f3 100644 --- a/Mastodon/Generated/Strings.swift +++ b/Mastodon/Generated/Strings.swift @@ -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 diff --git a/Mastodon/Resources/ar.lproj/Localizable.strings b/Mastodon/Resources/ar.lproj/Localizable.strings index 3e239472..819d6304 100644 --- a/Mastodon/Resources/ar.lproj/Localizable.strings +++ b/Mastodon/Resources/ar.lproj/Localizable.strings @@ -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 what’s 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 what’s 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, you’ll 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."; \ No newline at end of file diff --git a/Mastodon/Resources/ar.lproj/Localizable.stringsdict b/Mastodon/Resources/ar.lproj/Localizable.stringsdict new file mode 100644 index 00000000..e9d64796 --- /dev/null +++ b/Mastodon/Resources/ar.lproj/Localizable.stringsdict @@ -0,0 +1,138 @@ + + + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + posts + one + post + few + posts + many + posts + other + posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 favorites + one + 1 favorite + few + %ld favorites + many + %ld favorites + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 reblogs + one + 1 reblog + few + %ld reblogs + many + %ld reblogs + other + %ld reblogs + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 votes + one + 1 vote + few + %ld votes + many + %ld votes + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 voters + one + 1 voter + few + %ld voters + many + %ld voters + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 people talking + one + 1 people talking + few + %ld people talking + many + %ld people talking + other + %ld people talking + + + + diff --git a/Mastodon/Resources/en.lproj/Localizable.strings b/Mastodon/Resources/en.lproj/Localizable.strings index 3e239472..819d6304 100644 --- a/Mastodon/Resources/en.lproj/Localizable.strings +++ b/Mastodon/Resources/en.lproj/Localizable.strings @@ -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 what’s 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 what’s 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, you’ll 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."; \ No newline at end of file diff --git a/Mastodon/Resources/en.lproj/Localizable.stringsdict b/Mastodon/Resources/en.lproj/Localizable.stringsdict new file mode 100644 index 00000000..b002a41c --- /dev/null +++ b/Mastodon/Resources/en.lproj/Localizable.stringsdict @@ -0,0 +1,138 @@ + + + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + posts + one + post + few + posts + many + posts + other + posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 favorites + one + 1 favorite + few + %ld favorites + many + %ld favorites + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 reblogs + one + 1 reblog + few + %ld reblogs + many + %ld reblogs + other + %ld reblogs + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 votes + one + 1 vote + few + %ld votes + many + %ld votes + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 voters + one + 1 voter + few + %ld voters + many + %ld voters + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + 0 people talking + one + 1 people talking + few + %ld people talking + many + %ld people talking + other + %ld people talking + + + + diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index e5104c4c..a1ad3f02 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -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 } diff --git a/Mastodon/Scene/Share/View/Content/StatusView.swift b/Mastodon/Scene/Share/View/Content/StatusView.swift index 64697b59..d813c221 100644 --- a/Mastodon/Scene/Share/View/Content/StatusView.swift +++ b/Mastodon/Scene/Share/View/Content/StatusView.swift @@ -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 = { diff --git a/swiftgen.yml b/swiftgen.yml index e74c5356..e086533f 100644 --- a/swiftgen.yml +++ b/swiftgen.yml @@ -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 \ No newline at end of file + output: Mastodon/Generated/Assets.swift