summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsajacl <sajaclvishkai@gmail.com>2022-12-20 10:55:24 +0100
committersajacl <sajaclvishkai@gmail.com>2022-12-20 14:43:07 +0100
commit84a53c537a172e21427043bd08140bca19a21de7 (patch)
tree406802e49b19a9b578e74b65afc646d1cb9730fc
parenta7934561ca64f37a42f4cf8e2ff4273322ddb739 (diff)
downloadmullvadvpn-84a53c537a172e21427043bd08140bca19a21de7.tar.xz
mullvadvpn-84a53c537a172e21427043bd08140bca19a21de7.zip
Change texts related to redeem voucher.
-rw-r--r--ios/MullvadVPN/OutOfTimeContentView.swift20
-rw-r--r--ios/MullvadVPN/OutOfTimeViewController.swift24
2 files changed, 23 insertions, 21 deletions
diff --git a/ios/MullvadVPN/OutOfTimeContentView.swift b/ios/MullvadVPN/OutOfTimeContentView.swift
index e4146902c0..aef959730c 100644
--- a/ios/MullvadVPN/OutOfTimeContentView.swift
+++ b/ios/MullvadVPN/OutOfTimeContentView.swift
@@ -29,15 +29,8 @@ class OutOfTimeContentView: UIView {
return label
}()
- lazy var bodyLabel: UILabel = {
+ private lazy var bodyLabel: UILabel = {
let label = UILabel()
- label.text = NSLocalizedString(
- "OUT_OF_TIME_BODY",
- tableName: "OutOfTime",
- value: "You have no more VPN time left on this account. Either buy credit on our website or redeem a voucher.",
- comment: ""
- )
- label.font = UIFont.systemFont(ofSize: 17)
label.textColor = .white
label.numberOfLines = 0
return label
@@ -111,11 +104,9 @@ class OutOfTimeContentView: UIView {
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
-}
-// MARK: - Private Functions
+ // MARK: - Private Functions
-private extension OutOfTimeContentView {
func setUpSubviews() {
addSubview(topStackView)
addSubview(bottomStackView)
@@ -144,4 +135,11 @@ private extension OutOfTimeContentView {
),
])
}
+
+ func setBodyLabelText(_ text: String) {
+ bodyLabel.attributedText = NSAttributedString(
+ markdownString: text,
+ font: UIFont.systemFont(ofSize: 17)
+ )
+ }
}
diff --git a/ios/MullvadVPN/OutOfTimeViewController.swift b/ios/MullvadVPN/OutOfTimeViewController.swift
index 1de9fde687..65ea02069c 100644
--- a/ios/MullvadVPN/OutOfTimeViewController.swift
+++ b/ios/MullvadVPN/OutOfTimeViewController.swift
@@ -140,18 +140,22 @@ class OutOfTimeViewController: UIViewController, RootContainment {
contentView.disconnectButton.alpha = tunnelState.isSecured ? 1 : 0
if tunnelState.isSecured {
- contentView.bodyLabel.text = NSLocalizedString(
- "OUT_OF_TIME_BODY_CONNECTED",
- tableName: "OutOfTime",
- value: "You have no more VPN time left on this account. To add more, you will need to disconnect and access the Internet with an unsecure connection.",
- comment: ""
+ contentView.setBodyLabelText(
+ NSLocalizedString(
+ "OUT_OF_TIME_BODY_CONNECTED",
+ tableName: "OutOfTime",
+ value: "You have no more VPN time left on this account. To add more, you will need to disconnect and access the Internet with an unsecure connection.",
+ comment: ""
+ )
)
} else {
- contentView.bodyLabel.text = NSLocalizedString(
- "OUT_OF_TIME_BODY_DISCONNECTED",
- tableName: "OutOfTime",
- value: "You have no more VPN time left on this account. Either buy credit on our website or redeem a voucher.",
- comment: ""
+ contentView.setBodyLabelText(
+ NSLocalizedString(
+ "OUT_OF_TIME_BODY_DISCONNECTED",
+ tableName: "OutOfTime",
+ value: "You have no more VPN time left on this account. Either buy credit on our website or make an in-app purchase via the **Add 30 days time** button below.",
+ comment: ""
+ )
)
}