Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/wise-masks-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws-amplify/ui": patch
---

Fix/bobbor/i18n texts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ describe('authenticatorTextUtil', () => {

expect(
authenticatorTextUtil.getDeliveryMessageText(codeDeliveryDetails)
).toEqual(
'Your code is on the way. To log in, enter the code we sent you. It may take a minute to arrive.'
);
).toEqual('Your code is on the way. It may take a minute to arrive.');
});
});

Expand Down
24 changes: 9 additions & 15 deletions packages/ui/src/helpers/authenticator/textUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ const getDeliveryMessageText = (
const arrivalMessage = translate(DefaultTexts.CODE_ARRIVAL);

if (!(isEmailMessage || isTextMessage)) {
return `${translate(DefaultTexts.CODE_SENT)}. ${arrivalMessage}.`;
return translate(DefaultTexts.DELIVERY_MESSAGE_UNKNOWN, { arrivalMessage });
}

const instructionMessage = isEmailMessage
? translate(DefaultTexts.CODE_EMAILED)
: translate(DefaultTexts.CODE_TEXTED);
const key = isEmailMessage
? DefaultTexts.DELIVERY_MESSAGE_EMAIL
: DefaultTexts.DELIVERY_MESSAGE_PHONE;

return `${instructionMessage} ${Destination}. ${arrivalMessage}.`;
return translate(key, { destination: Destination, arrivalMessage });
};

const getDeliveryMethodText = (
Expand Down Expand Up @@ -181,13 +181,9 @@ export const authenticatorTextUtil = {

/** SetupTotp */
getSetupTotpText: () => translate(DefaultTexts.SETUP_TOTP),
// TODO: add defaultText for below
getSetupTotpInstructionsText: () =>
translate(
'Copy and paste the secret key below into an authenticator app and then enter the code in the text field below.'
),
// TODO: add defaultText for "COPIED"
getCopiedText: () => translate('COPIED'),
translate(DefaultTexts.SETUP_TOTP_INSTRUCTIONS),
getCopiedText: () => translate(DefaultTexts.COPIED),

/** FederatedSignIn */
getSignInWithFederationText,
Expand Down Expand Up @@ -232,8 +228,6 @@ export const authenticatorTextUtil = {
getUsernameLabelByLoginMechanism,

/** Validations */
// TODO: add defaultText
getInvalidEmailText: () => translate('Please enter a valid email'),
// TODO: add defaultText
getRequiredFieldText: () => translate('This field is required'),
getInvalidEmailText: () => translate(DefaultTexts.INVALID_EMAIL),
getRequiredFieldText: () => translate(DefaultTexts.FIELD_REQUIRED),
} as const; // using `as const` so that keys are strongly typed
9 changes: 9 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ export const deDict: AuthenticatorDictionary = {
'Ihr Bestätigungscode ist unterwegs. Um sich einzuloggen geben Sie den Code ein, den wir per E-Mail verschickt haben',
'Your code is on the way. To log in, enter the code we sent you':
'Ihr Code ist unterwegs. Um sich anzumelden, geben Sie den Code ein, den wir Ihnen gesendet haben',
'Your code is on the way. To log in, enter the code we sent you.':
'Ihr Code ist unterwegs. Um sich anzumelden, geben Sie den Code ein, den wir Ihnen gesendet haben.',
'Your code is on the way. To log in, enter the code we texted to':
'Ihr Bestätigungscode ist unterwegs. Um sich einzuloggen geben Sie den Code ein, den wir per SMS verschickt haben',
'Your code is on the way. {arrivalMessage}':
'Ihr Code ist unterwegs. Um sich anzumelden, geben Sie den Code ein, den wir Ihnen gesendet haben. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'Ihr Bestätigungscode ist unterwegs. Um sich einzuloggen geben Sie den Code ein, den wir per E-Mail verschickt haben {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'Ihr Bestätigungscode ist unterwegs. Um sich einzuloggen geben Sie den Code ein, den wir per SMS verschickt haben {destination}. {arrivalMessage}',

// Additional translations provided by customers
'An account with the given email already exists.':
Expand Down Expand Up @@ -118,5 +126,6 @@ export const deDict: AuthenticatorDictionary = {
'Sign Up': 'Registrieren',
'User already exists': 'Dieser Benutzer existiert bereits',
'User does not exist': 'Dieser Benutzer existiert nicht',
'User does not exist.': 'Dieser Benutzer existiert nicht',
'Username cannot be empty': 'Benutzername darf nicht leer sein',
};
16 changes: 14 additions & 2 deletions packages/ui/src/i18n/dictionaries/authenticator/defaultTexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ export const defaultTexts = {
CHANGE_PASSWORD: 'Change Password',
CHANGING_PASSWORD: 'Changing',
CODE: 'Code',
CODE_ARRIVAL: 'It may take a minute to arrive',
CODE_ARRIVAL: 'It may take a minute to arrive.',
CODE_EMAILED:
'Your code is on the way. To log in, enter the code we emailed to',
CODE_SENT: 'Your code is on the way. To log in, enter the code we sent you',
CODE_SENT: 'Your code is on the way. To log in, enter the code we sent you.',
CODE_TEXTED:
'Your code is on the way. To log in, enter the code we texted to',
DELIVERY_MESSAGE_UNKNOWN: 'Your code is on the way. {arrivalMessage}',
DELIVERY_MESSAGE_EMAIL:
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}',
DELIVERY_MESSAGE_PHONE:
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}',
CONFIRM_PASSWORD: 'Confirm Password',
CONFIRM_PASSWORD_PLACEHOLDER: 'Please confirm your Password',
CONFIRM_RESET_PASSWORD_HEADING: 'Reset your Password',
Expand All @@ -24,6 +29,7 @@ export const defaultTexts = {
CONFIRM: 'Confirm',
CONFIRMATION_CODE: 'Confirmation Code',
CONFIRMING: 'Confirming',
COPIED: 'COPIED',
CONTINUE: 'Continue',
CONTINUE_WITHOUT_PASSKEY: 'Continue without a Passkey',
CREATE_ACCOUNT: 'Create Account',
Expand All @@ -50,10 +56,12 @@ export const defaultTexts = {
ENTER_USERNAME_FIRST: 'Please enter your username first',
EXISTING_PASSKEYS: 'Existing Passkeys',
FAMILY_NAME: 'Family Name',
FIELD_REQUIRED: 'This field is required',
GIVEN_NAME: 'Given Name',
FORGOT_PASSWORD: 'Forgot Password?',
FORGOT_YOUR_PASSWORD: 'Forgot your password?',
HIDE_PASSWORD: 'Hide password',
INVALID_EMAIL: 'Please enter a valid email',
LOADING: 'Loading',
LOGIN_NAME: 'Username',
MIDDLE_NAME: 'Middle Name',
Expand Down Expand Up @@ -85,6 +93,8 @@ export const defaultTexts = {
RESET_PASSWORD: 'Reset Password',
SEND_CODE: 'Send code',
CODE_DELIVERY_FAILED: 'Unable to send verification code. Please try again.',
CONFIGURATION_ERROR:
'Configuration error (see console) - please contact the administrator',
VERIFICATION_CODE_EXPIRED:
'Your verification code has expired. Please request a new code.',
VERIFICATION_CODE_INVALID:
Expand All @@ -94,6 +104,8 @@ export const defaultTexts = {
SETUP_ANOTHER_PASSKEY: 'Setup another Passkey',
SETUP_EMAIL: 'Setup Email',
SETUP_TOTP: 'Setup TOTP',
SETUP_TOTP_INSTRUCTIONS:
'Copy and paste the secret key below into an authenticator app and then enter the code in the text field below.',
SHOW_PASSWORD: 'Show password',
SIGN_IN_BUTTON: 'Sign in',
SIGN_IN_TAB: 'Sign In',
Expand Down
9 changes: 9 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const enDict: AuthenticatorDictionary = {
'Forgot your password?': 'Forgot your password?',
'Hide password': 'Hide password',
'It may take a minute to arrive': 'It may take a minute to arrive',
'It may take a minute to arrive.': 'It may take a minute to arrive.',
Loading: 'Loading',
'Multi-Factor Authentication': 'Multi-Factor Authentication',
'Multi-Factor Authentication Setup': 'Multi-Factor Authentication Setup',
Expand Down Expand Up @@ -82,6 +83,14 @@ export const enDict: AuthenticatorDictionary = {
'Your code is on the way. To log in, enter the code we emailed to',
'Your code is on the way. To log in, enter the code we sent you':
'Your code is on the way. To log in, enter the code we sent you',
'Your code is on the way. To log in, enter the code we sent you.':
'Your code is on the way. To log in, enter the code we sent you.',
'Your code is on the way. To log in, enter the code we texted to':
'Your code is on the way. To log in, enter the code we texted to',
'Your code is on the way. {arrivalMessage}':
'Your code is on the way. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}',
};
12 changes: 12 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const esDict: AuthenticatorDictionary = {
'Forgot your password?': '¿Olvidó su contraseña?',
'Hide password': 'Ocultar contraseña',
'It may take a minute to arrive': 'Es posible que tarde un minuto en llegar',
'It may take a minute to arrive.':
'Es posible que tarde un minuto en llegar.',
Loading: 'Cargando',
'Multi-Factor Authentication': 'Autenticación multifactor',
'Multi-Factor Authentication Setup':
Expand Down Expand Up @@ -74,8 +76,16 @@ export const esDict: AuthenticatorDictionary = {
'El código está en camino. Para iniciar sesión, escriba el código que hemos enviado por correo electrónico a',
'Your code is on the way. To log in, enter the code we sent you':
'El código está en camino. Para iniciar sesión, escriba el código que le hemos enviado',
'Your code is on the way. To log in, enter the code we sent you.':
'El código está en camino. Para iniciar sesión, escriba el código que le hemos enviado.',
'Your code is on the way. To log in, enter the code we texted to':
'El código está en camino. Para iniciar sesión, escriba el código que hemos enviado por mensaje de texto a',
'Your code is on the way. {arrivalMessage}':
'El código está en camino. Para iniciar sesión, escriba el código que le hemos enviado. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'El código está en camino. Para iniciar sesión, escriba el código que hemos enviado por correo electrónico a {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'El código está en camino. Para iniciar sesión, escriba el código que hemos enviado por mensaje de texto a {destination}. {arrivalMessage}',

// Additional translations provided by customers
'An account with the given email already exists.':
Expand All @@ -85,6 +95,7 @@ export const esDict: AuthenticatorDictionary = {
'Forgot Password': 'Olvidé mi contraseña',
'Incorrect username or password.':
'Nombre de usuario o contraseña incorrecta',
'Incorrect username or password': 'Nombre de usuario o contraseña incorrecta',
'Enter your Family Name': 'Escriba su apellido',
'Enter your Given Name': 'Escriba su nombre',
'Given Name': 'Nombre',
Expand All @@ -104,6 +115,7 @@ export const esDict: AuthenticatorDictionary = {
'Sign Up': 'Crear cuenta',
'User already exists': 'El usuario ya existe',
'User does not exist.': 'El usuario no existe',
'User does not exist': 'El usuario no existe',
'Username/client id combination not found.': 'El usuario no existe',
'Username cannot be empty': 'El nombre de usuario no puede estar vacío',
'Your passwords must match': 'Las contraseñas deben coincidir',
Expand Down
8 changes: 8 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const frDict: AuthenticatorDictionary = {
'We Sent A Code': 'Nous avons envoyé un code',
'We Texted You': 'Nous vous avons envoyé un SMS',
'Your code is on the way. To log in, enter the code we sent you': `Votre code est en cours d'envoi. Pour vous connecter, saisissez le code que nous vous avons envoyé`,
'Your code is on the way. To log in, enter the code we sent you.': `Votre code est en cours d'envoi. Pour vous connecter, saisissez le code que nous vous avons envoyé.`,

// Additional translations provided by customers
'Add your Profile': 'Ajoutez votre profil',
Expand Down Expand Up @@ -119,13 +120,20 @@ export const frDict: AuthenticatorDictionary = {
SMS: 'SMS',
'User already exists': "L'utilisateur existe déjà",
'User does not exist.': "L'utilisateur n'existe pas",
'User does not exist': "L'utilisateur n'existe pas",
'Username cannot be empty': "Le nom d'utilisateur doit être renseigné",
'Username/client id combination not found.': "L'utilisateur n'existe pas",
'We Emailed You': 'Nous vous avons envoyé un code',
'Your code is on the way. To log in, enter the code we emailed to':
'Votre code est en route. Pour vous connecter entrez le code reçu sur cette adresse email',
'Your code is on the way. To log in, enter the code we texted to':
'Votre code est en route. Pour vous connecter entrez le code reçu sur ce numéro de téléphone',
'Your code is on the way. {arrivalMessage}':
"Votre code est en cours d'envoi. Pour vous connecter, saisissez le code que nous vous avons envoyé. {arrivalMessage}",
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'Votre code est en route. Pour vous connecter entrez le code reçu sur cette adresse email {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'Votre code est en route. Pour vous connecter entrez le code reçu sur ce numéro de téléphone {destination}. {arrivalMessage}',
'Your passwords must match': 'Vos mots de passe doivent être identiques',
'It may take a minute to arrive.': 'Cela peut prendre quelques minutes.',
Website: 'Site web',
Expand Down
9 changes: 9 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export const huDict: AuthenticatorDictionary = {
'Text Message (SMS)': 'SMS üzenet',
'User already exists': 'A felhasználó már létezik',
'User does not exist': 'Felhasználó nem található',
'User does not exist.': 'Felhasználó nem található',
'User is disabled.': 'A felhasználó le van tiltva.',
Username: 'Felhasználónév',
'Username cannot be empty': 'A felhasználónév mező nem lehet üres',
Expand All @@ -150,7 +151,15 @@ export const huDict: AuthenticatorDictionary = {
'A bejelentkezéshez szükséges kód küldése folyamatban van, amelyet a következő e-mail címre küldtünk:',
'Your code is on the way. To log in, enter the code we sent you':
'A bejelentkezéshez szükséges kód küldése folyamatban van',
'Your code is on the way. To log in, enter the code we sent you.':
'A bejelentkezéshez szükséges kód küldése folyamatban van.',
'Your code is on the way. To log in, enter the code we texted to':
'A bejelentkezéshez szükséges kód küldése folyamatban van, amelyet SMS-ben küldtünk a következő számra:',
'Your code is on the way. {arrivalMessage}':
'A bejelentkezéshez szükséges kód küldése folyamatban van. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'A bejelentkezéshez szükséges kód küldése folyamatban van, amelyet a következő e-mail címre küldtünk: {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'A bejelentkezéshez szükséges kód küldése folyamatban van, amelyet SMS-ben küldtünk a következő számra: {destination}. {arrivalMessage}',
'Your passwords must match': 'A jelszavaknak meg kell egyezniük',
};
10 changes: 10 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const idDict: AuthenticatorDictionary = {
'We Texted You': 'Kami mengirim SMS kepada Anda',
'Your code is on the way. To log in, enter the code we sent you':
'Kode Anda segera hadir. Untuk masuk, masukkan kode yang kami kirimkan kepada Anda',
'Your code is on the way. To log in, enter the code we sent you.':
'Kode Anda segera hadir. Untuk masuk, masukkan kode yang kami kirimkan kepada Anda.',

// Additional translations provided by customers
'An account with the given email already exists.':
Expand All @@ -81,6 +83,7 @@ export const idDict: AuthenticatorDictionary = {
'Have an account? ': 'Sudah punya akun? ',
Hello: 'Halo',
'Incorrect username or password.': 'Nama akun atau kata sandi salah.',
'Incorrect username or password': 'Nama akun atau kata sandi salah.',
'Invalid phone number format': 'Nomor telepon tidak sesuai dengan format.',
'Invalid verification code provided, please try again.':
'Kode verifikasi tidak sesuai, mohon coba lagi.',
Expand All @@ -102,6 +105,7 @@ export const idDict: AuthenticatorDictionary = {
SMS: 'SMS',
'User already exists': 'Akun sudah terdaftar',
'User does not exist.': 'Akun tidak terdaftar.',
'User does not exist': 'Akun tidak terdaftar.',
'User is disabled.': 'Akun dinonaktifkan.',
'Username cannot be empty': 'Nama akun tidak boleh kosong',
'Username/client id combination not found.':
Expand All @@ -111,5 +115,11 @@ export const idDict: AuthenticatorDictionary = {
'Kode anda dalam pengiriman. Untuk masuk, masukkan kode yang kami emailkan ke',
'Your code is on the way. To log in, enter the code we texted to':
'Kode anda dalam pengiriman. Untuk masuk, masukkan kode yang kami tuliskan ke',
'Your code is on the way. {arrivalMessage}':
'Kode Anda segera hadir. Untuk masuk, masukkan kode yang kami kirimkan kepada Anda. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
'Kode anda dalam pengiriman. Untuk masuk, masukkan kode yang kami emailkan ke {destination}. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'Kode anda dalam pengiriman. Untuk masuk, masukkan kode yang kami tuliskan ke {destination}. {arrivalMessage}',
'Your passwords must match': 'Kata sandi harus sama',
};
11 changes: 11 additions & 0 deletions packages/ui/src/i18n/dictionaries/authenticator/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const itDict: AuthenticatorDictionary = {
'Hide password': 'Nascondi password',
'It may take a minute to arrive':
"L'arrivo potrebbe richiedere qualche minuto",
'It may take a minute to arrive.':
"L'arrivo potrebbe richiedere qualche minuto.",
Loading: 'Caricamento in corso',
'Multi-Factor Authentication': 'Autenticazione a più fattori',
'Multi-Factor Authentication Setup':
Expand Down Expand Up @@ -70,8 +72,16 @@ export const itDict: AuthenticatorDictionary = {
"Il codice è in arrivo. Per effettuare l'accesso, immetti il codice che ti abbiamo inviato via e-mail",
'Your code is on the way. To log in, enter the code we sent you':
'Il codice è in arrivo. Per accedere, immetti il codice che ti abbiamo inviato',
'Your code is on the way. To log in, enter the code we sent you.':
'Il codice è in arrivo. Per accedere, immetti il codice che ti abbiamo inviato.',
'Your code is on the way. To log in, enter the code we texted to':
'Il codice è in arrivo. Per accedere, immetti il codice che abbiamo inviato tramite SMS',
'Your code is on the way. {arrivalMessage}':
'Il codice è in arrivo. Per accedere, immetti il codice che ti abbiamo inviato. {arrivalMessage}',
'Your code is on the way. To log in, enter the code we emailed to {destination}. {arrivalMessage}':
"Il codice è in arrivo. Per effettuare l'accesso, immetti il codice che ti abbiamo inviato via e-mail {destination}. {arrivalMessage}",
'Your code is on the way. To log in, enter the code we texted to {destination}. {arrivalMessage}':
'Il codice è in arrivo. Per accedere, immetti il codice che abbiamo inviato tramite SMS {destination}. {arrivalMessage}',

// Additional translations provided by customers
'An account with the given email already exists.':
Expand All @@ -96,5 +106,6 @@ export const itDict: AuthenticatorDictionary = {
'Sign Up': 'Registrati',
'User already exists': 'Utente già esistente',
'User does not exist': 'Utente inesistente',
'User does not exist.': 'Utente inesistente',
'Username cannot be empty': 'Il nome utente non può essere vuoto',
};
Loading
Loading