mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Localize General-Setting-Screen (IOS-14)
This commit is contained in:
parent
54a7fdee01
commit
5d58010907
@ -724,6 +724,24 @@
|
||||
"contribute_to_mastodon": "Contribute to Mastodon",
|
||||
"privacy_policy": "Privacy Policy",
|
||||
"clear_media_storage": "Clear Media Storage"
|
||||
},
|
||||
"general": {
|
||||
"title": "General",
|
||||
"appearance": {
|
||||
"section_title": "Appearance",
|
||||
"dark": "Dark",
|
||||
"light": "Light",
|
||||
"system": "Use Device Appearance"
|
||||
},
|
||||
"design": {
|
||||
"section_title": "Design",
|
||||
"show_animations": "Play Animated Avatars and Emoji"
|
||||
},
|
||||
"links": {
|
||||
"section_title": "Links",
|
||||
"open_in_mastodon": "Open in Mastodon",
|
||||
"open_in_browser": "Open in Browser"
|
||||
}
|
||||
}
|
||||
},
|
||||
"report": {
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright © 2023 Mastodon gGmbH. All rights reserved.
|
||||
|
||||
import UIKit
|
||||
import MastodonLocalization
|
||||
|
||||
struct GeneralSettingsSection: Hashable {
|
||||
let type: GeneralSettingsSectionType
|
||||
@ -16,11 +17,11 @@ enum GeneralSettingsSectionType: Hashable {
|
||||
switch self {
|
||||
//TODO: @zeitschlag Localization
|
||||
case .appearance:
|
||||
return "Appearance"
|
||||
return L10n.Scene.Settings.General.Appearance.sectionTitle
|
||||
case .design:
|
||||
return "Design"
|
||||
return L10n.Scene.Settings.General.Design.sectionTitle
|
||||
case .links:
|
||||
return "Links"
|
||||
return L10n.Scene.Settings.General.Links.sectionTitle
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -36,15 +37,14 @@ enum GeneralSetting: Hashable {
|
||||
case dark = 2
|
||||
case system = 0
|
||||
|
||||
//TODO: @zeitschlag Localization
|
||||
var title: String {
|
||||
switch self {
|
||||
case .light:
|
||||
return "Light"
|
||||
return L10n.Scene.Settings.General.Appearance.light
|
||||
case .dark:
|
||||
return "Dark"
|
||||
return L10n.Scene.Settings.General.Appearance.dark
|
||||
case .system:
|
||||
return "Use Device Appearance"
|
||||
return L10n.Scene.Settings.General.Appearance.system
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,11 +56,10 @@ enum GeneralSetting: Hashable {
|
||||
enum Design: Hashable {
|
||||
case showAnimations
|
||||
|
||||
//TODO: @zeitschlag Localization
|
||||
var title: String {
|
||||
switch self {
|
||||
case .showAnimations:
|
||||
return "Play Animated Avatars and Emoji"
|
||||
return L10n.Scene.Settings.General.Design.showAnimations
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -69,13 +68,12 @@ enum GeneralSetting: Hashable {
|
||||
case mastodon
|
||||
case browser
|
||||
|
||||
//TODO: @zeitschlag Localization
|
||||
var title: String {
|
||||
switch self {
|
||||
case .mastodon:
|
||||
return "Open in Mastodon"
|
||||
return L10n.Scene.Settings.General.Links.openInMastodon
|
||||
case .browser:
|
||||
return "Open in Browser"
|
||||
return L10n.Scene.Settings.General.Links.openInBrowser
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
import UIKit
|
||||
import MastodonSDK
|
||||
import CoreDataStack
|
||||
import MastodonLocalization
|
||||
|
||||
struct GeneralSettingsViewModel {
|
||||
var selectedAppearence: GeneralSetting.Appearance
|
||||
@ -98,7 +99,7 @@ class GeneralSettingsViewController: UIViewController {
|
||||
view.addSubview(tableView)
|
||||
tableView.pinTo(to: view)
|
||||
|
||||
title = "General"
|
||||
title = L10n.Scene.Settings.General.title
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
|
||||
|
@ -1434,6 +1434,34 @@ public enum L10n {
|
||||
return L10n.tr("Localizable", "Scene.Settings.Footer.MastodonDescription", String(describing: p1), String(describing: p2), fallback: "Mastodon is open source software. You can report issues on GitHub at %@ (%@)")
|
||||
}
|
||||
}
|
||||
public enum General {
|
||||
/// General
|
||||
public static let title = L10n.tr("Localizable", "Scene.Settings.General.Title", fallback: "General")
|
||||
public enum Appearance {
|
||||
/// Dark
|
||||
public static let dark = L10n.tr("Localizable", "Scene.Settings.General.Appearance.Dark", fallback: "Dark")
|
||||
/// Light
|
||||
public static let light = L10n.tr("Localizable", "Scene.Settings.General.Appearance.Light", fallback: "Light")
|
||||
/// Appearance
|
||||
public static let sectionTitle = L10n.tr("Localizable", "Scene.Settings.General.Appearance.SectionTitle", fallback: "Appearance")
|
||||
/// Use Device Appearance
|
||||
public static let system = L10n.tr("Localizable", "Scene.Settings.General.Appearance.System", fallback: "Use Device Appearance")
|
||||
}
|
||||
public enum Design {
|
||||
/// Design
|
||||
public static let sectionTitle = L10n.tr("Localizable", "Scene.Settings.General.Design.SectionTitle", fallback: "Design")
|
||||
/// Play Animated Avatars and Emoji
|
||||
public static let showAnimations = L10n.tr("Localizable", "Scene.Settings.General.Design.ShowAnimations", fallback: "Play Animated Avatars and Emoji")
|
||||
}
|
||||
public enum Links {
|
||||
/// Open in Browser
|
||||
public static let openInBrowser = L10n.tr("Localizable", "Scene.Settings.General.Links.OpenInBrowser", fallback: "Open in Browser")
|
||||
/// Open in Mastodon
|
||||
public static let openInMastodon = L10n.tr("Localizable", "Scene.Settings.General.Links.OpenInMastodon", fallback: "Open in Mastodon")
|
||||
/// Links
|
||||
public static let sectionTitle = L10n.tr("Localizable", "Scene.Settings.General.Links.SectionTitle", fallback: "Links")
|
||||
}
|
||||
}
|
||||
public enum Keyboard {
|
||||
/// Close Settings Window
|
||||
public static let closeSettingsWindow = L10n.tr("Localizable", "Scene.Settings.Keyboard.CloseSettingsWindow", fallback: "Close Settings Window")
|
||||
|
@ -536,6 +536,17 @@ uploaded to Mastodon.";
|
||||
"Scene.Settings.AboutMastodon.PrivacyPolicy" = "Privacy Policy";
|
||||
"Scene.Settings.AboutMastodon.CleaerMediaStorage" = "Clear Media Storage";
|
||||
|
||||
"Scene.Settings.General.Title" = "General";
|
||||
"Scene.Settings.General.Appearance.SectionTitle" = "Appearance";
|
||||
"Scene.Settings.General.Appearance.Dark" = "Dark";
|
||||
"Scene.Settings.General.Appearance.Light" = "Light";
|
||||
"Scene.Settings.General.Appearance.System" = "Use Device Appearance";
|
||||
"Scene.Settings.General.Design.SectionTitle" = "Design";
|
||||
"Scene.Settings.General.Design.ShowAnimations" = "Play Animated Avatars and Emoji";
|
||||
"Scene.Settings.General.Links.SectionTitle" = "Links";
|
||||
"Scene.Settings.General.Links.OpenInMastodon" = "Open in Mastodon";
|
||||
"Scene.Settings.General.Links.OpenInBrowser" = "Open in Browser";
|
||||
|
||||
"Scene.SuggestionAccount.FollowAll" = "Follow all";
|
||||
"Scene.SuggestionAccount.Title" = "Popular on Mastodon";
|
||||
"Scene.Thread.BackTitle" = "Post";
|
||||
|
Loading…
x
Reference in New Issue
Block a user