Skip to content

Commit

Permalink
fix: add missing localization string resources (aws-amplify#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
phantumcode authored and devedup committed Sep 12, 2023
1 parent 2c2885c commit aeaf744
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,62 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/amplify-swift",
"state" : {
"revision" : "0f6e7bbf7be9eed3eb3925f095b3c35f7c1f8414",
"version" : "2.8.0"
"revision" : "5268948fdd0323bb5ef2a487c36d4b64b2a31c83",
"version" : "2.12.0"
}
},
{
"identity" : "amplify-swift-utils-notifications",
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/amplify-swift-utils-notifications.git",
"state" : {
"revision" : "d4fd3c17e8d40efc821f448d3d6cff75b8f3b0dd",
"version" : "1.0.0"
"revision" : "f970384ad1035732f99259255cd2f97564807e41",
"version" : "1.1.0"
}
},
{
"identity" : "amplify-ui-swift-liveness",
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/amplify-ui-swift-liveness",
"state" : {
"revision" : "42207fd456b23e03cd72243f982340cfa1d1c205",
"version" : "1.0.0"
"revision" : "4e0fc1781c8c67d02d23a818b5eea2e81fc3b5fa",
"version" : "1.0.1"
}
},
{
"identity" : "aws-appsync-realtime-client-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git",
"state" : {
"revision" : "3de274c68a3cb60c8aec18b5bc0a8c07860219cd",
"version" : "3.0.0"
"revision" : "b036e83716789c13a3480eeb292b70caa54114f2",
"version" : "3.1.0"
}
},
{
"identity" : "aws-crt-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/awslabs/aws-crt-swift",
"state" : {
"revision" : "afe23a2a2f6cf78e6d8803d7c9e0c8e6f50b6915",
"version" : "0.4.0"
"revision" : "6feec6c3787877807aa9a00fad09591b96752376",
"version" : "0.6.1"
}
},
{
"identity" : "aws-sdk-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/awslabs/aws-sdk-swift.git",
"state" : {
"revision" : "30649be4b9d0788f987ae851c48d48ac6d00f2c2",
"version" : "0.6.1"
"revision" : "24bae88a2391fe75da8a940a544d1ef6441f5321",
"version" : "0.13.0"
}
},
{
"identity" : "smithy-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/awslabs/smithy-swift",
"state" : {
"revision" : "3e9e420f69c28dee260c03b19c3e93b392128d42",
"version" : "0.6.1"
"revision" : "7b28da158d92cd06a3549140d43b8fbcf64a94a6",
"version" : "0.15.0"
}
},
{
Expand Down Expand Up @@ -104,8 +104,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/MaxDesiatov/XMLCoder.git",
"state" : {
"revision" : "666227de3b4cf4adcce7c70b8b89f98c7df02754",
"version" : "0.16.0"
"revision" : "b1e944cbd0ef33787b13f639a5418d55b3bed501",
"version" : "0.17.1"
}
}
],
Expand Down
2 changes: 2 additions & 0 deletions Sources/FaceLiveness/Resources/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"amplify_ui_liveness_get_ready_lighting" = "Move to a well-lit place that is not in direct sunlight.";
"amplify_ui_liveness_get_ready_fit_face" = "When an oval appears, fill the oval with your face within 7 seconds.";
"amplify_ui_liveness_get_ready_begin_check" = "Begin Check";
"amplify_ui_liveness_get_ready_good_fit_example" = "Good fit";
"amplify_ui_liveness_get_ready_too_far_example" = "Too far";

"amplify_ui_liveness_challenge_recording_indicator_label" = "REC";
"amplify_ui_liveness_challenge_instruction_hold_face_during_countdown" = "Hold face position during countdown.";
Expand Down
10 changes: 10 additions & 0 deletions Sources/FaceLiveness/Utilities/LocalizedStringKey+Liveness.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,14 @@ extension LocalizedStringKey {
"amplify_ui_liveness_close_button_a11y"
)

/// en = "Good fit"
static let get_ready_good_fit_example = LocalizedStringKey(
"amplify_ui_liveness_get_ready_good_fit_example"
)

/// en = "Too far"
static let get_ready_too_far_example = LocalizedStringKey(
"amplify_ui_liveness_get_ready_too_far_example"
)

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct OvalIllustrationExamples: View {
HStack(spacing: 16) {
OvalIllustrationView(
icon: .checkmark(backgroundColor: .hex("#365E3D")),
text: "Good fit",
text: { Text(.get_ready_good_fit_example, bundle: .module) },
primaryColor: .hex("#365E3D"),
secondaryColor: .hex("#D6F5DB"),
illustration: { Image("illustration_face_good_fit", bundle: .module) }
Expand All @@ -22,7 +22,7 @@ struct OvalIllustrationExamples: View {

OvalIllustrationView(
icon: .xmark(backgroundColor: .hex("#660000")),
text: "Too far",
text: { Text(.get_ready_too_far_example, bundle: .module) },
primaryColor: .hex("#660000"),
secondaryColor: .hex("#F5BCBC"),
illustration: { Image("illustration_face_too_far", bundle: .module) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Amplify

struct OvalIllustrationView<Illustration: View>: View {
let icon: OvalIllustrationIconView
let text: String
let text: () -> Text
let primaryColor: Color
let secondaryColor: Color
let illustration: () -> Illustration
Expand All @@ -22,7 +22,7 @@ struct OvalIllustrationView<Illustration: View>: View {
illustration()
.border(primaryColor, width: 0.8)

Text(text)
text()
.bold()
.foregroundColor(primaryColor)
.padding(4)
Expand Down
2 changes: 1 addition & 1 deletion Sources/FaceLiveness/Views/RecordingButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct RecordingButton: View {
Circle()
.foregroundColor(.hex("#F92626"))
.frame(width: 17, height: 17)
Text("REC")
Text(.challenge_recording_indicator_label, bundle: .module)
.font(.system(size: 12))
.fontWeight(.bold)
}
Expand Down

0 comments on commit aeaf744

Please sign in to comment.