chore(Widget): Implement L10n for mock account
This commit is contained in:
parent
c00e797996
commit
998ed3b307
|
@ -826,6 +826,12 @@
|
|||
"title": "FOLLOWERS",
|
||||
"followers_today": "%s followers today"
|
||||
},
|
||||
"multiple_followers": {
|
||||
"mock_user": {
|
||||
"display_name": "Another follower",
|
||||
"account_name": "another@follower.social"
|
||||
}
|
||||
},
|
||||
"latest_followers": {
|
||||
"title": "Latest followers",
|
||||
"last_update": "Last update: %s"
|
||||
|
|
|
@ -1502,6 +1502,14 @@ public enum L10n {
|
|||
/// Latest followers
|
||||
public static let title = L10n.tr("Localizable", "Widget.LatestFollowers.Title", fallback: "Latest followers")
|
||||
}
|
||||
public enum MultipleFollowers {
|
||||
public enum MockUser {
|
||||
/// another@follower.social
|
||||
public static let accountName = L10n.tr("Localizable", "Widget.MultipleFollowers.MockUser.AccountName", fallback: "another@follower.social")
|
||||
/// Another follower
|
||||
public static let displayName = L10n.tr("Localizable", "Widget.MultipleFollowers.MockUser.DisplayName", fallback: "Another follower")
|
||||
}
|
||||
}
|
||||
}
|
||||
public enum A11y {
|
||||
public enum Plural {
|
||||
|
|
|
@ -522,5 +522,7 @@ You can’t go wrong with any of our recommend servers, so regardless of which o
|
|||
"Widget.Common.UserNotLoggedIn" = "Please open Mastodon to log in to an Account.";
|
||||
"Widget.FollowersCount.Title" = "FOLLOWERS";
|
||||
"Widget.FollowersCount.FollowersToday" = "%@ followers today";
|
||||
"Widget.MultipleFollowers.MockUser.DisplayName" = "Another follower";
|
||||
"Widget.MultipleFollowers.MockUser.AccountName" = "another@follower.social";
|
||||
"Widget.LatestFollowers.Title" = "Latest followers";
|
||||
"Widget.LatestFollowers.LastUpdate" = "Last update: %@";
|
||||
|
|
|
@ -4,6 +4,7 @@ import WidgetKit
|
|||
import SwiftUI
|
||||
import Intents
|
||||
import MastodonSDK
|
||||
import MastodonLocalization
|
||||
|
||||
struct MultiFollowersCountWidgetProvider: IntentTimelineProvider {
|
||||
func placeholder(in context: Context) -> MultiFollowersCountEntry {
|
||||
|
@ -116,8 +117,8 @@ private extension MultiFollowersCountWidgetProvider {
|
|||
accounts.append(
|
||||
MultiFollowersEntryAccount(
|
||||
followersCount: 1_200,
|
||||
displayNameWithFallback: "Another follower",
|
||||
acct: "@another@follower.social",
|
||||
displayNameWithFallback: L10n.Widget.MultipleFollowers.MockUser.displayName,
|
||||
acct: L10n.Widget.MultipleFollowers.MockUser.accountName,
|
||||
avatarImage: UIImage(named: "missingAvatar")!,
|
||||
domain: authBox.domain
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue