Add localization (IOS-264)

This commit is contained in:
Nathan Mattes 2024-05-09 22:36:15 +02:00
parent 84e6cd3298
commit 9a0448f0a0
8 changed files with 51 additions and 17 deletions

View File

@ -729,6 +729,15 @@
"accepted": "Accepted",
"reject": "reject",
"rejected": "Rejected"
},
"warning": {
"none": "Your account has received a moderation warning.",
"disable": "Your account has been disabled.",
"mark_statuses_as_sensitive": "Some of your posts have been marked as sensitive.",
"delete_statuses": "Some of your posts have been removed.",
"sensitive": "Your posts will be marked as sensitive from now on.",
"silence": "Your account has been limited.",
"suspend": "Your account has been suspended."
}
},
"thread": {

View File

@ -729,6 +729,15 @@
"accepted": "Accepted",
"reject": "reject",
"rejected": "Rejected"
},
"warning": {
"none": "Your account has received a moderation warning.",
"disable": "Your account has been disabled.",
"mark_statuses_as_sensitive": "Some of your posts have been marked as sensitive.",
"delete_statuses": "Some of your posts have been removed.",
"sensitive": "Your posts will be marked as sensitive from now on.",
"silence": "Your account has been limited.",
"suspend": "Your account has been suspended."
}
},
"thread": {

View File

@ -1568,7 +1568,6 @@
DB0617F927855B460030EE79 /* Profile */,
DB4F097926A039C400D62E92 /* Status */,
DB65C63527A2AF52008BAC2E /* Report */,
DB0617F727855B010030EE79 /* Notification */,
DB4F097726A039A200D62E92 /* Search */,
);
path = Diffable;
@ -1924,15 +1923,6 @@
path = Onboarding;
sourceTree = "<group>";
};
DB0617F727855B010030EE79 /* Notification */ = {
isa = PBXGroup;
children = (
2D35237926256D920031AF25 /* NotificationSection.swift */,
2D7867182625B77500211898 /* NotificationItem.swift */,
);
path = Notification;
sourceTree = "<group>";
};
DB0617F827855B170030EE79 /* User */ = {
isa = PBXGroup;
children = (
@ -2657,6 +2647,8 @@
D80F627E2B5C32E400877059 /* NotificationView */,
DB9D6BF725E4F5690051B173 /* NotificationViewController.swift */,
2D607AD726242FC500B70763 /* NotificationViewModel.swift */,
2D35237926256D920031AF25 /* NotificationSection.swift */,
2D7867182625B77500211898 /* NotificationItem.swift */,
);
path = Notification;
sourceTree = "<group>";

View File

@ -3,6 +3,7 @@
import UIKit
import MastodonSDK
import MastodonAsset
import MastodonLocalization
class AccountWarningNotificationCell: UITableViewCell {
public static let reuseIdentifier = "AccountWarningNotificationCell"
@ -69,19 +70,19 @@ extension Mastodon.Entity.AccountWarning.Action {
var description: String {
switch self {
case .none:
return "Your account has received a moderation warning."
return L10n.Scene.Notification.Warning.none
case .disable:
return "Your account has been disabled."
return L10n.Scene.Notification.Warning.disable
case .markStatusesAsSensitive:
return "Some of your posts have been marked as sensitive."
return L10n.Scene.Notification.Warning.markStatusesAsSensitive
case .deleteStatuses:
return "Some of your posts have been removed."
return L10n.Scene.Notification.Warning.deleteStatuses
case .sensitive:
return "Your posts will be marked as sensitive from now on."
return L10n.Scene.Notification.Warning.sensitive
case .silence:
return "Your account has been limited."
return L10n.Scene.Notification.Warning.silence
case .suspend:
return "Your account has been suspended."
return L10n.Scene.Notification.Warning.suspend
}
}
}

View File

@ -909,6 +909,22 @@ public enum L10n {
/// Mentions
public static let mentions = L10n.tr("Localizable", "Scene.Notification.Title.Mentions", fallback: "Mentions")
}
public enum Warning {
/// Some of your posts have been removed.
public static let deleteStatuses = L10n.tr("Localizable", "Scene.Notification.Warning.DeleteStatuses", fallback: "Some of your posts have been removed.")
/// Your account has been disabled.
public static let disable = L10n.tr("Localizable", "Scene.Notification.Warning.Disable", fallback: "Your account has been disabled.")
/// Some of your posts have been marked as sensitive.
public static let markStatusesAsSensitive = L10n.tr("Localizable", "Scene.Notification.Warning.MarkStatusesAsSensitive", fallback: "Some of your posts have been marked as sensitive.")
/// Your account has received a moderation warning.
public static let `none` = L10n.tr("Localizable", "Scene.Notification.Warning.None", fallback: "Your account has received a moderation warning.")
/// Your posts will be marked as sensitive from now on.
public static let sensitive = L10n.tr("Localizable", "Scene.Notification.Warning.Sensitive", fallback: "Your posts will be marked as sensitive from now on.")
/// Your account has been limited.
public static let silence = L10n.tr("Localizable", "Scene.Notification.Warning.Silence", fallback: "Your account has been limited.")
/// Your account has been suspended.
public static let suspend = L10n.tr("Localizable", "Scene.Notification.Warning.Suspend", fallback: "Your account has been suspended.")
}
}
public enum Preview {
public enum Keyboard {

View File

@ -323,6 +323,13 @@ uploaded to Mastodon.";
"Scene.Notification.NotificationDescription.RequestToFollowYou" = "request to follow you";
"Scene.Notification.Title.Everything" = "Everything";
"Scene.Notification.Title.Mentions" = "Mentions";
"Scene.Notification.Warning.DeleteStatuses" = "Some of your posts have been removed.";
"Scene.Notification.Warning.Disable" = "Your account has been disabled.";
"Scene.Notification.Warning.MarkStatusesAsSensitive" = "Some of your posts have been marked as sensitive.";
"Scene.Notification.Warning.None" = "Your account has received a moderation warning.";
"Scene.Notification.Warning.Sensitive" = "Your posts will be marked as sensitive from now on.";
"Scene.Notification.Warning.Silence" = "Your account has been limited.";
"Scene.Notification.Warning.Suspend" = "Your account has been suspended.";
"Scene.Preview.Keyboard.ClosePreview" = "Close Preview";
"Scene.Preview.Keyboard.ShowNext" = "Show Next";
"Scene.Preview.Keyboard.ShowPrevious" = "Show Previous";