From 213a68ec69dcb304c6236582cd9f7c9f80621969 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Fri, 2 Sep 2022 15:07:54 +0200 Subject: [PATCH] Fix translations on login page --- changelog/unreleased/bugfix-i18n-login-page.md | 6 ++++++ services/idp/src/containers/Login/Login.jsx | 4 ++-- services/idp/src/i18n.ts | 4 ++-- services/idp/src/locales/de/translation.json | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/bugfix-i18n-login-page.md diff --git a/changelog/unreleased/bugfix-i18n-login-page.md b/changelog/unreleased/bugfix-i18n-login-page.md new file mode 100644 index 0000000000..c48c4c9b84 --- /dev/null +++ b/changelog/unreleased/bugfix-i18n-login-page.md @@ -0,0 +1,6 @@ +Bugfix: Translations on login page + +We've fixed several translations on the login page. Also, the browser language is now being used properly to determine the language. + +https://github.com/owncloud/web/issues/7550 +https://github.com/owncloud/ocis/pull/4504 diff --git a/services/idp/src/containers/Login/Login.jsx b/services/idp/src/containers/Login/Login.jsx index f7bc31eaf0..a75e184634 100644 --- a/services/idp/src/containers/Login/Login.jsx +++ b/services/idp/src/containers/Login/Login.jsx @@ -147,8 +147,8 @@ function Login(props) { margin="normal" onChange={handleChange('password')} autoComplete="kopano-account current-password" - placeholder={t("konnect.login.usernameField.label", "Password")} - label={t("konnect.login.usernameField.label", "Password")} + placeholder={t("konnect.login.passwordField.label", "Password")} + label={t("konnect.login.passwordField.label", "Password")} id="oc-login-password" {...extraPropsPassword} /> diff --git a/services/idp/src/i18n.ts b/services/idp/src/i18n.ts index ab7635b0d2..48a3078b03 100644 --- a/services/idp/src/i18n.ts +++ b/services/idp/src/i18n.ts @@ -14,9 +14,9 @@ const config = { uiLocaleLocalStorageName: 'lico.identifier_ui_locale', // Sufficiently unique, set here. } -const supportedLanguages = locales.map((locale) => { +const supportedLanguages = ['en-GB', 'en', ...locales.map((locale) => { return locale.locale; -}); +})]; const queryUiLocalesDetector: CustomDetector = { name: 'queryUiLocales', diff --git a/services/idp/src/locales/de/translation.json b/services/idp/src/locales/de/translation.json index 5c43bf77a4..1fe181ffe0 100644 --- a/services/idp/src/locales/de/translation.json +++ b/services/idp/src/locales/de/translation.json @@ -32,6 +32,7 @@ }, "login": { "usernameField": { + "label": "Benutzername", "placeholder": { "email": "E-Mail", "identity": "Identität", @@ -91,4 +92,4 @@ "message": "Sie sind angemeldet - super!" } } -} \ No newline at end of file +}