mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
ui: encourage participation in the localization of Forgejo in language settings (#4596)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/valkey/valkey:7.2.5-alpine3.19 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:redis:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/valkey/valkey:7.2.5-alpine3.19 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:redis:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Changes: - clarify how the language selector works as this is not very unclear: the footer selector is per-session and the settings selector is per-account, usually users need the 2nd - tell about how to participate in improvement of localization via this link: https://forgejo.org/docs/latest/developer/localization/. Test that the link is present by extending and existing test Preview: - https://codeberg.org/attachments/f5d04fa1-2e9a-46e4-ac94-d8effefb9762 - https://codeberg.org/attachments/2a820bf5-1326-4c4a-9aff-4b9b70ee1bc0 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4596 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
parent
75af19a497
commit
c235e9b919
3 changed files with 11 additions and 0 deletions
|
@ -741,6 +741,8 @@ continue = Continue
|
||||||
cancel = Cancel
|
cancel = Cancel
|
||||||
language = Language
|
language = Language
|
||||||
language.title = Default language
|
language.title = Default language
|
||||||
|
language.description = This language will be saved to your account and be used as the default after you log in.
|
||||||
|
language.localization_project = Help us translate Forgejo into your language! <a href="%s">Learn more</a>.
|
||||||
ui = Theme
|
ui = Theme
|
||||||
hints = Hints
|
hints = Hints
|
||||||
additional_repo_units_hint = Suggest to enable additional repository units
|
additional_repo_units_hint = Suggest to enable additional repository units
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<form class="ui form" action="{{.Link}}/language" method="post">
|
<form class="ui form" action="{{.Link}}/language" method="post">
|
||||||
|
<div class="tw-mb-4">
|
||||||
|
{{ctx.Locale.Tr "settings.language.description"}}
|
||||||
|
</div>
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui language selection dropdown" id="language">
|
<div class="ui language selection dropdown" id="language">
|
||||||
|
@ -60,6 +63,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tw-mb-4">
|
||||||
|
{{ctx.Locale.Tr "settings.language.localization_project" "https://forgejo.org/docs/latest/developer/localization/"}}
|
||||||
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_language"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_language"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -380,6 +380,9 @@ func TestUserHints(t *testing.T) {
|
||||||
|
|
||||||
_, hintChecked := htmlDoc.Find(`input[name="enable_repo_unit_hints"]`).Attr("checked")
|
_, hintChecked := htmlDoc.Find(`input[name="enable_repo_unit_hints"]`).Attr("checked")
|
||||||
assert.Equal(t, enabled, hintChecked)
|
assert.Equal(t, enabled, hintChecked)
|
||||||
|
|
||||||
|
link, _ := htmlDoc.Find("form[action='/user/settings/appearance/language'] a").Attr("href")
|
||||||
|
assert.EqualValues(t, "https://forgejo.org/docs/latest/developer/localization/", link)
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Run("view", func(t *testing.T) {
|
t.Run("view", func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue