From 0e0855982fd73e48868a6c6f2d55c05cb68ef39c Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Mon, 9 Oct 2023 14:40:15 +0200 Subject: [PATCH] Add localization (IOS-20) --- Localization/StringsConvertor/input/Base.lproj/app.json | 3 +++ Localization/app.json | 3 +++ Mastodon/Scene/Settings/About Mastodon/AboutSettings.swift | 2 +- .../Table View Components/ContactAdminTableViewCell.swift | 3 ++- .../Sources/MastodonLocalization/Generated/Strings.swift | 6 +++++- .../Resources/Base.lproj/Localizable.strings | 4 +++- .../Resources/en.lproj/Localizable.strings | 4 +++- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Localization/StringsConvertor/input/Base.lproj/app.json b/Localization/StringsConvertor/input/Base.lproj/app.json index 30630361f..978e865c2 100644 --- a/Localization/StringsConvertor/input/Base.lproj/app.json +++ b/Localization/StringsConvertor/input/Base.lproj/app.json @@ -726,6 +726,9 @@ "privacy_policy": "Privacy Policy", "clear_media_storage": "Clear Media Storage" }, + "about_instance": { + "message_admin": "Message Admin" + }, "general": { "title": "General", "appearance": { diff --git a/Localization/app.json b/Localization/app.json index 30630361f..978e865c2 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -726,6 +726,9 @@ "privacy_policy": "Privacy Policy", "clear_media_storage": "Clear Media Storage" }, + "about_instance": { + "message_admin": "Message Admin" + }, "general": { "title": "General", "appearance": { diff --git a/Mastodon/Scene/Settings/About Mastodon/AboutSettings.swift b/Mastodon/Scene/Settings/About Mastodon/AboutSettings.swift index fcb952f30..3c6ca64bc 100644 --- a/Mastodon/Scene/Settings/About Mastodon/AboutSettings.swift +++ b/Mastodon/Scene/Settings/About Mastodon/AboutSettings.swift @@ -23,7 +23,7 @@ enum AboutSettingsEntry: Hashable { case .privacyPolicy: return L10n.Scene.Settings.AboutMastodon.privacyPolicy case .clearMediaCache(_): - return L10n.Scene.Settings.AboutMastodon.cleaerMediaStorage + return L10n.Scene.Settings.AboutMastodon.clearMediaStorage } } diff --git a/Mastodon/Scene/Settings/Server Details/Table View Components/ContactAdminTableViewCell.swift b/Mastodon/Scene/Settings/Server Details/Table View Components/ContactAdminTableViewCell.swift index 683e20438..32ad7d0f3 100644 --- a/Mastodon/Scene/Settings/Server Details/Table View Components/ContactAdminTableViewCell.swift +++ b/Mastodon/Scene/Settings/Server Details/Table View Components/ContactAdminTableViewCell.swift @@ -2,6 +2,7 @@ import UIKit import MastodonAsset +import MastodonLocalization class ContactAdminTableViewCell: UITableViewCell { @@ -13,7 +14,7 @@ class ContactAdminTableViewCell: UITableViewCell { configuration.textProperties.color = Asset.Colors.Brand.blurple.color configuration.image = UIImage(systemName: "envelope") configuration.imageProperties.tintColor = Asset.Colors.Brand.blurple.color - configuration.text = "Contact Admin" + configuration.text = L10n.Scene.Settings.AboutInstance.messageAdmin contentConfiguration = configuration } diff --git a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift index 701c9c045..35465deb5 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift +++ b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift @@ -1416,9 +1416,13 @@ public enum L10n { } } public enum Settings { + public enum AboutInstance { + /// Message Admin + public static let messageAdmin = L10n.tr("Localizable", "Scene.Settings.AboutInstance.MessageAdmin", fallback: "Message Admin") + } public enum AboutMastodon { /// Clear Media Storage - public static let cleaerMediaStorage = L10n.tr("Localizable", "Scene.Settings.AboutMastodon.CleaerMediaStorage", fallback: "Clear Media Storage") + public static let clearMediaStorage = L10n.tr("Localizable", "Scene.Settings.AboutMastodon.ClearMediaStorage", fallback: "Clear Media Storage") /// Contribute to Mastodon public static let contributeToMastodon = L10n.tr("Localizable", "Scene.Settings.AboutMastodon.ContributeToMastodon", fallback: "Contribute to Mastodon") /// Even More Settings diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings index 348906f0b..6a2233760 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings @@ -535,7 +535,9 @@ uploaded to Mastodon."; "Scene.Settings.AboutMastodon.MoreSettings" = "Even More Settings"; "Scene.Settings.AboutMastodon.ContributeToMastodon" = "Contribute to Mastodon"; "Scene.Settings.AboutMastodon.PrivacyPolicy" = "Privacy Policy"; -"Scene.Settings.AboutMastodon.CleaerMediaStorage" = "Clear Media Storage"; +"Scene.Settings.AboutMastodon.ClearMediaStorage" = "Clear Media Storage"; + +"Scene.Settings.AboutInstance.MessageAdmin" = "Message Admin"; "Scene.Settings.General.Title" = "General"; "Scene.Settings.General.Appearance.SectionTitle" = "Appearance"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings index 348906f0b..6a2233760 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings @@ -535,7 +535,9 @@ uploaded to Mastodon."; "Scene.Settings.AboutMastodon.MoreSettings" = "Even More Settings"; "Scene.Settings.AboutMastodon.ContributeToMastodon" = "Contribute to Mastodon"; "Scene.Settings.AboutMastodon.PrivacyPolicy" = "Privacy Policy"; -"Scene.Settings.AboutMastodon.CleaerMediaStorage" = "Clear Media Storage"; +"Scene.Settings.AboutMastodon.ClearMediaStorage" = "Clear Media Storage"; + +"Scene.Settings.AboutInstance.MessageAdmin" = "Message Admin"; "Scene.Settings.General.Title" = "General"; "Scene.Settings.General.Appearance.SectionTitle" = "Appearance";