Skip to content

Translations for auth #771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ android {
signingConfig signingConfigs.debug
}
}

lintOptions {
disable 'MissingTranslation'
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:supportsRtl="false"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".ChooserActivity">
Expand Down
4 changes: 4 additions & 0 deletions auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ android {
}
}
}

lintOptions {
disable 'UnusedQuantity', 'TypographyEllipsis', 'TypographyQuotes'
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.net.Uri;
import android.support.annotation.ColorInt;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat;
Expand Down Expand Up @@ -45,14 +46,12 @@ public void setPreamble(TextView textView) {
}

private void setupCreateAccountPreamble() {
int preambleType = getPreambleType();
if (preambleType == -1) {
String withTargets = getPreambleStringWithTargets();
if (withTargets == null) {
return;
}

String[] preambles =
mContext.getResources().getStringArray(R.array.create_account_preamble);
mBuilder = new SpannableStringBuilder(preambles[preambleType]);
mBuilder = new SpannableStringBuilder(withTargets);

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

/**
* 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
* PP <p>-1 means we have neither
*/
private int getPreambleType() {
int preambleType;

@Nullable
private String getPreambleStringWithTargets() {
boolean hasTos = !TextUtils.isEmpty(mFlowParameters.termsOfServiceUrl);
boolean hasPp = !TextUtils.isEmpty(mFlowParameters.privacyPolicyUrl);

if (hasTos && hasPp) {
preambleType = 0;
return mContext.getString(R.string.create_account_preamble_tos_and_pp,
BTN_TARGET, TOS_TARGET, PP_TARGET);
} else if (hasTos) {
preambleType = 1;
return mContext.getString(R.string.create_account_preamble_tos_only,
BTN_TARGET, TOS_TARGET);
} else if (hasPp) {
preambleType = 2;
return mContext.getString(R.string.create_account_preamble_pp_only,
BTN_TARGET, PP_TARGET);
} else {
preambleType = -1;
return null;
}

return preambleType;
}

private class CustomTabsSpan extends ClickableSpan {
Expand Down
74 changes: 74 additions & 0 deletions auth/src/main/res/values-b+es+419/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="progress_dialog_loading" translation_description="Loading text in dialog">Cargando…</string>
<string name="sign_in_default" translation_description="Button text to sign in">Acceder</string>
<string name="general_error" translation_description="Toast text flashing general error">Ocurrió un error.</string>
<string name="idp_name_google">Google</string>
<string name="idp_name_facebook">Facebook</string>
<string name="idp_name_twitter">Twitter</string>
<string name="provider_name_email">Correo electrónico</string>
<string name="provider_name_phone">Teléfono</string>
<string name="sign_in_with_google" translation_description="Sign in button text">Acceder con Google</string>
<string name="sign_in_with_facebook" translation_description="Sign in button text">Acceder con Facebook</string>
<string name="sign_in_with_twitter" translation_description="Sign in button text">Acceder con Twitter</string>
<string name="sign_in_with_email" translation_description="Sign in button text">Acceder con el correo electrónico</string>
<string name="sign_in_with_phone" translation_description="Sign in button text">Acceder con el teléfono</string>
<string name="next_default" translation_description="Button text to continue">Siguiente</string>
<string name="email_hint" translation_description="Hint in email input field">Correo electrónico</string>
<string name="phone_hint" translation_description="Hint for phone input field">Número de teléfono</string>
<string name="password_hint" translation_description="Hint for password input field">Contraseña</string>
<string name="required_field" translation_description="Inline error for required field">Este campo no puede estar en blanco.</string>
<string name="invalid_email_address" translation_description="Inline error for invalid email address">La dirección de correo electrónico es incorrecta</string>
<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>
<string name="progress_dialog_checking_accounts" translation_description="Progress dialog text while checking for existing accounts">Buscando cuentas existentes…</string>
<string name="title_register_email" translation_description="Title for signup form">Registrarse</string>
<string name="name_hint" translation_description="Hint for last name input field">Nombre y apellido</string>
<string name="button_text_save" translation_description="Button text to save input form">Guardar</string>
<string name="progress_dialog_signing_up" translation_description="Dialog text while waiting for server's signup response">Registrando…</string>
<plurals name="error_weak_password" translation_description="Inline error for weak password">
<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>
<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>
</plurals>
<string name="email_account_creation_error" translation_description="Inline error for signup failure">No se pudo registrar la cuenta de correo electrónico</string>
<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>
<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>
<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>
<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>
<string name="terms_of_service" translation_description="Link text to web url containing the app's terms of service">Condiciones del servicio</string>
<string name="privacy_policy" translation_description="Link text to web url containing the app's privacy policy">Política de privacidad</string>
<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>
<string name="welcome_back_email_header" translation_description="Message for returning users">¡Te damos la bienvenida nuevamente!</string>
<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>
<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>
<string name="progress_dialog_signing_in" translation_description="Progress dialog text">Accediendo…</string>
<string name="trouble_signing_in" translation_description="Link leading to forgot password flow">¿Tienes problemas para acceder?</string>
<string name="title_recover_password_activity" translation_description="Recover password screen title">Recuperar contraseña</string>
<string name="title_confirm_recover_password" translation_description="Password recovery confirmation message">Revisa tu correo electrónico</string>
<string name="password_recovery_body" translation_description="Password recovery message body">Recibe un correo electrónico con instrucciones para cambiar la contraseña.</string>
<string name="button_text_send" translation_description="Button text to send recovery email">Enviar</string>
<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>
<string name="progress_dialog_sending" translation_description="Progress dialog while password recovery email is being sent">Enviando…</string>
<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>
<string name="accessibility_logo" translation_description="Content description for app logo">Logotipo de la app</string>
<string name="signed_in_with_specific_account" translation_description="Post signin message showing method of authentication">Accediste como %1$s</string>
<string name="verify_phone_number_title" translation_description="Phone number entry form title">Ingresa tu número de teléfono</string>
<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>
<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>
<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>
<string name="verify_your_phone_title" translation_description="Button text to complete phone number verification">Verifica tu número de teléfono</string>
<string name="verifying" translation_description="Progress dialog text while phone number is being verified">Verificando…</string>
<string name="retrieving_sms" translation_description="Progress dialog text when sms is being retrieved before auto-submit">Recuperando SMS…</string>
<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>
<string name="incorrect_code_dialog_positive_button_text" translation_description="Text to dismiss error alert dialog">Aceptar</string>
<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>
<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>
<string name="error_session_expired" translation_description="Error message when SMS confirmation code has expired.">Este código ya no es válido</string>
<string name="sign_in_with_phone_number" translation_description="Label for phone number input form">Acceder con el número de teléfono</string>
<string name="done" translation_description="Progress dialog success transition once sms is sent">Listo</string>
<string name="verified" translation_description="Progress dialog success transition when phone number was verified">¡Verificado!</string>
<string name="code_sent" translation_description="Progress dialog success transition once sms is sent">Se envió el código.</string>
<string name="resending" translation_description="Progress dialog text when user clicks on resend sms">Reenviando…</string>
<string name="resend_code" translation_description="Link text to resend verification sms">Reenviar código</string>
<string name="verify_phone_number" translation_description="Button text to submit confirmation code and complete phone verification">Verificar número de teléfono</string>
<string name="continue_phone_login" translation_description="Button text to submit phone number and send sms">Continuar</string>
<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>
</resources>
Loading