Skip to content

Commit be92fe2

Browse files
committed
updating email entry copy to include the current homeserver
1 parent d8d0d6f commit be92fe2

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthEmailEntryFragment.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ import android.os.Bundle
2020
import android.view.LayoutInflater
2121
import android.view.View
2222
import android.view.ViewGroup
23+
import im.vector.app.R
2324
import im.vector.app.core.extensions.associateContentStateWith
2425
import im.vector.app.core.extensions.autofillEmail
2526
import im.vector.app.core.extensions.clearErrorOnChange
2627
import im.vector.app.core.extensions.content
2728
import im.vector.app.core.extensions.isEmail
2829
import im.vector.app.core.extensions.setOnImeDoneListener
30+
import im.vector.app.core.extensions.toReducedUrl
2931
import im.vector.app.databinding.FragmentFtueEmailInputBinding
3032
import im.vector.app.features.onboarding.OnboardingAction
33+
import im.vector.app.features.onboarding.OnboardingViewState
3134
import im.vector.app.features.onboarding.RegisterAction
3235
import org.matrix.android.sdk.api.auth.registration.RegisterThreePid
3336
import javax.inject.Inject
@@ -56,6 +59,10 @@ class FtueAuthEmailEntryFragment @Inject constructor() : AbstractFtueAuthFragmen
5659
viewModel.handle(OnboardingAction.PostRegisterAction(RegisterAction.AddThreePid(RegisterThreePid.Email(email))))
5760
}
5861

62+
override fun updateWithState(state: OnboardingViewState) {
63+
views.emailEntryHeaderSubtitle.text = getString(R.string.ftue_auth_email_subtitle, state.selectedHomeserver.userFacingUrl.toReducedUrl())
64+
}
65+
5966
override fun onError(throwable: Throwable) {
6067
views.emailEntryInput.error = errorFormatter.toHumanReadable(throwable)
6168
}

vector/src/main/res/layout/fragment_ftue_email_input.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
android:layout_height="wrap_content"
7171
android:layout_marginTop="8dp"
7272
android:gravity="center"
73-
android:text="@string/ftue_auth_email_subtitle"
7473
android:textColor="?vctr_content_secondary"
7574
app:layout_constraintBottom_toTopOf="@id/titleContentSpacing"
7675
app:layout_constraintEnd_toEndOf="@id/emailEntryGutterEnd"

vector/src/main/res/values/donottranslate.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<string name="ftue_auth_choose_server_title">Select your server</string>
2424
<string name="ftue_auth_choose_server_subtitle">What is the address of your server? This is like a home for all your data</string>
2525
<string name="ftue_auth_choose_server_entry_hint">Server URL</string>
26-
<string name="ftue_auth_choose_server_entry_footer">You can only connect to a server that has already been set up</string>
2726
<string name="ftue_auth_choose_server_ems_title">Want to host your own server?</string>
2827

2928
<string name="ftue_auth_choose_server_ems_subtitle">Element Matrix Services (EMS) is a robust and reliable hosting service for fast, secure and real time communication. Find out how on <a href="${ftue_ems_url}">element.io/ems</a></string>
@@ -32,9 +31,10 @@
3231
<string name="ftue_auth_terms_title">Privacy policy</string>
3332
<string name="ftue_auth_terms_subtitle">Please read through T&amp;C. You must accept in order to continue.</string>
3433

35-
<string name="ftue_auth_email_title">Enter your email address</string>
36-
<string name="ftue_auth_email_subtitle">This will help verify your account and enables password recovery.</string>
37-
<string name="ftue_auth_email_entry_title">Email Address</string>
34+
<string name="ftue_auth_email_title">Enter your email</string>
35+
<!-- Note for translators, %s is the homeserver name, eg matrix.org -->
36+
<string name="ftue_auth_email_subtitle">%s needs to verify your account</string>
37+
<string name="ftue_auth_email_entry_title">Email</string>
3838
<string name="ftue_auth_phone_title">Enter your phone number</string>
3939
<string name="ftue_auth_phone_subtitle">This will help verify your account and enables password recovery.</string>
4040
<string name="ftue_auth_phone_entry_title">Phone Number</string>
@@ -55,7 +55,7 @@
5555

5656
<string name="ftue_auth_email_verification_title">Check your email to verify.</string>
5757
<!-- Note for translators, %s is the users email address -->
58-
<string name="ftue_auth_email_verification_subtitle">To confirm your email address, tap the button in the email we just sent to %s</string>
58+
<string name="ftue_auth_email_verification_subtitle">To confirm your email, tap the button in the email we just sent to %s</string>
5959
<string name="ftue_auth_email_verification_footer">Did not receive an email?</string>
6060
<string name="ftue_auth_email_resend_email">Resend email</string>
6161
<string name="ftue_auth_forgot_password">Forgot password</string>

0 commit comments

Comments
 (0)