Add missing L10n for IOS-140

This commit is contained in:
Marcus Kida 2023-05-04 11:39:57 +02:00
parent 1816c7ce1a
commit d1d9e86244
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
4 changed files with 13 additions and 4 deletions

View File

@ -257,6 +257,9 @@
"user_suspended_warning": "%ss account has been suspended."
}
}
},
"user_list": {
"no_verified_link": "No verified link"
}
},
"scene": {

View File

@ -508,6 +508,10 @@ public enum L10n {
}
}
}
public enum UserList {
/// No verified link
public static let noVerifiedLink = L10n.tr("Localizable", "Common.UserList.NoVerifiedLink", fallback: "No verified link")
}
}
public enum Extension {
public enum OpenIn {

View File

@ -181,6 +181,7 @@ Your profile looks like this to them.";
"Common.Controls.Timeline.Loader.LoadingMissingPosts" = "Loading missing posts...";
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
"Common.Controls.Timeline.Timestamp.Now" = "Now";
"Common.UserList.NoVerifiedLink" = "No verified link";
"Extension.OpenIn.InvalidLinkError" = "This doesn't seem to be a valid Mastodon link.";
"Scene.AccountList.AddAccount" = "Add Account";
"Scene.AccountList.DismissAccountSwitcher" = "Dismiss Account Switcher";
@ -542,4 +543,4 @@ uploaded to Mastodon.";
"Widget.MultipleFollowers.ConfigurationDescription" = "Show number of followers for multiple accounts.";
"Widget.MultipleFollowers.ConfigurationDisplayName" = "Multiple followers";
"Widget.MultipleFollowers.MockUser.AccountName" = "another@follower.social";
"Widget.MultipleFollowers.MockUser.DisplayName" = "Another follower";
"Widget.MultipleFollowers.MockUser.DisplayName" = "Another follower";

View File

@ -13,6 +13,7 @@ import MetaTextKit
import MastodonCore
import MastodonMeta
import MastodonAsset
import MastodonLocalization
extension UserView {
public final class ViewModel: ObservableObject {
@ -92,8 +93,8 @@ extension UserView.ViewModel {
return
}
userView.authorFollowersLabel.attributedText = NSAttributedString(
format: NSAttributedString(string: "%@ followers", attributes: [.font: Font.systemFont(ofSize: 15, weight: .regular)]),
args: NSAttributedString(string: Self.metricFormatter.string(from: count) ?? count.formatted(), attributes: [.font: Font.systemFont(ofSize: 15, weight: .bold)])
format: NSAttributedString(string: "%@ followers", 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)])
)
}
.store(in: &disposeBag)
@ -116,7 +117,7 @@ extension UserView.ViewModel {
}
case .none:
userView.authorVerifiedImageView.tintColor = .secondaryLabel
userView.authorVerifiedLabel.configure(content: PlaintextMetaContent(string: "No verified link"))
userView.authorVerifiedLabel.configure(content: PlaintextMetaContent(string: L10n.Common.UserList.noVerifiedLink))
userView.authorVerifiedLabel.textColor = .secondaryLabel
}