Skip to content

Commit

Permalink
update text
Browse files Browse the repository at this point in the history
  • Loading branch information
ccen-stripe committed Apr 21, 2023
1 parent 331879a commit c288218
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@
/* Instructional text for scanning a passport */
"Position your passport in the center of the frame" = "Position your passport in the center of the frame";

/* Label text for previewing user experience */
"Preview user experience" = "Preview user experience";

/* Proceed button text */
"Proceed" = "Proceed";

/* Explains the usages of preview user experience */
"Proceed to preview as an end user. Information provided will not be verified." = "Proceed to preview as an end user. Information provided will not be verified.";

/* Button text displayed to the user to retake photo */
"Retake Photos" = "Retake Photos";

Expand Down Expand Up @@ -178,12 +187,21 @@
/* When selected in an action sheet, opens the device's camera interface */
"Take Photo" = "Take Photo";

/* Title to terminate mobile SDK flow in test mode */
"Terminate mobile SDK flow" = "Terminate mobile SDK flow";

/* Explains how terminate works. Don't translate Completed, Cancelled and Failed. */
"Terminate mobile SDK flow locally with Completed, Cancelled or Failed without changing the verification session on server." = "Terminate mobile SDK flow locally with Completed, Cancelled or Failed without changing the verification session on server.";

/* Text for message of warning alert */
"The images of your identity document have not been saved. Do you want to leave?" = "The images of your identity document have not been saved. Do you want to leave?";

/* Error text displayed to the user when the device's camera is not available */
"There was an error accessing the camera." = "There was an error accessing the camera.";

/* Explains the usages of test mode screen. */
"This page is only shown in testmode." = "This page is only shown in testmode.";

/* Button to attempt to re-scan identity document image */
"Try Again" = "Try Again";

Expand Down Expand Up @@ -230,6 +248,9 @@
/* Line 2 of error text displayed to the user if we could not scan a high quality image of the user's identity document in a reasonable amount of time and manually uploading a file is allowed */
"You can either try again or upload an image from your device." = "You can either try again or upload an image from your device.";

/* Title of test mode screen */
"You're currently in testmode" = "You're currently in testmode";

/* Text for message of warning alert */
"Your selfie images have not been saved. Do you want to leave?" = "Your selfie images have not been saved. Do you want to leave?";

Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,55 @@ extension String.Localized {
"Error text displayed to the user when the device's camera is not available"
)
}

// MARK: - Debug View
static var testModeTitle: String {
STPLocalizedString(
"You're currently in testmode",
"Title of test mode screen"
)
}

static var testModeContent: String {
STPLocalizedString(
"This page is only shown in testmode.",
"Explains the usages of test mode screen."
)
}

static var finishMobileFlow: String {
STPLocalizedString(
"Terminate mobile SDK flow",
"Title to terminate mobile SDK flow in test mode"
)
}

static var finishMobileFlowDetails: String {
STPLocalizedString(
"Terminate mobile SDK flow locally with Completed, Cancelled or Failed without changing the verification session on server.",
"Explains how terminate works. Don't translate Completed, Cancelled and Failed."
)
}

static var previewUserExperience: String {
STPLocalizedString(
"Preview user experience",
"Label text for previewing user experience"
)
}

static var previewUserExperienceDetails: String {
STPLocalizedString(
"Proceed to preview as an end user. Information provided will not be verified.",
"Explains the usages of preview user experience"
)
}

static var proceed: String {
STPLocalizedString(
"Proceed",
"Proceed button text"
)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// Created by Chen Cen on 4/18/23.
//

@_spi(STP) import StripeCore
@_spi(STP) import StripeUICore
import UIKit

Expand Down Expand Up @@ -71,15 +73,15 @@ class DebugView: UIView {
])

let titleFirstLine = UILabel()
titleFirstLine.text = "You're currently in testmode"
titleFirstLine.text = .Localized.testModeTitle
titleFirstLine.adjustsFontForContentSizeCategory = true
titleFirstLine.font = sectionTitleFont

let titleSecondLine = UILabel()
titleSecondLine.numberOfLines = 0
titleSecondLine.adjustsFontForContentSizeCategory = true
titleSecondLine.font = sectionContentFont
titleSecondLine.text = "This page is only shown in testmode."
titleSecondLine.text = .Localized.testModeContent

let titleTextVstack = UIStackView(arrangedSubviews: [titleFirstLine, titleSecondLine])
titleTextVstack.axis = .vertical
Expand Down Expand Up @@ -116,13 +118,13 @@ class DebugView: UIView {
let finishMobileFlowFirstLine = UILabel()
finishMobileFlowFirstLine.numberOfLines = 0
finishMobileFlowFirstLine.font = sectionTitleFont
finishMobileFlowFirstLine.text = "Terminate mobile SDK flow"
finishMobileFlowFirstLine.text = .Localized.finishMobileFlow
vStack.addArrangedSubview(finishMobileFlowFirstLine)

let finishMobileFlowSecondLine = UILabel()
finishMobileFlowSecondLine.numberOfLines = 0
finishMobileFlowSecondLine.font = sectionContentFont
finishMobileFlowSecondLine.text = "Terminate mobile SDK flow locally with Completed, Cancelled or Failed without changing the verification session on server."
finishMobileFlowSecondLine.text = .Localized.finishMobileFlowDetails
vStack.addArrangedSubview(finishMobileFlowSecondLine)

vStack.addArrangedSubview(
Expand Down Expand Up @@ -152,21 +154,21 @@ class DebugView: UIView {

private func configurePreviewUserExperienceSection() {
let previewFirstLine = UILabel()
previewFirstLine.text = "Preview user experience"
previewFirstLine.text = .Localized.previewUserExperience
previewFirstLine.numberOfLines = 0
previewFirstLine.font = sectionTitleFont
vStack.addArrangedSubview(previewFirstLine)

let previewSecondLine = UILabel()
previewSecondLine.text = "Proceed to preview as an end user. Information provided will not be verified."
previewSecondLine.text = .Localized.previewUserExperienceDetails
previewSecondLine.numberOfLines = 0
previewSecondLine.font = sectionContentFont
vStack.addArrangedSubview(previewFirstLine)
vStack.addArrangedSubview(previewSecondLine)

vStack.addArrangedSubview(
Button(
title: "Preview",
title: .Localized.proceed,
target: self,
action: #selector(didTapPreview(button:))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import Foundation

@testable import StripeIdentity
import iOSSnapshotTestCase
@testable import StripeIdentity

final class DebugViewControllerSnapshotTest: FBSnapshotTestCase {

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c288218

Please sign in to comment.