Add localization to general-settings-screen (IOS-14)

This commit is contained in:
Nathan Mattes 2023-06-27 13:20:57 +02:00
parent e8e2f7ceff
commit 0f495e67e4
4 changed files with 30 additions and 58 deletions

View File

@ -710,59 +710,11 @@
},
"settings": {
"title": "Settings",
"section": {
"appearance": {
"title": "Appearance",
"automatic": "Automatic",
"light": "Always Light",
"dark": "Always Dark"
},
"look_and_feel": {
"title": "Look and Feel",
"use_system": "Use System",
"really_dark": "Really Dark",
"sorta_dark": "Sorta Dark",
"light": "Light"
},
"notifications": {
"title": "Notifications",
"favorites": "Favorites my post",
"follows": "Follows me",
"boosts": "Reblogs my post",
"mentions": "Mentions me",
"trigger": {
"anyone": "anyone",
"follower": "a follower",
"follow": "anyone I follow",
"noone": "no one",
"title": "Notify me when"
}
},
"preference": {
"title": "Preferences",
"disable_avatar_animation": "Disable animated avatars",
"disable_emoji_animation": "Disable animated emojis",
"using_default_browser": "Use default browser to open links",
"open_links_in_mastodon": "Open links in Mastodon"
},
"boring_zone": {
"title": "The Boring Zone",
"account_settings": "Account Settings",
"terms": "Terms of Service",
"privacy": "Privacy Policy"
},
"spicy_zone": {
"title": "The Spicy Zone",
"clear": "Clear Media Cache",
"signout": "Sign Out"
}
},
"footer": {
"mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)"
},
"keyboard": {
"close_settings_window": "Close Settings Window"
}
"general": "General",
"notifications" = "Notifications",
"supportMastodon" = "Support Mastodon",
"aboutMastodon" = "About Mastodon",
"logout" = "Logout %@"
},
"report": {
"title_report": "Report",

View File

@ -1,6 +1,7 @@
// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import UIKit
import MastodonLocalization
struct SettingsSection: Hashable {
let entries: [SettingsEntry]
@ -17,15 +18,15 @@ enum SettingsEntry: Hashable {
var title: String {
switch self {
case .general:
return "General"
return L10n.Scene.Settings.general
case .notifications:
return "Notifications"
return L10n.Scene.Settings.notifications
case .aboutMastodon:
return "About Mastodon"
return L10n.Scene.Settings.aboutMastodon
case .supportMastodon:
return "Support Mastodon"
return L10n.Scene.Settings.supportMastodon
case .logout(let accountName):
return "Logout @\(accountName)"
return L10n.Scene.Settings.logout(accountName)
}
}

View File

@ -1416,6 +1416,18 @@ public enum L10n {
}
}
public enum Settings {
/// About Mastodon
public static let aboutMastodon = L10n.tr("Localizable", "Scene.Settings.AboutMastodon", fallback: "About Mastodon")
/// General
public static let general = L10n.tr("Localizable", "Scene.Settings.General", fallback: "General")
/// Logout %@
public static func logout(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Settings.Logout", String(describing: p1), fallback: "Logout %@")
}
/// Notifications
public static let notifications = L10n.tr("Localizable", "Scene.Settings.Notifications", fallback: "Notifications")
/// Support Mastodon
public static let supportMastodon = L10n.tr("Localizable", "Scene.Settings.SupportMastodon", fallback: "Support Mastodon")
/// Settings
public static let title = L10n.tr("Localizable", "Scene.Settings.Title", fallback: "Settings")
public enum Footer {

View File

@ -522,7 +522,14 @@ uploaded to Mastodon.";
"Scene.Settings.Section.SpicyZone.Clear" = "Clear Media Cache";
"Scene.Settings.Section.SpicyZone.Signout" = "Sign Out";
"Scene.Settings.Section.SpicyZone.Title" = "The Spicy Zone";
"Scene.Settings.Title" = "Settings";
"Scene.Settings.General" = "General";
"Scene.Settings.Notifications" = "Notifications";
"Scene.Settings.SupportMastodon" = "Support Mastodon";
"Scene.Settings.AboutMastodon" = "About Mastodon";
"Scene.Settings.Logout" = "Logout %@";
"Scene.SuggestionAccount.FollowAll" = "Follow all";
"Scene.SuggestionAccount.Title" = "Popular on Mastodon";
"Scene.Thread.BackTitle" = "Post";