Skip to content

Commit

Permalink
fix: added different resources for sign up
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill committed Feb 12, 2024
1 parent 00eca54 commit 7b1a6d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ internal fun SocialAuthView(
) {
Column(modifier = modifier) {
if (isGoogleAuthEnabled) {
val stringRes = if (isSignIn) {
R.string.auth_google
} else {
R.string.auth_continue_google
}
OpenEdXOutlinedButton(
modifier = Modifier
.testTag("btn_google_auth")
Expand All @@ -57,12 +62,17 @@ internal fun SocialAuthView(
modifier = Modifier
.testTag("txt_google_auth")
.padding(start = 10.dp),
text = stringResource(id = R.string.auth_google)
text = stringResource(id = stringRes)
)
}
}
}
if (isFacebookAuthEnabled) {
val stringRes = if (isSignIn) {
R.string.auth_facebook
} else {
R.string.auth_continue_facebook
}
OpenEdXButton(
width = Modifier
.testTag("btn_facebook_auth")
Expand All @@ -85,12 +95,17 @@ internal fun SocialAuthView(
.testTag("txt_facebook_auth")
.padding(start = 10.dp),
color = MaterialTheme.appColors.buttonText,
text = stringResource(id = R.string.auth_facebook)
text = stringResource(id = stringRes)
)
}
}
}
if (isMicrosoftAuthEnabled) {
val stringRes = if (isSignIn) {
R.string.auth_microsoft
} else {
R.string.auth_continue_microsoft
}
OpenEdXButton(
width = Modifier
.testTag("btn_microsoft_auth")
Expand Down
3 changes: 3 additions & 0 deletions auth/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<string name="auth_google" tools:ignore="ExtraTranslation">Sign in with Google</string>
<string name="auth_facebook" tools:ignore="ExtraTranslation">Sign in with Facebook</string>
<string name="auth_microsoft" tools:ignore="ExtraTranslation">Sign in with Microsoft</string>
<string name="auth_continue_google" tools:ignore="ExtraTranslation">Continue with Google</string>
<string name="auth_continue_facebook" tools:ignore="ExtraTranslation">Continue with Facebook</string>
<string name="auth_continue_microsoft" tools:ignore="ExtraTranslation">Continue with Microsoft</string>
<string name="auth_social_signed_title" translatable="false">You\'ve successfully signed in with %s.</string>
<string name="auth_social_signed_desc" translatable="false">We just need a little more information before you start learning with %s.</string>
</resources>

0 comments on commit 7b1a6d7

Please sign in to comment.