add fr and nl translations (#4587)

* add fr and nl translations

* update fr

* fix password label translation

* translate country strings

* fix double accents

* fix Ivory Coast

* sort countries

* use more performant Collator over localeCompare

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
Jeremy Letto 2022-03-06 17:19:51 -06:00 committed by GitHub
parent f5b973e15c
commit 21f7dd5eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 555 additions and 279 deletions

View file

@ -19,10 +19,9 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm
const STORED_PASSWORD_LABEL = `* ${t('LoginForm.label.savedPassword')} *`;
const [host, setHost] = useState(null);
const [passwordLabel, setPasswordLabel] = useState(PASSWORD_LABEL);
const [useStoredPasswordLabel, setUseStoredPasswordLabel] = useState(false);
const [autoConnect, setAutoConnect] = useAutoConnect();
const validate = values => {
const errors: any = {};
@ -38,7 +37,7 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm
const useStoredPassword = (remember, password) => remember && host.hashedPassword && !password;
const togglePasswordLabel = (useStoredLabel) => {
setPasswordLabel(useStoredLabel ? STORED_PASSWORD_LABEL : PASSWORD_LABEL);
setUseStoredPasswordLabel(useStoredLabel);
};
const handleOnSubmit = ({ userName, ...values }) => {
@ -120,8 +119,8 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm
</div>
<div className='loginForm-item'>
<Field
label={passwordLabel}
onFocus={() => setPasswordLabel(PASSWORD_LABEL)}
label={useStoredPasswordLabel ? STORED_PASSWORD_LABEL : PASSWORD_LABEL}
onFocus={() => setUseStoredPasswordLabel(false)}
onBlur={() => togglePasswordLabel(useStoredPassword(values.remember, values.password))}
name='password'
type='password'