Sprinkle in some localization (IOS-14)

This commit is contained in:
Nathan Mattes 2023-09-26 17:24:26 +02:00
parent 8e54da5dff
commit 65f39f4b61
7 changed files with 156 additions and 99 deletions

View File

@ -709,59 +709,60 @@
"title": "Post from %s"
},
"settings": {
"title": "Settings",
"section": {
"overview": {
"title": "Settings",
"general": "General",
"notifications": "Notifications",
"support_mastodon": "Support Mastodon",
"about_mastodon": "About Mastodon",
"logout": "Logout %@"
}
"about_mastodon": {
"title": "About",
"more_settings": "Even More Settings",
"contribute_to_mastodon": "Contribute to Mastodon",
"privacy_policy": "Privacy Policy",
"clear_media_storage": "Clear Media Storage"
},
"general": {
"title": "General",
"appearance": {
"title": "Appearance",
"automatic": "Automatic",
"light": "Always Light",
"dark": "Always Dark"
"section_title": "Appearance",
"dark": "Dark",
"light": "Light",
"system": "Use Device Appearance"
},
"look_and_feel": {
"title": "Look and Feel",
"use_system": "Use System",
"really_dark": "Really Dark",
"sorta_dark": "Sorta Dark",
"light": "Light"
"design": {
"section_title": "Design",
"show_animations": "Play Animated Avatars and Emoji"
},
"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"
"links": {
"section_title": "Links",
"open_in_mastodon": "Open in Mastodon",
"open_in_browser": "Open in Browser"
}
},
"footer": {
"mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)"
},
"keyboard": {
"close_settings_window": "Close Settings Window"
"notifications": {
"title": "Notifications",
"policy": {
"title": "Get Notifications from",
"anyone": "Anyone",
"followers": "People who follow you",
"follow": "People you follow",
"noone": "No one"
},
"alert": {
"mentions_and_replies": "Mentions & Replies",
"boosts": "Boosts",
"favorites": "Favorites",
"new_followers": "New Followers"
},
"disabled": {
"notification_hint": "Turn on notifications from your device settings to see updates on your lock screen.",
"go_to_settings": "Go to Notification Settings"
}
}
},
"report": {

View File

@ -655,6 +655,10 @@
"profile": "Go to @%s@%s",
"url": "Open URL in Mastodon",
"hashtag": "Go to #%s",
"no_user": {
"title": "No User Account Found",
"message": "There's no Useraccount \"%s\" on %s"
}
"empty_state": {
"no_results": "No results"
},
@ -705,59 +709,60 @@
"title": "Post from %s"
},
"settings": {
"title": "Settings",
"section": {
"overview": {
"title": "Settings",
"general": "General",
"notifications": "Notifications",
"support_mastodon": "Support Mastodon",
"about_mastodon": "About Mastodon",
"logout": "Logout %@"
}
"about_mastodon": {
"title": "About",
"more_settings": "Even More Settings",
"contribute_to_mastodon": "Contribute to Mastodon",
"privacy_policy": "Privacy Policy",
"clear_media_storage": "Clear Media Storage"
},
"general": {
"title": "General",
"appearance": {
"title": "Appearance",
"automatic": "Automatic",
"light": "Always Light",
"dark": "Always Dark"
"section_title": "Appearance",
"dark": "Dark",
"light": "Light",
"system": "Use Device Appearance"
},
"look_and_feel": {
"title": "Look and Feel",
"use_system": "Use System",
"really_dark": "Really Dark",
"sorta_dark": "Sorta Dark",
"light": "Light"
"design": {
"section_title": "Design",
"show_animations": "Play Animated Avatars and Emoji"
},
"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"
"links": {
"section_title": "Links",
"open_in_mastodon": "Open in Mastodon",
"open_in_browser": "Open in Browser"
}
},
"footer": {
"mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)"
},
"keyboard": {
"close_settings_window": "Close Settings Window"
"notifications": {
"title": "Notifications",
"policy": {
"title": "Get Notifications from",
"anyone": "Anyone",
"followers": "People who follow you",
"follow": "People you follow",
"noone": "No one"
},
"alert": {
"mentions_and_replies": "Mentions & Replies",
"boosts": "Boosts",
"favorites": "Favorites",
"new_followers": "New Followers"
},
"disabled": {
"notification_hint": "Turn on notifications from your device settings to see updates on your lock screen.",
"go_to_settings": "Go to Notification Settings"
}
}
},
"report": {

View File

@ -757,7 +757,12 @@
"boosts": "Boosts",
"favorites": "Favorites",
"new_followers": "New Followers"
},
"disabled": {
"notification_hint": "Turn on notifications from your device settings to see updates on your lock screen.",
"go_to_settings": "Go to Notification Settings"
}
}
},
"report": {

View File

@ -2,6 +2,7 @@
import UIKit
import MastodonAsset
import MastodonLocalization
class NotificationSettingsDisabledTableViewCell: UITableViewCell {
@ -21,13 +22,13 @@ class NotificationSettingsDisabledTableViewCell: UITableViewCell {
notificationHintLabel.translatesAutoresizingMaskIntoConstraints = false
notificationHintLabel.numberOfLines = 0
notificationHintLabel.textColor = .label
notificationHintLabel.text = "Turn on notifications from your device settings to see updates on your lock screen."
notificationHintLabel.text = L10n.Scene.Settings.Notifications.Disabled.notificationHint
notificationHintLabel.font = UIFontMetrics(forTextStyle: .callout).scaledFont(for: .systemFont(ofSize: 16, weight: .regular))
goToSettingsLabel = UILabel()
goToSettingsLabel.textColor = Asset.Colors.Brand.blurple.color
goToSettingsLabel.translatesAutoresizingMaskIntoConstraints = false
goToSettingsLabel.text = "Go to Notification Settings"
goToSettingsLabel.text = L10n.Scene.Settings.Notifications.Disabled.goToSettings
goToSettingsLabel.font = UIFontMetrics(forTextStyle: .callout).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
super.init(style: style, reuseIdentifier: reuseIdentifier)

View File

@ -1479,6 +1479,12 @@ public enum L10n {
/// New Followers
public static let newFollowers = L10n.tr("Localizable", "Scene.Settings.Notifications.Alert.NewFollowers", fallback: "New Followers")
}
public enum Disabled {
/// Go to Notification Settings
public static let goToSettings = L10n.tr("Localizable", "Scene.Settings.Notifications.Disabled.GoToSettings", fallback: "Go to Notification Settings")
/// Turn on notifications from your device settings to see updates on your lock screen.
public static let notificationHint = L10n.tr("Localizable", "Scene.Settings.Notifications.Disabled.NotificationHint", fallback: "Turn on notifications from your device settings to see updates on your lock screen.")
}
public enum Policy {
/// Anyone
public static let anyone = L10n.tr("Localizable", "Scene.Settings.Notifications.Policy.Anyone", fallback: "Anyone")

View File

@ -557,6 +557,8 @@ uploaded to Mastodon.";
"Scene.Settings.Notifications.Alert.Boosts" = "Boosts";
"Scene.Settings.Notifications.Alert.Favorites" = "Favorites";
"Scene.Settings.Notifications.Alert.NewFollowers" = "New Followers";
"Scene.Settings.Notifications.Disabled.NotificationHint" = "Turn on notifications from your device settings to see updates on your lock screen.";
"Scene.Settings.Notifications.Disabled.GoToSettings" = "Go to Notification Settings";
"Scene.SuggestionAccount.FollowAll" = "Follow all";
"Scene.SuggestionAccount.Title" = "Popular on Mastodon";

View File

@ -522,7 +522,44 @@ 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.Overview.Title" = "Settings";
"Scene.Settings.Overview.General" = "General";
"Scene.Settings.Overview.Notifications" = "Notifications";
"Scene.Settings.Overview.SupportMastodon" = "Support Mastodon";
"Scene.Settings.Overview.AboutMastodon" = "About Mastodon";
"Scene.Settings.Overview.Logout" = "Logout %@";
"Scene.Settings.AboutMastodon.Title" = "About";
"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.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.Settings.Notifications.Title" = "Notifications";
"Scene.Settings.Notifications.Policy.Title" = "Get Notifications from";
"Scene.Settings.Notifications.Policy.Anyone" = "Anyone";
"Scene.Settings.Notifications.Policy.Followers" = "People who follow you";
"Scene.Settings.Notifications.Policy.Follow" = "People you follow";
"Scene.Settings.Notifications.Policy.Noone" = "No one";
"Scene.Settings.Notifications.Alert.MentionsAndReplies" = "Mentions & Replies";
"Scene.Settings.Notifications.Alert.Boosts" = "Boosts";
"Scene.Settings.Notifications.Alert.Favorites" = "Favorites";
"Scene.Settings.Notifications.Alert.NewFollowers" = "New Followers";
"Scene.Settings.Notifications.Disabled.NotificationHint" = "Turn on notifications from your device settings to see updates on your lock screen.";
"Scene.Settings.Notifications.Disabled.GoToSettings" = "Go to Notification Settings";
"Scene.SuggestionAccount.FollowAll" = "Follow all";
"Scene.SuggestionAccount.Title" = "Popular on Mastodon";
"Scene.Thread.BackTitle" = "Post";