From f8b9eb261a688f8b0609176a99b080f2b87fc8d7 Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 29 Feb 2024 17:28:50 +0100 Subject: [PATCH 1/5] Remove literal links within the translation --- options/locale/locale_en-US.ini | 46 +++++++++---------- routers/web/admin/hooks.go | 5 +- templates/admin/auth/new.tmpl | 20 ++++---- templates/admin/dashboard.tmpl | 2 +- templates/home.tmpl | 15 ++++-- templates/repo/settings/protected_branch.tmpl | 6 +-- templates/repo/settings/tags.tmpl | 2 +- templates/repo/settings/webhook/settings.tmpl | 2 +- templates/status/500.tmpl | 4 +- .../user/settings/security/webauthn.tmpl | 2 +- 10 files changed, 57 insertions(+), 47 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 6d4e109e1dc66..28bf99224c458 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -176,7 +176,7 @@ string.desc = Z - A [error] occurred = An error occurred -report_message = If you believe that this is a Gitea bug, please search for issues on GitHub or open a new issue if necessary. +report_message = If you believe that this is a Gitea bug, please search for issues on %[1]sGitHub%[2]s or open a new issue if necessary. missing_csrf = Bad Request: no CSRF token present invalid_csrf = Bad Request: invalid CSRF token not_found = The target couldn't be found. @@ -185,13 +185,13 @@ network_error = Network error [startpage] app_desc = A painless, self-hosted Git service install = Easy to install -install_desc = Simply run the binary for your platform, ship it with Docker, or get it packaged. +install_desc = Simply %[1]srun the binary%[2]s for your platform, %[3]sship it with Docker%[4]s, or get it %[5]spackaged%[6]s. platform = Cross-platform -platform_desc = Gitea runs anywhere Go can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love! +platform_desc = Gitea runs anywhere %[1]sGo%[2]s can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love! lightweight = Lightweight lightweight_desc = Gitea has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy! license = Open Source -license_desc = Go get code.gitea.io/gitea! Join us by contributing to make this project even better. Don't be shy to be a contributor! +license_desc = Go get %[1]scode.gitea.io/gitea%[2]s! Join us by %[3]scontributing%[4]s to make this project even better. Don't be shy to be a contributor! [install] install = Installation @@ -889,7 +889,7 @@ passcode_invalid = The passcode is incorrect. Try again. twofa_enrolled = Your account has been successfully enrolled. Store your single-use recovery key (%s) in a safe place, as it will not be shown again. twofa_failed_get_secret = Failed to get secret. -webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the WebAuthn Authenticator standard. +webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the %[1]sWebAuthn Authenticator%[2]s standard. webauthn_register_key = Add Security Key webauthn_nickname = Nickname webauthn_delete_key = Remove Security Key @@ -2248,7 +2248,7 @@ settings.event_pull_request_merge = Pull Request Merge settings.event_package = Package settings.event_package_desc = Package created or deleted in a repository. settings.branch_filter = Branch filter -settings.branch_filter_desc = Branch whitelist for push, branch creation and branch deletion events, specified as glob pattern. If empty or *, events for all branches are reported. See github.com/gobwas/glob documentation for syntax. Examples: master, {master,release*}. +settings.branch_filter_desc = Branch whitelist for push, branch creation and branch deletion events, specified as glob pattern. If empty or *, events for all branches are reported. See %[1]sthe documentation%[2]s for syntax. Examples: master, {master,release*}. settings.authorization_header = Authorization Header settings.authorization_header_desc = Will be included as authorization header for requests when present. Examples: %s. settings.active = Active @@ -2341,12 +2341,12 @@ settings.ignore_stale_approvals_desc = Do not count approvals that were made on settings.require_signed_commits = Require Signed Commits settings.require_signed_commits_desc = Reject pushes to this branch if they are unsigned or unverifiable. settings.protect_branch_name_pattern = Protected Branch Name Pattern -settings.protect_branch_name_pattern_desc = "Protected branch name patterns. See the documentation for pattern syntax. Examples: main, release/**" +settings.protect_branch_name_pattern_desc = "Protected branch name patterns. See %[1]sthe documentation%[2]s for pattern syntax. Examples: main, release/**" settings.protect_patterns = Patterns settings.protect_protected_file_patterns = "Protected file patterns (separated using semicolon ';'):" -settings.protect_protected_file_patterns_desc = "Protected files are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon (';'). See github.com/gobwas/glob documentation for pattern syntax. Examples: .drone.yml, /docs/**/*.txt." +settings.protect_protected_file_patterns_desc = "Protected files are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon (';'). See %[1]sthe documentation%[2]s for pattern syntax. Examples: .drone.yml, /docs/**/*.txt." settings.protect_unprotected_file_patterns = "Unprotected file patterns (separated using semicolon ';'):" -settings.protect_unprotected_file_patterns_desc = "Unprotected files that are allowed to be changed directly if user has write access, bypassing push restriction. Multiple patterns can be separated using semicolon (';'). See github.com/gobwas/glob documentation for pattern syntax. Examples: .drone.yml, /docs/**/*.txt." +settings.protect_unprotected_file_patterns_desc = "Unprotected files that are allowed to be changed directly if user has write access, bypassing push restriction. Multiple patterns can be separated using semicolon (';'). See %[1]sthe documentation%[2]s for pattern syntax. Examples: .drone.yml, /docs/**/*.txt." settings.add_protected_branch = Enable protection settings.delete_protected_branch = Disable protection settings.update_protect_branch_success = Branch protection for rule "%s" has been updated. @@ -2378,7 +2378,7 @@ settings.tags.protection.allowed.teams = Allowed teams settings.tags.protection.allowed.noone = No One settings.tags.protection.create = Protect Tag settings.tags.protection.none = There are no protected tags. -settings.tags.protection.pattern.description = You can use a single name or a glob pattern or regular expression to match multiple tags. Read more in the protected tags guide. +settings.tags.protection.pattern.description = You can use a single name or a glob pattern or regular expression to match multiple tags. Read more in the %[1]sprotected tags guide%[2]s. settings.bot_token = Bot Token settings.chat_id = Chat ID settings.thread_id = Thread ID @@ -2747,7 +2747,7 @@ last_page = Last total = Total: %d settings = Admin Settings -dashboard.new_version_hint = Gitea %s is now available, you are running %s. Check the blog for more details. +dashboard.new_version_hint = Gitea %[1]s is now available, you are running %[2]s. Check %[3]sthe blog%[4]s for more details. dashboard.statistic = Summary dashboard.operations = Maintenance Operations dashboard.system_status = System Status @@ -2938,12 +2938,12 @@ packages.size = Size packages.published = Published defaulthooks = Default Webhooks -defaulthooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the webhooks guide. +defaulthooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the %[1]swebhooks guide%[2]s. defaulthooks.add_webhook = Add Default Webhook defaulthooks.update_webhook = Update Default Webhook systemhooks = System Webhooks -systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here will act on all repositories on the system, so please consider any performance implications this may have. Read more in the webhooks guide. +systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here will act on all repositories on the system, so please consider any performance implications this may have. Read more in the %[1]swebhooks guide%[2]s. systemhooks.add_webhook = Add System Webhook systemhooks.update_webhook = Update System Webhook @@ -3038,18 +3038,18 @@ auths.tips = Tips auths.tips.oauth2.general = OAuth2 Authentication auths.tips.oauth2.general.tip = When registering a new OAuth2 authentication, the callback/redirect URL should be: auths.tip.oauth2_provider = OAuth2 Provider -auths.tip.bitbucket = Register a new OAuth consumer on https://bitbucket.org/account/user//oauth-consumers/new and add the permission 'Account' - 'Read' +auths.tip.bitbucket = Register a new OAuth consumer on %s and add the permission 'Account' - 'Read' auths.tip.nextcloud = Register a new OAuth consumer on your instance using the following menu "Settings -> Security -> OAuth 2.0 client" -auths.tip.dropbox = Create a new application at https://www.dropbox.com/developers/apps -auths.tip.facebook = Register a new application at https://developers.facebook.com/apps and add the product "Facebook Login" -auths.tip.github = Register a new OAuth application on https://github.com/settings/applications/new -auths.tip.gitlab = Register a new application on https://gitlab.com/profile/applications -auths.tip.google_plus = Obtain OAuth2 client credentials from the Google API console at https://console.developers.google.com/ +auths.tip.dropbox = Create a new application at %s +auths.tip.facebook = Register a new application at %s and add the product "Facebook Login" +auths.tip.github = Register a new OAuth application on %s +auths.tip.gitlab = Register a new application on %s +auths.tip.google_plus = Obtain OAuth2 client credentials from the Google API console at %s auths.tip.openid_connect = Use the OpenID Connect Discovery URL (/.well-known/openid-configuration) to specify the endpoints -auths.tip.twitter = Go to https://dev.twitter.com/apps, create an application and ensure that the “Allow this application to be used to Sign in with Twitter” option is enabled -auths.tip.discord = Register a new application on https://discordapp.com/developers/applications/me -auths.tip.gitea = Register a new OAuth2 application. Guide can be found at https://docs.gitea.com/development/oauth2-provider -auths.tip.yandex = Create a new application at https://oauth.yandex.com/client/new. Select following permissions from the "Yandex.Passport API" section: "Access to email address", "Access to user avatar" and "Access to username, first name and surname, gender" +auths.tip.twitter = Go to %s, create an application and ensure that the “Allow this application to be used to Sign in with Twitter” option is enabled +auths.tip.discord = Register a new application on %s +auths.tip.gitea = Register a new OAuth2 application. Read more in %[1]sthe guide%[2]s +auths.tip.yandex = Create a new application at %s. Select following permissions from the "Yandex.Passport API" section: "Access to email address", "Access to user avatar" and "Access to username, first name and surname, gender" auths.tip.mastodon = Input a custom instance URL for the mastodon instance you want to authenticate with (or use the default one) auths.edit = Edit Authentication Source auths.activated = This Authentication Source is Activated diff --git a/routers/web/admin/hooks.go b/routers/web/admin/hooks.go index 8d4c66fdb2bef..3cf3d655efce5 100644 --- a/routers/web/admin/hooks.go +++ b/routers/web/admin/hooks.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models/webhook" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/context" ) @@ -34,7 +35,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) { } sys["Title"] = ctx.Tr("admin.systemhooks") - sys["Description"] = ctx.Tr("admin.systemhooks.desc") + sys["Description"] = ctx.Tr("admin.systemhooks.desc", templates.SafeHTML(``), templates.SafeHTML(``)) sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, util.OptionalBoolNone) sys["BaseLink"] = setting.AppSubURL + "/admin/hooks" sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks" @@ -44,7 +45,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) { } def["Title"] = ctx.Tr("admin.defaulthooks") - def["Description"] = ctx.Tr("admin.defaulthooks.desc") + def["Description"] = ctx.Tr("admin.defaulthooks.desc", templates.SafeHTML(``), templates.SafeHTML(``)) def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx) def["BaseLink"] = setting.AppSubURL + "/admin/hooks" def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks" diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index f32f77d5dc237..38bb336e4ac5d 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -91,29 +91,29 @@
{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}
  • Bitbucket
  • - {{ctx.Locale.Tr "admin.auths.tip.bitbucket"}} + {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user//oauth-consumers/new"}}
  • Dropbox
  • - {{ctx.Locale.Tr "admin.auths.tip.dropbox"}} + {{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}
  • Facebook
  • - {{ctx.Locale.Tr "admin.auths.tip.facebook"}} + {{ctx.Locale.Tr "admin.auths.tip.facebook" "https://developers.facebook.com/apps "}}
  • GitHub
  • - {{ctx.Locale.Tr "admin.auths.tip.github"}} + {{ctx.Locale.Tr "admin.auths.tip.github" "https://github.com/settings/applications/new"}}
  • GitLab
  • - {{ctx.Locale.Tr "admin.auths.tip.gitlab"}} + {{ctx.Locale.Tr "admin.auths.tip.gitlab" "https://gitlab.com/profile/applications"}}
  • Google
  • - {{ctx.Locale.Tr "admin.auths.tip.google_plus"}} + {{ctx.Locale.Tr "admin.auths.tip.google_plus" "https://console.developers.google.com/"}}
  • OpenID Connect
  • {{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}
  • Twitter
  • - {{ctx.Locale.Tr "admin.auths.tip.twitter"}} + {{ctx.Locale.Tr "admin.auths.tip.twitter" "https://dev.twitter.com/apps"}}
  • Discord
  • - {{ctx.Locale.Tr "admin.auths.tip.discord"}} + {{ctx.Locale.Tr "admin.auths.tip.discord" "https://discordapp.com/developers/applications/me"}}
  • Gitea
  • - {{ctx.Locale.Tr "admin.auths.tip.gitea"}} + {{ctx.Locale.Tr "admin.auths.tip.gitea" (SafeHTML ``) (SafeHTML ``)}}
  • Nextcloud
  • {{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}
  • Yandex
  • - {{ctx.Locale.Tr "admin.auths.tip.yandex"}} + {{ctx.Locale.Tr "admin.auths.tip.yandex" "https://oauth.yandex.com/client/new"}}
  • Mastodon
  • {{ctx.Locale.Tr "admin.auths.tip.mastodon"}}
    diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index cc7d338589a0d..74d6411dd18db 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -2,7 +2,7 @@
    {{if .NeedUpdate}}
    -

    {{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer}}

    +

    {{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer (SafeHTML ``) (SafeHTML ``)}}

    {{end}}

    diff --git a/templates/home.tmpl b/templates/home.tmpl index 1e5369e7ee0b4..e60a63a83bebe 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -17,7 +17,11 @@ {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}

    - {{ctx.Locale.Tr "startpage.install_desc"}} + {{ctx.Locale.Tr "startpage.install_desc" + (SafeHTML ``) (SafeHTML ``) + (SafeHTML ``) (SafeHTML ``) + (SafeHTML ``) (SafeHTML ``) + }}

    @@ -25,7 +29,9 @@ {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}

    - {{ctx.Locale.Tr "startpage.platform_desc"}} + {{ctx.Locale.Tr "startpage.platform_desc" + (SafeHTML ``) (SafeHTML ``) + }}

    @@ -43,7 +49,10 @@ {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}

    - {{ctx.Locale.Tr "startpage.license_desc"}} + {{ctx.Locale.Tr "startpage.license_desc" + (SafeHTML ``) (SafeHTML ``) + (SafeHTML ``) (SafeHTML ``) + }}

    diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 6bbcc9f6ec00e..a9ab0edd39e6e 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -10,17 +10,17 @@ -

    {{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc"}}

    +

    {{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc" (SafeHTML ``) (SafeHTML ``)}}

    -

    {{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns_desc"}}

    +

    {{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns_desc" (SafeHTML ``) (SafeHTML ``)}}

    -

    {{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns_desc"}}

    +

    {{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns_desc" (SafeHTML ``) (SafeHTML ``)}}

    {{.CsrfTokenHtml}} diff --git a/templates/repo/settings/tags.tmpl b/templates/repo/settings/tags.tmpl index e4fcf2ee6bead..73d9e2e471e24 100644 --- a/templates/repo/settings/tags.tmpl +++ b/templates/repo/settings/tags.tmpl @@ -21,7 +21,7 @@
    -
    {{ctx.Locale.Tr "repo.settings.tags.protection.pattern.description"}}
    +
    {{ctx.Locale.Tr "repo.settings.tags.protection.pattern.description" (SafeHTML ``) (SafeHTML ``)}}
    diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index 3ef8894444a45..49fd5d2404f5a 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -255,7 +255,7 @@
    - {{ctx.Locale.Tr "repo.settings.branch_filter_desc"}} + {{ctx.Locale.Tr "repo.settings.branch_filter_desc" (SafeHTML ``) (SafeHTML ``)}}
    diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index d6cff28174813..bf2c9f5ca98be 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -1,5 +1,5 @@ {{/* This page should only depend the minimal template functions/variables, to avoid triggering new panics. -* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, ThemeName, Str2html +* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, ThemeName, SafeHTML * ctx.Locale * .Flash * .ErrorMsg @@ -42,7 +42,7 @@ {{end}}
    {{if or .SignedUser.IsAdmin .ShowFooterVersion}}

    {{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}

    {{end}} - {{if .SignedUser.IsAdmin}}

    {{ctx.Locale.Tr "error.report_message"}}

    {{end}} + {{if .SignedUser.IsAdmin}}

    {{ctx.Locale.Tr "error.report_message" (SafeHTML ``) (SafeHTML ``)}}

    {{end}}
    diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl index eceee191bd8a7..7a4c524a18b1a 100644 --- a/templates/user/settings/security/webauthn.tmpl +++ b/templates/user/settings/security/webauthn.tmpl @@ -1,6 +1,6 @@

    {{ctx.Locale.Tr "settings.webauthn"}}

    -

    {{ctx.Locale.Tr "settings.webauthn_desc"}}

    +

    {{ctx.Locale.Tr "settings.webauthn_desc" (SafeHTML ``) (SafeHTML ``)}}

    {{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}

    {{template "user/auth/webauthn_error" .}}
    From 0a5cd722bc222f1c87a792a6f5d5f856ca5745ff Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 29 Feb 2024 18:01:53 +0100 Subject: [PATCH 2/5] Use HTML safe escaping for bitbucket tip --- templates/admin/auth/new.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 38bb336e4ac5d..d2d6bb2037f45 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -91,7 +91,7 @@
    {{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}
  • Bitbucket
  • - {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user//oauth-consumers/new"}} + {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/[your username]/oauth-consumers/new"}}
  • Dropbox
  • {{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}
  • Facebook
  • From c27e9082217be6c8bc100f8a922a06151574072e Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 29 Feb 2024 18:05:28 +0100 Subject: [PATCH 3/5] Use more common HTML escaping --- templates/admin/auth/new.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index d2d6bb2037f45..2e02eda783bc2 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -91,7 +91,7 @@
    {{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}
  • Bitbucket
  • - {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/[your username]/oauth-consumers/new"}} + {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/{your username}/oauth-consumers/new"}}
  • Dropbox
  • {{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}
  • Facebook
  • From 056919273f64d3871302cfb75caaf9fa7a223d00 Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 29 Feb 2024 18:08:29 +0100 Subject: [PATCH 4/5] Inline `GitHub` link --- options/locale/locale_en-US.ini | 2 +- templates/status/500.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 28bf99224c458..93f63f1471e10 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -176,7 +176,7 @@ string.desc = Z - A [error] occurred = An error occurred -report_message = If you believe that this is a Gitea bug, please search for issues on %[1]sGitHub%[2]s or open a new issue if necessary. +report_message = If you believe that this is a Gitea bug, please search for issues on %s or open a new issue if necessary. missing_csrf = Bad Request: no CSRF token present invalid_csrf = Bad Request: invalid CSRF token not_found = The target couldn't be found. diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index bf2c9f5ca98be..9dd3f5a5e88d0 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -42,7 +42,7 @@ {{end}}
    {{if or .SignedUser.IsAdmin .ShowFooterVersion}}

    {{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}

    {{end}} - {{if .SignedUser.IsAdmin}}

    {{ctx.Locale.Tr "error.report_message" (SafeHTML ``) (SafeHTML ``)}}

    {{end}} + {{if .SignedUser.IsAdmin}}

    {{ctx.Locale.Tr "error.report_message" (SafeHTML `GitHub`)}}

    {{end}}
    From fef42018c25a53af635c40d2c09c1963fea21e47 Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 29 Feb 2024 18:10:46 +0100 Subject: [PATCH 5/5] And the same for Go --- options/locale/locale_en-US.ini | 2 +- templates/home.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 93f63f1471e10..472f849923ce7 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -187,7 +187,7 @@ app_desc = A painless, self-hosted Git service install = Easy to install install_desc = Simply %[1]srun the binary%[2]s for your platform, %[3]sship it with Docker%[4]s, or get it %[5]spackaged%[6]s. platform = Cross-platform -platform_desc = Gitea runs anywhere %[1]sGo%[2]s can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love! +platform_desc = Gitea runs anywhere %s can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love! lightweight = Lightweight lightweight_desc = Gitea has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy! license = Open Source diff --git a/templates/home.tmpl b/templates/home.tmpl index e60a63a83bebe..13c5b9181f316 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -30,7 +30,7 @@

    {{ctx.Locale.Tr "startpage.platform_desc" - (SafeHTML ``) (SafeHTML ``) + (SafeHTML `Go`) }}