Add missing L10n (IOS-140)

This commit is contained in:
Marcus Kida 2023-05-05 10:07:47 +02:00
parent 313d5e2d8a
commit 40db0e36c0
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
4 changed files with 8 additions and 2 deletions

View File

@ -259,7 +259,8 @@
}
},
"user_list": {
"no_verified_link": "No verified link"
"no_verified_link": "No verified link",
"followers_count": "%@ followers"
}
},
"scene": {

View File

@ -509,6 +509,10 @@ public enum L10n {
}
}
public enum UserList {
/// %@ followers
public static func followersCount(_ p1: Any) -> String {
return L10n.tr("Localizable", "Common.UserList.FollowersCount", String(describing: p1), fallback: "%@ followers")
}
/// No verified link
public static let noVerifiedLink = L10n.tr("Localizable", "Common.UserList.NoVerifiedLink", fallback: "No verified link")
}

View File

@ -182,6 +182,7 @@ Your profile looks like this to them.";
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
"Common.Controls.Timeline.Timestamp.Now" = "Now";
"Common.UserList.NoVerifiedLink" = "No verified link";
"Common.UserList.FollowersCount" = "%@ followers";
"Extension.OpenIn.InvalidLinkError" = "This doesn't seem to be a valid Mastodon link.";
"Scene.AccountList.AddAccount" = "Add Account";
"Scene.AccountList.DismissAccountSwitcher" = "Dismiss Account Switcher";

View File

@ -93,7 +93,7 @@ extension UserView.ViewModel {
return
}
userView.authorFollowersLabel.attributedText = NSAttributedString(
format: NSAttributedString(string: "%@ followers", attributes: [.font: UIFont.systemFont(ofSize: 15, weight: .regular)]),
format: NSAttributedString(string: L10n.Common.UserList.followersCount("%@"), attributes: [.font: UIFont.systemFont(ofSize: 15, weight: .regular)]),
args: NSAttributedString(string: Self.metricFormatter.string(from: count) ?? count.formatted(), attributes: [.font: UIFont.systemFont(ofSize: 15, weight: .bold)])
)
}