Add some localization here and there (#690)

This commit is contained in:
Nathan Mattes 2022-12-17 19:50:40 +01:00
parent 7d63eeccaf
commit 2e4ff59bc2
8 changed files with 73 additions and 10 deletions

View File

@ -241,7 +241,21 @@
"welcome": {
"slogan": "Social networking\nback in your hands.",
"get_started": "Get Started",
"log_in": "Log In"
"log_in": "Log In",
"education": {
"what_is_mastodon": {
"title": "What is",
"description": "Imagine you have an email address that ends with @example.com.\n\nYou can still send and receive emails from anyone, even if their email ends in @gmail.com or @icloud.com or @example.com.",
},
"mastodon_is_like_that": {
"title": "Mastodon is like that",
"description": "Your handle might be @gothgirl654@example.social, but you can still follow, reblog, and chat with @fallout5ever@example.online.",
},
"how_do_i_pick_a_server": {
"title": "How do I pick a server?",
"description": "Different people choose different servers for any number of reasons. art.example is a great place for artists, while glasgow.example might be a good pick for Scots.\n\nYou cant go wrong with any of our recommend servers, so regardless of which one you pick (or if you enter your own in the server search bar), youll never miss a beat anywhere.",
},
}
},
"login": {
"title": "Welcome back",
@ -251,7 +265,7 @@
}
},
"server_picker": {
"title": "Pick server",
"title": "Pick Server",
"button": {
"category": {
"all": "All",
@ -286,6 +300,9 @@
"no_results": "No results"
}
},
"privacy": {
"title": "Privacy"
}
"register": {
"title": "Lets get you set up on %s",
"lets_get_you_set_up_on_domain": "Lets get you set up on %s",

View File

@ -300,6 +300,17 @@
"no_results": "No results"
}
},
"privacy": {
"title": "Privacy",
"policy": {
"ios": "Privacy Policy - Mastodon for iOS";
"server" = "Privacy Policy - %s";
},
"button": {
"confirm": "I agree"
}
}
"register": {
"title": "Lets get you set up on %s",
"lets_get_you_set_up_on_domain": "Lets get you set up on %s",

View File

@ -40,7 +40,7 @@ final class OnboardingNextView: UIView {
label.numberOfLines = 0
label.textColor = .secondaryLabel
label.font = UIFontMetrics(forTextStyle: .footnote).scaledFont(for: .systemFont(ofSize: 13, weight: .regular))
label.text = "Well pick a server based on your language if you continue without making a selection." //TODO: @zeitschlag localize
label.text = L10n.Scene.ServerPicker.noServerSelectedHint
return label
}()

View File

@ -8,7 +8,8 @@
import UIKit
import MastodonCore
import MastodonSDK
import SafariServices
import MastodonLocalization
import MastodonAsset
enum PrivacyRow {
case iOSApp
@ -26,9 +27,9 @@ enum PrivacyRow {
var title: String {
switch self {
case .iOSApp:
return "Privacy Policy - Mastodon for iOS"
return L10n.Scene.Privacy.Policy.ios
case .server(let domain):
return "Privacy Policy - \(domain)"
return L10n.Scene.Privacy.Policy.server(domain)
}
}
}
@ -61,7 +62,9 @@ class PrivacyTableViewController: UIViewController, NeedsDependency {
view.addSubview(tableView)
setupConstraints()
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "I agree", style: .done, target: self, action: #selector(PrivacyTableViewController.nextButtonPressed(_:)))
navigationItem.rightBarButtonItem = UIBarButtonItem(title: L10n.Scene.Privacy.Button.confirm, style: .done, target: self, action: #selector(PrivacyTableViewController.nextButtonPressed(_:)))
title = L10n.Scene.Privacy.title
}
required init?(coder: NSCoder) { fatalError("init(coder:) won't been implemented, please don't use Storyboards.") }

View File

@ -55,7 +55,7 @@ extension MastodonServerRulesViewController {
viewModel.setupDiffableDataSource(tableView: tableView)
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "I agree", style: .done, target: self, action: #selector(MastodonServerRulesViewController.nextButtonPressed(_:)))
navigationItem.rightBarButtonItem = UIBarButtonItem(title: L10n.Scene.ServerRules.Button.confirm, style: .done, target: self, action: #selector(MastodonServerRulesViewController.nextButtonPressed(_:)))
title = L10n.Scene.ServerRules.title
}

View File

@ -791,6 +791,24 @@ public enum L10n {
public static let showPrevious = L10n.tr("Localizable", "Scene.Preview.Keyboard.ShowPrevious", fallback: "Show Previous")
}
}
public enum Privacy {
/// Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your servers privacy policy.
public static let description = L10n.tr("Localizable", "Scene.Privacy.Description", fallback: "Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your servers privacy policy.")
/// Privacy
public static let title = L10n.tr("Localizable", "Scene.Privacy.Title", fallback: "Privacy")
public enum Button {
/// I agree
public static let confirm = L10n.tr("Localizable", "Scene.Privacy.Button.confirm", fallback: "I agree")
}
public enum Policy {
/// Privacy Policy - Mastodon for iOS
public static let ios = L10n.tr("Localizable", "Scene.Privacy.Policy.Ios", fallback: "Privacy Policy - Mastodon for iOS")
/// Privacy Policy - %@
public static func server(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Privacy.Policy.Server", String(describing: p1), fallback: "Privacy Policy - %@")
}
}
}
public enum Profile {
public enum Accessibility {
/// Double tap to open the list
@ -1186,6 +1204,8 @@ public enum L10n {
}
}
public enum ServerPicker {
/// Well pick a server based on your language if you continue without making a selection.
public static let noServerSelectedHint = L10n.tr("Localizable", "Scene.ServerPicker.NoServerSelectedHint", fallback: "Well pick a server based on your language if you continue without making a selection.")
/// Pick server
public static let title = L10n.tr("Localizable", "Scene.ServerPicker.Title", fallback: "Pick server")
public enum Button {

View File

@ -436,6 +436,7 @@ uploaded to Mastodon.";
"Scene.ServerPicker.Label.Language" = "LANGUAGE";
"Scene.ServerPicker.Label.Users" = "USERS";
"Scene.ServerPicker.Title" = "Pick server";
"Scene.ServerPicker.NoServerSelectedHint" = "Well pick a server based on your language if you continue without making a selection.";
"Scene.ServerRules.Button.Confirm" = "I Agree";
"Scene.ServerRules.PrivacyPolicy" = "privacy policy";
"Scene.ServerRules.Prompt" = "By continuing, youre subject to the terms of service and privacy policy for %@.";
@ -497,4 +498,9 @@ You can still send and receive emails from anyone, even if their email ends in @
You cant go wrong with any of our recommend servers, so regardless of which one you pick (or if you enter your own in the server search bar), youll never miss a beat anywhere.";
"Scene.Wizard.AccessibilityHint" = "Double tap to dismiss this wizard";
"Scene.Wizard.MultipleAccountSwitchIntroDescription" = "Switch between multiple accounts by holding the profile button.";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";
"Scene.Privacy.Title" = "Privacy";
"Scene.Privacy.Description" = "Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your servers privacy policy.";
"Scene.Privacy.Button.confirm" = "I agree";
"Scene.Privacy.Policy.Ios" = "Privacy Policy - Mastodon for iOS";
"Scene.Privacy.Policy.Server" = "Privacy Policy - %@";

View File

@ -427,6 +427,7 @@ uploaded to Mastodon.";
"Scene.ServerPicker.Label.Language" = "LANGUAGE";
"Scene.ServerPicker.Label.Users" = "USERS";
"Scene.ServerPicker.Title" = "Pick server";
"Scene.ServerPicker.NoServerSelectedHint" = "Well pick a server based on your language if you continue without making a selection.";
"Scene.ServerRules.Button.Confirm" = "I Agree";
"Scene.ServerRules.PrivacyPolicy" = "privacy policy";
"Scene.ServerRules.Prompt" = "By continuing, youre subject to the terms of service and privacy policy for %@.";
@ -478,4 +479,9 @@ uploaded to Mastodon.";
back in your hands.";
"Scene.Wizard.AccessibilityHint" = "Double tap to dismiss this wizard";
"Scene.Wizard.MultipleAccountSwitchIntroDescription" = "Switch between multiple accounts by holding the profile button.";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";
"Scene.Privacy.Title" = "Privacy";
"Scene.Privacy.Description" = "Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your servers privacy policy.";
"Scene.Privacy.Button.confirm" = "I agree";
"Scene.Privacy.Policy.Ios" = "Privacy Policy - Mastodon for iOS";
"Scene.Privacy.Policy.Server" = "Privacy Policy - %@";