Add Mullvad provider

This commit is contained in:
Davide De Rosa 2019-03-21 11:13:32 +01:00
parent 2dd26ae72a
commit 54f7779c45
5 changed files with 11 additions and 1 deletions

View File

@ -59,6 +59,9 @@ class AccountViewController: UIViewController, TableModelHost {
case .tunnelBear:
guidance = V.Infrastructure.tunnelbear
case .mullvad:
guidance = V.Infrastructure.mullvad
}
if guidance != nil {

View File

@ -132,6 +132,7 @@
//"account.cells.password_confirm.mismatch" = "Passwords don't match!";
"account.suggestion_footer.infrastructure.pia" = "Use your website credentials. Your username is usually numeric with a \"p\" prefix.";
"account.suggestion_footer.infrastructure.tunnelbear" = "Use your website credentials. Your username is usually your email.";
"account.suggestion_footer.infrastructure.mullvad" = "Use your website account number and password \"m\".";
"account.suggestion_footer.referral" = "Don't have an account? Tap here to get one.";
"endpoint.sections.location_addresses.header" = "Addresses";

View File

@ -32,6 +32,8 @@ public struct Infrastructure: Codable {
case tunnelBear = "TunnelBear"
case mullvad = "Mullvad"
public var webName: String {
return rawValue.lowercased()
}

View File

@ -55,9 +55,11 @@ public class InfrastructureFactory {
public static let shared = InfrastructureFactory()
// manually pre-sorted
public let allNames: [Infrastructure.Name] = [
.mullvad,
.pia,
.tunnelBear
.tunnelBear,
]
private let bundle: [Infrastructure.Name: Infrastructure]

View File

@ -84,6 +84,8 @@ public enum L10n {
/// Don't have an account? Tap here to get one.
public static let referral = L10n.tr("Localizable", "account.suggestion_footer.referral")
public enum Infrastructure {
/// Use your website account number and password "m".
public static let mullvad = L10n.tr("Localizable", "account.suggestion_footer.infrastructure.mullvad")
/// Use your website credentials. Your username is usually numeric with a "p" prefix.
public static let pia = L10n.tr("Localizable", "account.suggestion_footer.infrastructure.pia")
/// Use your website credentials. Your username is usually your email.