forked from shadowfacts/Tusker
Use stringsdict for favorites/reblogs count
This commit is contained in:
parent
2b22180191
commit
eca7f31e82
|
@ -67,9 +67,10 @@ class ConversationMainStatusTableViewCell: BaseStatusTableViewCell {
|
||||||
override func updateStatusState(status: StatusMO) {
|
override func updateStatusState(status: StatusMO) {
|
||||||
super.updateStatusState(status: status)
|
super.updateStatusState(status: status)
|
||||||
|
|
||||||
// todo: localize me
|
let favoritesFormat = NSLocalizedString("favorites count", comment: "conv main status favorites button label")
|
||||||
totalFavoritesButton.setTitle("\(status.favouritesCount) Favorite\(status.favouritesCount == 1 ? "" : "s")", for: .normal)
|
totalFavoritesButton.setTitle(String.localizedStringWithFormat(favoritesFormat, status.favouritesCount), for: .normal)
|
||||||
totalReblogsButton.setTitle("\(status.reblogsCount) Reblog\(status.reblogsCount == 1 ? "" : "s")", for: .normal)
|
let reblogsFormat = NSLocalizedString("reblogs count", comment: "conv main status reblogs button label")
|
||||||
|
totalReblogsButton.setTitle(String.localizedStringWithFormat(reblogsFormat, status.reblogsCount), for: .normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func updateUI(account: AccountMO) {
|
override func updateUI(account: AccountMO) {
|
||||||
|
|
|
@ -61,5 +61,37 @@
|
||||||
<string>%u replies</string>
|
<string>%u replies</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>favorites count</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringLocalizedFormatKey</key>
|
||||||
|
<string>%#@favorites@</string>
|
||||||
|
<key>favorites</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringFormatSpecTypeKey</key>
|
||||||
|
<string>NSStringPluralRuleType</string>
|
||||||
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
|
<string>u</string>
|
||||||
|
<key>one</key>
|
||||||
|
<string>1 favorite</string>
|
||||||
|
<key>other</key>
|
||||||
|
<string>%u favorites</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>reblogs count</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringLocalizedFormatKey</key>
|
||||||
|
<string>%#@reblogs@</string>
|
||||||
|
<key>reblogs</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSStringFormatSpecTypeKey</key>
|
||||||
|
<string>NSStringPluralRuleType</string>
|
||||||
|
<key>NSStringFormatValueTypeKey</key>
|
||||||
|
<string>u</string>
|
||||||
|
<key>one</key>
|
||||||
|
<string>1 reblog</string>
|
||||||
|
<key>other</key>
|
||||||
|
<string>%u reblogs</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in New Issue