Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
}
public enum Notifications {
/// Selecting this setting will share your account ID and unique phone identifiers with a notification service run by the xx network team. However, these details are obfuscated via an #ID collision system# when you receive a notification. As a result, both the notifications service and your notifications provider (Firebase on Android, Apple on iOS) cannot tell exactly when you receive a message.
public static let subtitle = Localized.tr("Localizable", "settings.infoPopUp.notifications.subtitle")
/// Notifications
public static let title = Localized.tr("Localizable", "settings.infoPopUp.notifications.title")
}
public enum Privacy {
/// Because xx messenger does not capture your personal data or save your private keys, we will not be able to, at this time, help new users recover their account in case of being locked out, changing devices, etc. Account recovery support that continues to protect your privacy and personal data will be coming soon.
public static let subtitle = Localized.tr("Localizable", "settings.infoPopUp.privacy.subtitle")
/// Please note
public static let title = Localized.tr("Localizable", "settings.infoPopUp.privacy.title")
}
public enum Traffic {
/// Cover Traffic hides when you are sending messages by randomly sending messages to random users. Other user’s phones will pick up these messages but they will not see them or know you sent them. As a result, it not only hides when you send messages, but helps hide who you are talking to. #Read more about it#
public static let subtitle = Localized.tr("Localizable", "settings.infoPopUp.traffic.subtitle")
/// Cover Traffic
public static let title = Localized.tr("Localizable", "settings.infoPopUp.traffic.title")
}
}
public enum Popup {
/// %@ will be opened using your default browser
public static func subtitle(_ p1: Any) -> String {
return Localized.tr("Localizable", "settings.popup.subtitle", String(describing: p1))
}
/// Do you want to open %@?
public static func title(_ p1: Any) -> String {
return Localized.tr("Localizable", "settings.popup.title", String(describing: p1))
}
}
public enum RemoteNotifications {
/// Enable remote push notifications.
public static let description = Localized.tr("Localizable", "settings.remoteNotifications.description")
/// Push Notifications
public static let title = Localized.tr("Localizable", "settings.remoteNotifications.title")
}
public enum Traffic {
/// Enable cover traffic
public static let subtitle = Localized.tr("Localizable", "settings.traffic.subtitle")
/// Cover Traffic
public static let title = Localized.tr("Localizable", "settings.traffic.title")
}
}
public enum Shared {
/// Done
public static let done = Localized.tr("Localizable", "shared.done")
/// #No internet connection.# Connect to a network to continue receiving messages.
public static let networkIssue = Localized.tr("Localizable", "shared.networkIssue")
/// #Your request failed#
public static let requestFailed = Localized.tr("Localizable", "shared.requestFailed")
/// Resend
public static let resend = Localized.tr("Localizable", "shared.resend")
public enum Search {
/// Search
public static let placeholder = Localized.tr("Localizable", "shared.search.placeholder")
}
}
public enum Validator {
public enum Code {
/// Code length should be at least 4 chars
public static let minimum = Localized.tr("Localizable", "validator.code.minimum")
}
public enum Email {
/// The email provided is invalid
public static let invalid = Localized.tr("Localizable", "validator.email.invalid")
/// ^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
public static let regex = Localized.tr("Localizable", "validator.email.regex")
}
public enum Phone {
/// Phone length should be maximum 32 chars
public static let maximum = Localized.tr("Localizable", "validator.phone.maximum")
/// Phone length should be at least 4 chars
public static let minimum = Localized.tr("Localizable", "validator.phone.minimum")
/// This phone format doesn't fit the country
public static let regexIssue = Localized.tr("Localizable", "validator.phone.regexIssue")
}
public enum Username {
/// Character requirement met
public static let approved = Localized.tr("Localizable", "validator.username.approved")
/// Username can't be empty
public static let empty = Localized.tr("Localizable", "validator.username.empty")
/// The username provided contains one or more forbidden chars
public static let invalid = Localized.tr("Localizable", "validator.username.invalid")
/// Max character limit reached.
public static let maximum = Localized.tr("Localizable", "validator.username.maximum")
/// Username must be at least 4 characters
public static let minimum = Localized.tr("Localizable", "validator.username.minimum")
/// ^[a-zA-Z0-9][a-zA-Z0-9_\-+@.#]*[a-zA-Z0-9]$
public static let regex = Localized.tr("Localizable", "validator.username.regex")
/// Username must start and end with alphanumeric characters
public static let startEnd = Localized.tr("Localizable", "validator.username.startEnd")
}
}
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
// MARK: - Implementation Details
extension Localized {
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = BundleToken.bundle.localizedString(forKey: key, value: nil, table: table)
return String(format: format, locale: Locale.current, arguments: args)
}
}
// swiftlint:disable convenience_type
private final class BundleToken {
static let bundle: Bundle = {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
}
// swiftlint:enable convenience_type