Skip to content

Commit ac71879

Browse files
ashwinraghavsamtstern
authored andcommitted
Translations for auth (#771)
1 parent 226808b commit ac71879

File tree

94 files changed

+6354
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+6354
-29
lines changed

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ android {
2323
signingConfig signingConfigs.debug
2424
}
2525
}
26+
27+
lintOptions {
28+
disable 'MissingTranslation'
29+
}
2630
}
2731

2832
dependencies {

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
android:allowBackup="true"
1414
android:fullBackupContent="true"
1515
android:icon="@mipmap/ic_launcher"
16-
android:supportsRtl="false"
16+
android:supportsRtl="true"
1717
android:theme="@style/AppTheme"
1818
tools:ignore="GoogleAppIndexingWarning">
1919
<activity android:name=".ChooserActivity">

auth/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ android {
3434
}
3535
}
3636
}
37+
38+
lintOptions {
39+
disable 'UnusedQuantity', 'TypographyEllipsis', 'TypographyQuotes'
40+
}
3741
}
3842

3943
dependencies {

auth/src/main/java/com/firebase/ui/auth/ui/email/PreambleHandler.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.Context;
44
import android.net.Uri;
55
import android.support.annotation.ColorInt;
6+
import android.support.annotation.Nullable;
67
import android.support.annotation.StringRes;
78
import android.support.customtabs.CustomTabsIntent;
89
import android.support.v4.content.ContextCompat;
@@ -45,14 +46,12 @@ public void setPreamble(TextView textView) {
4546
}
4647

4748
private void setupCreateAccountPreamble() {
48-
int preambleType = getPreambleType();
49-
if (preambleType == -1) {
49+
String withTargets = getPreambleStringWithTargets();
50+
if (withTargets == null) {
5051
return;
5152
}
5253

53-
String[] preambles =
54-
mContext.getResources().getStringArray(R.array.create_account_preamble);
55-
mBuilder = new SpannableStringBuilder(preambles[preambleType]);
54+
mBuilder = new SpannableStringBuilder(withTargets);
5655

5756
replaceTarget(BTN_TARGET, mButtonText);
5857
replaceUrlTarget(TOS_TARGET, R.string.terms_of_service, mFlowParameters.termsOfServiceUrl);
@@ -79,27 +78,23 @@ private void replaceUrlTarget(String target, @StringRes int replacementRes, Stri
7978
}
8079
}
8180

82-
/**
83-
* 0 means we have both a TOS and a PP <p>1 means we only have a TOS <p>2 means we only have a
84-
* PP <p>-1 means we have neither
85-
*/
86-
private int getPreambleType() {
87-
int preambleType;
88-
81+
@Nullable
82+
private String getPreambleStringWithTargets() {
8983
boolean hasTos = !TextUtils.isEmpty(mFlowParameters.termsOfServiceUrl);
9084
boolean hasPp = !TextUtils.isEmpty(mFlowParameters.privacyPolicyUrl);
9185

9286
if (hasTos && hasPp) {
93-
preambleType = 0;
87+
return mContext.getString(R.string.create_account_preamble_tos_and_pp,
88+
BTN_TARGET, TOS_TARGET, PP_TARGET);
9489
} else if (hasTos) {
95-
preambleType = 1;
90+
return mContext.getString(R.string.create_account_preamble_tos_only,
91+
BTN_TARGET, TOS_TARGET);
9692
} else if (hasPp) {
97-
preambleType = 2;
93+
return mContext.getString(R.string.create_account_preamble_pp_only,
94+
BTN_TARGET, PP_TARGET);
9895
} else {
99-
preambleType = -1;
96+
return null;
10097
}
101-
102-
return preambleType;
10398
}
10499

105100
private class CustomTabsSpan extends ClickableSpan {
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
2+
<string name="progress_dialog_loading" translation_description="Loading text in dialog">Cargando…</string>
3+
<string name="sign_in_default" translation_description="Button text to sign in">Acceder</string>
4+
<string name="general_error" translation_description="Toast text flashing general error">Ocurrió un error.</string>
5+
<string name="idp_name_google">Google</string>
6+
<string name="idp_name_facebook">Facebook</string>
7+
<string name="idp_name_twitter">Twitter</string>
8+
<string name="provider_name_email">Correo electrónico</string>
9+
<string name="provider_name_phone">Teléfono</string>
10+
<string name="sign_in_with_google" translation_description="Sign in button text">Acceder con Google</string>
11+
<string name="sign_in_with_facebook" translation_description="Sign in button text">Acceder con Facebook</string>
12+
<string name="sign_in_with_twitter" translation_description="Sign in button text">Acceder con Twitter</string>
13+
<string name="sign_in_with_email" translation_description="Sign in button text">Acceder con el correo electrónico</string>
14+
<string name="sign_in_with_phone" translation_description="Sign in button text">Acceder con el teléfono</string>
15+
<string name="next_default" translation_description="Button text to continue">Siguiente</string>
16+
<string name="email_hint" translation_description="Hint in email input field">Correo electrónico</string>
17+
<string name="phone_hint" translation_description="Hint for phone input field">Número de teléfono</string>
18+
<string name="password_hint" translation_description="Hint for password input field">Contraseña</string>
19+
<string name="required_field" translation_description="Inline error for required field">Este campo no puede estar en blanco.</string>
20+
<string name="invalid_email_address" translation_description="Inline error for invalid email address">La dirección de correo electrónico es incorrecta</string>
21+
<string name="missing_email_address" translation_description="Inline error for empty email address in input field">Ingresa tu dirección de correo electrónico para continuar</string>
22+
<string name="progress_dialog_checking_accounts" translation_description="Progress dialog text while checking for existing accounts">Buscando cuentas existentes…</string>
23+
<string name="title_register_email" translation_description="Title for signup form">Registrarse</string>
24+
<string name="name_hint" translation_description="Hint for last name input field">Nombre y apellido</string>
25+
<string name="button_text_save" translation_description="Button text to save input form">Guardar</string>
26+
<string name="progress_dialog_signing_up" translation_description="Dialog text while waiting for server's signup response">Registrando…</string>
27+
<plurals name="error_weak_password" translation_description="Inline error for weak password">
28+
<item quantity="one">La contraseña no es lo suficientemente segura. Usa al menos %1$d carácter y una combinación de letras y números</item>
29+
<item quantity="other">La contraseña no es lo suficientemente segura. Usa al menos %1$d caracteres y una combinación de letras y números</item>
30+
</plurals>
31+
<string name="email_account_creation_error" translation_description="Inline error for signup failure">No se pudo registrar la cuenta de correo electrónico</string>
32+
<string name="error_user_collision" translation_description="Inline error when user signs up using an existing email account">Ya existe una cuenta con esa dirección de correo electrónico.</string>
33+
<string name="create_account_preamble_tos_and_pp" translation_description="Text shown when creating an account with both terms of service and privacy policy.">Si presionas %1$s, indicas que aceptas las %2$s y la %3$s.</string>
34+
<string name="create_account_preamble_tos_only" translation_description="Text shown when creating an account with only terms of service">Si presionas %1$s, indicas que aceptas las %2$s.</string>
35+
<string name="create_account_preamble_pp_only" translation_description="Text shown when creating an account with only privacy policy">Si presionas %1$s, indicas que aceptas la %2$s.</string>
36+
<string name="terms_of_service" translation_description="Link text to web url containing the app's terms of service">Condiciones del servicio</string>
37+
<string name="privacy_policy" translation_description="Link text to web url containing the app's privacy policy">Política de privacidad</string>
38+
<string name="welcome_back_idp_header" translation_description="Inline subtitle to users whose signup was interrupted since an existing account was detected">Ya tienes una cuenta</string>
39+
<string name="welcome_back_email_header" translation_description="Message for returning users">¡Te damos la bienvenida nuevamente!</string>
40+
<string name="welcome_back_idp_prompt" translation_description="Message to users that need to signin using existing IDP accounts">Ya usaste %1$s. Accede con %2$s para continuar.</string>
41+
<string name="welcome_back_password_prompt_body" translation_description="Message to users that need to signin using existing email accounts">Ya usaste %1$s para acceder. Ingresa la contraseña correspondiente.</string>
42+
<string name="progress_dialog_signing_in" translation_description="Progress dialog text">Accediendo…</string>
43+
<string name="trouble_signing_in" translation_description="Link leading to forgot password flow">¿Tienes problemas para acceder?</string>
44+
<string name="title_recover_password_activity" translation_description="Recover password screen title">Recuperar contraseña</string>
45+
<string name="title_confirm_recover_password" translation_description="Password recovery confirmation message">Revisa tu correo electrónico</string>
46+
<string name="password_recovery_body" translation_description="Password recovery message body">Recibe un correo electrónico con instrucciones para cambiar la contraseña.</string>
47+
<string name="button_text_send" translation_description="Button text to send recovery email">Enviar</string>
48+
<string name="confirm_recovery_body" translation_description="Alert dialog displayed after password recovery email is sent">Sigue las instrucciones que se enviaron a %1$s para recuperar la contraseña.</string>
49+
<string name="progress_dialog_sending" translation_description="Progress dialog while password recovery email is being sent">Enviando…</string>
50+
<string name="error_email_does_not_exist" translation_description="Inline error when user attempt signin with invalid account">La dirección de correo electrónico no coincide con una cuenta existente.</string>
51+
<string name="accessibility_logo" translation_description="Content description for app logo">Logotipo de la app</string>
52+
<string name="signed_in_with_specific_account" translation_description="Post signin message showing method of authentication">Accediste como %1$s</string>
53+
<string name="verify_phone_number_title" translation_description="Phone number entry form title">Ingresa tu número de teléfono</string>
54+
<string name="invalid_phone_number" translation_description="Inline error when phone number entered is invalid">Ingresa un número de teléfono válido</string>
55+
<string name="enter_confirmation_code" translation_description="Phone number verification code entry form title">Ingresa el código de 6 dígitos que enviamos al número</string>
56+
<string name="resend_code_in" translation_description="Countdown timer text that the user needs to wait for before attempting to resend verification sms">Se reenviará el código en 0:%02d</string>
57+
<string name="verify_your_phone_title" translation_description="Button text to complete phone number verification">Verifica tu número de teléfono</string>
58+
<string name="verifying" translation_description="Progress dialog text while phone number is being verified">Verificando…</string>
59+
<string name="retrieving_sms" translation_description="Progress dialog text when sms is being retrieved before auto-submit">Recuperando SMS…</string>
60+
<string name="incorrect_code_dialog_body" translation_description="Inline error when incorrect sms verification code is being used to verify">Código incorrecto. Vuelve a intentarlo.</string>
61+
<string name="incorrect_code_dialog_positive_button_text" translation_description="Text to dismiss error alert dialog">Aceptar</string>
62+
<string name="error_too_many_attempts" translation_description="Error message when the phone number has been used too many times">Este número de teléfono se usó demasiadas veces</string>
63+
<string name="error_quota_exceeded" translation_description="Error message when the Firebase project's quota has been exceeded.">Ocurrió un problema durante la verificación de tu número de teléfono</string>
64+
<string name="error_session_expired" translation_description="Error message when SMS confirmation code has expired.">Este código ya no es válido</string>
65+
<string name="sign_in_with_phone_number" translation_description="Label for phone number input form">Acceder con el número de teléfono</string>
66+
<string name="done" translation_description="Progress dialog success transition once sms is sent">Listo</string>
67+
<string name="verified" translation_description="Progress dialog success transition when phone number was verified">¡Verificado!</string>
68+
<string name="code_sent" translation_description="Progress dialog success transition once sms is sent">Se envió el código.</string>
69+
<string name="resending" translation_description="Progress dialog text when user clicks on resend sms">Reenviando…</string>
70+
<string name="resend_code" translation_description="Link text to resend verification sms">Reenviar código</string>
71+
<string name="verify_phone_number" translation_description="Button text to submit confirmation code and complete phone verification">Verificar número de teléfono</string>
72+
<string name="continue_phone_login" translation_description="Button text to submit phone number and send sms">Continuar</string>
73+
<string name="sms_terms_of_service" translation_description="Fine print warning displayed below Verify Phone Number button">Si presionas “%1$s”, es posible que se envíe un SMS. Podrían aplicarse las tarifas de mensajes y datos.</string>
74+
</resources>

0 commit comments

Comments
 (0)