Skip to content

Commit 7937fd7

Browse files
hasansezertasanpre-commit-ci[bot]jowilf
authored
Support translation for login form placeholders (#425)
* Adds i18n locale to login form placeholders. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update starlette_admin/translations/fr/LC_MESSAGES/admin.po Co-authored-by: Jocelin Hounon <hounonj@gmail.com> * Update starlette_admin/translations/ru/LC_MESSAGES/admin.po Co-authored-by: Jocelin Hounon <hounonj@gmail.com> * Remove fuzzy keywords. * Some google translations for russian. * Update starlette_admin/translations/fr/LC_MESSAGES/admin.po * Translation for fr. * compiled. * Update starlette_admin/templates/login.html Co-authored-by: Jocelin Hounon <hounonj@gmail.com> * Update starlette_admin/templates/login.html Co-authored-by: Jocelin Hounon <hounonj@gmail.com> * Remove the unnecessary translations * update changelog --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jocelin Hounon <hounonj@gmail.com>
1 parent 568cac5 commit 7937fd7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/changelog/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1919

2020
### Fixed
2121

22+
* Support translation for login form placeholders by [@hasansezertasan](https://github.com/hasansezertasan)
23+
in [#425](https://github.com/jowilf/starlette-admin/pull/425)
2224
* Update AuthMiddleware for Compatibility with Starlette >= 0.33 by [@jowilf](https://github.com/jowilf)
2325
in [#427](https://github.com/jowilf/starlette-admin/pull/427)
2426
* Fixes actions docstrings

starlette_admin/templates/login.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2 class="card-title text-center mb-4">{{ _("Login to your account") }}</h2>
3333
<input type="text"
3434
name="username"
3535
class="form-control {% if form_errors and form_errors.has('username') %}is-invalid{% endif %}"
36-
placeholder="Enter username"
36+
placeholder="{{ _('Username') }}"
3737
autocomplete="off"/>
3838
{% if form_errors and form_errors.has('username') %}
3939
<div class="invalid-feedback">{{ form_errors.msg('username') }}</div>
@@ -44,7 +44,7 @@ <h2 class="card-title text-center mb-4">{{ _("Login to your account") }}</h2>
4444
<input type="password"
4545
name="password"
4646
class="form-control {% if form_errors and form_errors.has('password') %}is-invalid{% endif %}"
47-
placeholder="Password"
47+
placeholder="{{ _('Password') }}"
4848
autocomplete="off"/>
4949
{% if form_errors and form_errors.has('password') %}
5050
<div class="invalid-feedback">{{ form_errors.msg('password') }}</div>

0 commit comments

Comments
 (0)