mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 11:03:56 +01:00
ui: encourage participation in the localization of Forgejo in language settings (#4596)
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
|
||||
language = 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
|
||||
hints = Hints
|
||||
additional_repo_units_hint = Suggest to enable additional repository units
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}/language" method="post">
|
||||
<div class="tw-mb-4">
|
||||
{{ctx.Locale.Tr "settings.language.description"}}
|
||||
</div>
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<div class="ui language selection dropdown" id="language">
|
||||
|
@ -60,6 +63,9 @@
|
|||
</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">
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_language"}}</button>
|
||||
</div>
|
||||
|
|
|
@ -380,6 +380,9 @@ func TestUserHints(t *testing.T) {
|
|||
|
||||
_, hintChecked := htmlDoc.Find(`input[name="enable_repo_unit_hints"]`).Attr("checked")
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue