aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.42k stars 2.12k forks source link

Translations are consistent or complete #3849

Closed moneyatbo closed 3 years ago

moneyatbo commented 5 years ago

Describe the bug Looking at /packages/aws-amplify-react-native/src/AmplifyI18n.js ./packages/aws-amplify-react/src/AmplifyI18n.js the translations are not consistent in both implementations and the Spanish translation does include all key/value pairs To Reproduce Steps to reproduce the behavior:

  1. diff ./packages/aws-amplify-react-native/src/AmplifyI18n.js ./packages/aws-amplify-react/src/AmplifyI18n.js

Expected behavior Except in cases where there are any specific needs for mobile or web the translations should be the same and the key/pairs should be complete for every language.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

diff ./packages/aws-amplify-react-native/src/AmplifyI18n.js ./packages/aws-amplify-react/src/AmplifyI18n.js


 2c2
 <  * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 ---
 >  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 16d15
 <         'Loading...': "Lädt...",
 67d65
 <         'Loading...': "S'il vous plaît, attendez",
 117d114
 <         'Loading...': "Espere por favor",
 151,152c148
 <     'it': {
 <         "Loading": "Caricamento in corso",
 ---
 >     'it': {    
  155c151
 <          "Back to Sign In": "Torna alla Login",
 ---
 >         "Back to Sign In": "Torna alla Accesso",
 200d195
 <         'Loading...': "请稍候",

Spanish has 29 items where Italian has over 40 ` 'es': { 'Loading...': "Espere por favor", 'Sign In': "Registrarse", 'Sign Up': "Regístrate", 'Sign Out': "Desconectar", 'Forgot Password': "Se te olvidó tu contraseña", 'Username': "Nombre de usuario", 'Password': "Contraseña", 'Change Password': "Cambia la contraseña", 'New Password': "Nueva contraseña", 'Email': "Email", 'Phone Number': "Número de teléfono", 'Confirm a Code': "Confirmar un código", 'Confirm Sign In': "Confirmar inicio de sesión", 'Confirm Sign Up': "Confirmar Registrarse", 'Back to Sign In': "Volver a Iniciar sesión", 'Send Code': "Enviar código", 'Confirm': "Confirmar", 'Resend a Code': "Reenviar un código", 'Submit': "Enviar", 'Skip': "Omitir", 'Verify': "Verificar", 'Verify Contact': "Verificar contacto", 'Code': "Código", 'Account recovery requires verified contact information': 'User does not exist': "el usuario no existe", 'User already exists': "El usuario ya existe", 'Incorrect username or password': "Nombre de usuario o contraseña incorrecta", 'Invalid password format': "Formato de contraseña inválido", 'Invalid phone number format':

` Sample code Include additional sample code or a sample repository to help us reproduce the issue. (Be sure to remove any sensitive data)

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

jordanranz commented 5 years ago

This is due to contributions from the community being made over time to improve individual languages. The i18n module is extendable if your solution requires an additional set of these translations. In the meantime I can mark this as a feature request to synchronize all of the base i18n translations.

artemkv commented 4 years ago

Hi, while testing the localization, I discovered extra strings that were not present in AmplifyI18n.tsx (https://github.com/aws-amplify/amplify-js/blob/master/packages/aws-amplify-react/src/AmplifyI18n.tsx):

        'The following fields need to be filled out: Email': '...',
        'The following fields need to be filled out: Email, Password': '...',
        'The following fields need to be filled out: Password': '...',
        'Custom auth lambda trigger is not configured for the user pool.': '...',
        'Resend Code': '...',
        'Confirmation code cannot be empty': '...',
        'Password cannot be empty': '...',
        'Invalid verification code provided, please try again.': '...',
        'Invalid code provided, please request a code again.': '...',
        'Confirmation Code': '...',
        'Lost your code? ': '...',
        'Password did not conform with policy: Password must have symbol characters': '...',
        'Password did not conform with policy: Password must have lowercase characters': '...'

I added them to my app dictionary, however I feel very uncomfortable about the process:

Thank you, Artem

aws-eddy commented 3 years ago

I am working on other translation related issues and will provide more translations for spanish. We will work on making the translations more consistent for every language.

aws-eddy commented 3 years ago

Hello @moneyatbo, I have added more translations in this commit that would cover the login auth flow in spanish: https://github.com/aws-amplify/amplify-js/commit/70fcf949e09842c196249a7e8283a2745819500b

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.