Sprinkle in some localization (IOS-157)

This commit is contained in:
Nathan Mattes 2023-05-22 14:45:52 +02:00
parent e06d852d78
commit 25e4b732ed
6 changed files with 9 additions and 3 deletions

View File

@ -464,7 +464,8 @@
} }
}, },
"suggestion_account": { "suggestion_account": {
"title": "Popular on Mastodon" "title": "Popular on Mastodon",
"follow_all": "Follow all"
}, },
"compose": { "compose": {
"title": { "title": {

View File

@ -47,7 +47,7 @@ final class SuggestionAccountViewModel: NSObject {
userFetchedResultsController.domain = authContext.mastodonAuthenticationBox.domain userFetchedResultsController.domain = authContext.mastodonAuthenticationBox.domain
// fetch recomment users // fetch recommended users
Task { Task {
var userIDs: [MastodonUser.ID] = [] var userIDs: [MastodonUser.ID] = []
do { do {

View File

@ -3,6 +3,7 @@
import UIKit import UIKit
import MastodonUI import MastodonUI
import MastodonAsset import MastodonAsset
import MastodonLocalization
protocol SuggestionAccountTableViewFooterDelegate: AnyObject { protocol SuggestionAccountTableViewFooterDelegate: AnyObject {
func followAll(_ footerView: SuggestionAccountTableViewFooter) func followAll(_ footerView: SuggestionAccountTableViewFooter)
@ -20,7 +21,7 @@ class SuggestionAccountTableViewFooter: UITableViewHeaderFooterView {
//TODO: Check if we can use UIButton.configuration here instead? //TODO: Check if we can use UIButton.configuration here instead?
followAllButton = FollowButton() followAllButton = FollowButton()
followAllButton.translatesAutoresizingMaskIntoConstraints = false followAllButton.translatesAutoresizingMaskIntoConstraints = false
followAllButton.setTitle("Follow All", for: .normal) followAllButton.setTitle(L10n.Scene.SuggestionAccount.followAll, for: .normal)
followAllButton.setBackgroundColor(Asset.Colors.Button.userFollow.color, for: .normal) followAllButton.setBackgroundColor(Asset.Colors.Button.userFollow.color, for: .normal)
followAllButton.setTitleColor(.white, for: .normal) followAllButton.setTitleColor(.white, for: .normal)
followAllButton.contentEdgeInsets = .init(horizontal: 20, vertical: 12) followAllButton.contentEdgeInsets = .init(horizontal: 20, vertical: 12)

View File

@ -1484,6 +1484,8 @@ public enum L10n {
} }
} }
public enum SuggestionAccount { public enum SuggestionAccount {
/// Follow All
public static let followAll = L10n.tr("Localizable", "Scene.SuggestionAccount.FollowAll", fallback: "Follow All")
/// Popular on Mastodon /// Popular on Mastodon
public static let title = L10n.tr("Localizable", "Scene.SuggestionAccount.Title", fallback: "Popular on Mastodon") public static let title = L10n.tr("Localizable", "Scene.SuggestionAccount.Title", fallback: "Popular on Mastodon")
} }

View File

@ -518,6 +518,7 @@ uploaded to Mastodon.";
"Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone"; "Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone";
"Scene.Settings.Title" = "Settings"; "Scene.Settings.Title" = "Settings";
"Scene.SuggestionAccount.Title" = "Popular on Mastodon"; "Scene.SuggestionAccount.Title" = "Popular on Mastodon";
"Scene.SuggestionAccount.FollowAll" = "Follow All";
"Scene.Thread.BackTitle" = "Post"; "Scene.Thread.BackTitle" = "Post";
"Scene.Thread.Title" = "Post from %@"; "Scene.Thread.Title" = "Post from %@";
"Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?"; "Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?";

View File

@ -518,6 +518,7 @@ uploaded to Mastodon.";
"Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone"; "Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone";
"Scene.Settings.Title" = "Settings"; "Scene.Settings.Title" = "Settings";
"Scene.SuggestionAccount.Title" = "Popular on Mastodon"; "Scene.SuggestionAccount.Title" = "Popular on Mastodon";
"Scene.SuggestionAccount.FollowAll" = "Follow All";
"Scene.Thread.BackTitle" = "Post"; "Scene.Thread.BackTitle" = "Post";
"Scene.Thread.Title" = "Post from %@"; "Scene.Thread.Title" = "Post from %@";
"Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?"; "Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?";