Skip to content

Commit c356e05

Browse files
authored
fix: add missing localization string resources (#37)
1 parent 4d3a6a8 commit c356e05

File tree

6 files changed

+33
-21
lines changed

6 files changed

+33
-21
lines changed

HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/FaceLiveness/Resources/Base.lproj/Localizable.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"amplify_ui_liveness_get_ready_lighting" = "Move to a well-lit place that is not in direct sunlight.";
1818
"amplify_ui_liveness_get_ready_fit_face" = "When an oval appears, fill the oval with your face within 7 seconds.";
1919
"amplify_ui_liveness_get_ready_begin_check" = "Begin Check";
20+
"amplify_ui_liveness_get_ready_good_fit_example" = "Good fit";
21+
"amplify_ui_liveness_get_ready_too_far_example" = "Too far";
2022

2123
"amplify_ui_liveness_challenge_recording_indicator_label" = "REC";
2224
"amplify_ui_liveness_challenge_instruction_hold_face_during_countdown" = "Hold face position during countdown.";

Sources/FaceLiveness/Utilities/LocalizedStringKey+Liveness.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,14 @@ extension LocalizedStringKey {
158158
"amplify_ui_liveness_close_button_a11y"
159159
)
160160

161+
/// en = "Good fit"
162+
static let get_ready_good_fit_example = LocalizedStringKey(
163+
"amplify_ui_liveness_get_ready_good_fit_example"
164+
)
165+
166+
/// en = "Too far"
167+
static let get_ready_too_far_example = LocalizedStringKey(
168+
"amplify_ui_liveness_get_ready_too_far_example"
169+
)
170+
161171
}

Sources/FaceLiveness/Views/GetReadyPage/OvalIllustrationExamples.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct OvalIllustrationExamples: View {
1212
HStack(spacing: 16) {
1313
OvalIllustrationView(
1414
icon: .checkmark(backgroundColor: .hex("#365E3D")),
15-
text: "Good fit",
15+
text: { Text(.get_ready_good_fit_example, bundle: .module) },
1616
primaryColor: .hex("#365E3D"),
1717
secondaryColor: .hex("#D6F5DB"),
1818
illustration: { Image("illustration_face_good_fit", bundle: .module) }
@@ -22,7 +22,7 @@ struct OvalIllustrationExamples: View {
2222

2323
OvalIllustrationView(
2424
icon: .xmark(backgroundColor: .hex("#660000")),
25-
text: "Too far",
25+
text: { Text(.get_ready_too_far_example, bundle: .module) },
2626
primaryColor: .hex("#660000"),
2727
secondaryColor: .hex("#F5BCBC"),
2828
illustration: { Image("illustration_face_too_far", bundle: .module) }

Sources/FaceLiveness/Views/GetReadyPage/OvalIllustrationView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Amplify
1010

1111
struct OvalIllustrationView<Illustration: View>: View {
1212
let icon: OvalIllustrationIconView
13-
let text: String
13+
let text: () -> Text
1414
let primaryColor: Color
1515
let secondaryColor: Color
1616
let illustration: () -> Illustration
@@ -22,7 +22,7 @@ struct OvalIllustrationView<Illustration: View>: View {
2222
illustration()
2323
.border(primaryColor, width: 0.8)
2424

25-
Text(text)
25+
text()
2626
.bold()
2727
.foregroundColor(primaryColor)
2828
.padding(4)

Sources/FaceLiveness/Views/RecordingButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct RecordingButton: View {
1313
Circle()
1414
.foregroundColor(.hex("#F92626"))
1515
.frame(width: 17, height: 17)
16-
Text("REC")
16+
Text(.challenge_recording_indicator_label, bundle: .module)
1717
.font(.system(size: 12))
1818
.fontWeight(.bold)
1919
}

0 commit comments

Comments
 (0)