refactor: replace static placeholders with translatable ones (#87130)

* refactor: replace static placeholders with translatable ones

* refactor

* refactor: keep default option

* refactor: improve expression

* refactor: run extraction after merging fix
This commit is contained in:
Laura Benz 2024-05-01 13:17:53 +02:00 committed by GitHub
parent b0f1222a21
commit f806b9749d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 5 deletions

View File

@ -490,8 +490,8 @@ verify_email_enabled = false
login_default_org_id =
# Background text for the user field on the login page
login_hint = email or username
password_hint = password
login_hint =
password_hint =
# Default UI theme ("dark" or "light" or "system")
default_theme = dark
@ -1850,4 +1850,4 @@ fetch_access_policy_timeout = 5s
# How long to wait for a request to create to delete an access policy to complete
delete_access_policy_timeout = 5s
# The domain name used to access cms
domain = grafana-dev.net
domain = grafana-dev.net

View File

@ -42,7 +42,7 @@ export const LoginForm = ({ children, onSubmit, isLoggingIn, passwordHint, login
id={usernameId}
autoFocus
autoCapitalize="none"
placeholder={loginHint}
placeholder={loginHint || t('login.form.username-placeholder', 'email or username')}
data-testid={selectors.pages.Login.username}
/>
</Field>
@ -55,7 +55,7 @@ export const LoginForm = ({ children, onSubmit, isLoggingIn, passwordHint, login
{...register('password', { required: t('login.form.password-required', 'Password is required') })}
id={passwordId}
autoComplete="current-password"
placeholder={passwordHint}
placeholder={passwordHint || t('login.form.password-placeholder', 'password')}
/>
</Field>
<Button

View File

@ -727,10 +727,12 @@
"forgot-password": "Forgot your password?",
"form": {
"password-label": "Password",
"password-placeholder": "password",
"password-required": "Password is required",
"submit-label": "Log in",
"submit-loading-label": "Logging in...",
"username-label": "Email or username",
"username-placeholder": "email or username",
"username-required": "Email or username is required"
},
"services": {

View File

@ -727,10 +727,12 @@
"forgot-password": "Főřģőŧ yőūř päşşŵőřđ?",
"form": {
"password-label": "Päşşŵőřđ",
"password-placeholder": "päşşŵőřđ",
"password-required": "Päşşŵőřđ įş řęqūįřęđ",
"submit-label": "Ŀőģ įʼn",
"submit-loading-label": "Ŀőģģįʼnģ įʼn...",
"username-label": "Ēmäįľ őř ūşęřʼnämę",
"username-placeholder": "ęmäįľ őř ūşęřʼnämę",
"username-required": "Ēmäįľ őř ūşęřʼnämę įş řęqūįřęđ"
},
"services": {