From 25e4b732ed7143d243c2dd338b249938fc1f368a Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Mon, 22 May 2023 14:45:52 +0200 Subject: [PATCH] Sprinkle in some localization (IOS-157) --- Localization/app.json | 3 ++- .../Scene/SuggestionAccount/SuggestionAccountViewModel.swift | 2 +- .../SuggestionAccountTableViewFooter.swift | 3 ++- .../Sources/MastodonLocalization/Generated/Strings.swift | 2 ++ .../Resources/Base.lproj/Localizable.strings | 1 + .../Resources/en.lproj/Localizable.strings | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Localization/app.json b/Localization/app.json index c6c1f4b27..52f0db07b 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -464,7 +464,8 @@ } }, "suggestion_account": { - "title": "Popular on Mastodon" + "title": "Popular on Mastodon", + "follow_all": "Follow all" }, "compose": { "title": { diff --git a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift index 59bf7f55c..64ab6189b 100644 --- a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift +++ b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift @@ -47,7 +47,7 @@ final class SuggestionAccountViewModel: NSObject { userFetchedResultsController.domain = authContext.mastodonAuthenticationBox.domain - // fetch recomment users + // fetch recommended users Task { var userIDs: [MastodonUser.ID] = [] do { diff --git a/Mastodon/Scene/SuggestionAccount/TableView-Components/SuggestionAccountTableViewFooter.swift b/Mastodon/Scene/SuggestionAccount/TableView-Components/SuggestionAccountTableViewFooter.swift index 294ba3285..cf0408977 100644 --- a/Mastodon/Scene/SuggestionAccount/TableView-Components/SuggestionAccountTableViewFooter.swift +++ b/Mastodon/Scene/SuggestionAccount/TableView-Components/SuggestionAccountTableViewFooter.swift @@ -3,6 +3,7 @@ import UIKit import MastodonUI import MastodonAsset +import MastodonLocalization protocol SuggestionAccountTableViewFooterDelegate: AnyObject { func followAll(_ footerView: SuggestionAccountTableViewFooter) @@ -20,7 +21,7 @@ class SuggestionAccountTableViewFooter: UITableViewHeaderFooterView { //TODO: Check if we can use UIButton.configuration here instead? followAllButton = FollowButton() 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.setTitleColor(.white, for: .normal) followAllButton.contentEdgeInsets = .init(horizontal: 20, vertical: 12) diff --git a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift index a2530fc2c..259af8fb9 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift +++ b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift @@ -1484,6 +1484,8 @@ public enum L10n { } } public enum SuggestionAccount { + /// Follow All + public static let followAll = L10n.tr("Localizable", "Scene.SuggestionAccount.FollowAll", fallback: "Follow All") /// Popular on Mastodon public static let title = L10n.tr("Localizable", "Scene.SuggestionAccount.Title", fallback: "Popular on Mastodon") } diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings index 09f28475d..55cf7ec74 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings @@ -518,6 +518,7 @@ uploaded to Mastodon."; "Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone"; "Scene.Settings.Title" = "Settings"; "Scene.SuggestionAccount.Title" = "Popular on Mastodon"; +"Scene.SuggestionAccount.FollowAll" = "Follow All"; "Scene.Thread.BackTitle" = "Post"; "Scene.Thread.Title" = "Post from %@"; "Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings index 09f28475d..55cf7ec74 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings @@ -518,6 +518,7 @@ uploaded to Mastodon."; "Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone"; "Scene.Settings.Title" = "Settings"; "Scene.SuggestionAccount.Title" = "Popular on Mastodon"; +"Scene.SuggestionAccount.FollowAll" = "Follow All"; "Scene.Thread.BackTitle" = "Post"; "Scene.Thread.Title" = "Post from %@"; "Scene.Welcome.Education.A11Y.WhatIsMastodon.Title" = "What is Mastodon?";