forked from kevadesu/forgejo
Remove urls from translations (#31950)
Part of #27700 Removes all URLs from translation strings to easy up changing them in the future and to exclude people injecting malicious URLs through translations. First measure as long as #24402 is out of scope. (cherry picked from commit 83f37f630246e381eefd650fc2d4b1f3976ea882) Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu> Conflicts: - options/locale/locale_en-US.ini Resolved by manually applying the URL->%s changes to our translations. - routers/web/admin/hooks.go templates/repo/settings/protected_branch.tmpl templates/status/500.tmpl Manually resolved. - templates/repo/settings/webhook/settings.tmpl Applied the change to templates/webhook/shared-settings.tmpl instead Additional changes: Gitea-specific URLs have been replaced by their Forgejo counterparts, lifted from the original translation text.
This commit is contained in:
parent
32320bbf32
commit
8857da871e
14 changed files with 52 additions and 52 deletions
|
@ -91,29 +91,29 @@
|
|||
<h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
|
||||
<div class="ui attached segment">
|
||||
<li>Bitbucket</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.bitbucket"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/{your-username}/oauth-consumers/new"}}</span>
|
||||
<li>Dropbox</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.dropbox"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}</span>
|
||||
<li>Facebook</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.facebook"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.facebook" "https://developers.facebook.com/apps"}}</span>
|
||||
<li>GitHub</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.github"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.github" "https://github.com/settings/applications/new"}}</span>
|
||||
<li>GitLab</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.gitlab_new"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.gitlab_new" "https://gitlab.com/-/profile/applications"}}</span>
|
||||
<li>Google</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.google_plus"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.google_plus" "https://console.developers.google.com/"}}</span>
|
||||
<li>OpenID Connect</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span>
|
||||
<li>Twitter</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.twitter"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.twitter" "https://dev.twitter.com/apps"}}</span>
|
||||
<li>Discord</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.discord"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.discord" "https://discordapp.com/developers/applications/me"}}</span>
|
||||
<li>Gitea</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.gitea"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.gitea" "https://forgejo.org/docs/latest/user/oauth2-provider"}}</span>
|
||||
<li>Nextcloud</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span>
|
||||
<li>Yandex</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.yandex"}}</span>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.yandex" "https://oauth.yandex.com/client/new"}}</span>
|
||||
<li>Mastodon</li>
|
||||
<span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="admin-setting-content">
|
||||
{{if .NeedUpdate}}
|
||||
<div class="ui negative message flash-error">
|
||||
<p>{{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer}}</p>
|
||||
<p>{{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer "https://forgejo.org/news"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<h4 class="ui top attached header">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.install_desc"}}
|
||||
{{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
|
@ -25,7 +25,7 @@
|
|||
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.platform_desc"}}
|
||||
{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@
|
|||
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.license_desc"}}
|
||||
{{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
<legend>{{ctx.Locale.Tr "repo.settings.protect_patterns"}}</legend>
|
||||
<label>{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern"}}
|
||||
<input name="rule_name" type="text" value="{{.Rule.RuleName}}">
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc"}}</span>
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc" "https://github.com/gobwas/glob"}}</span>
|
||||
</label>
|
||||
<label>{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns"}}
|
||||
<input name="protected_file_patterns" type="text" value="{{.Rule.ProtectedFilePatterns}}">
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns_desc"}}</span>
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</span>
|
||||
</label>
|
||||
<label>{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns"}}
|
||||
<input name="unprotected_file_patterns" type="text" value="{{.Rule.UnprotectedFilePatterns}}">
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns_desc"}}</span>
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="ui input">
|
||||
<input class="prompt" name="name_pattern" autocomplete="off" value="{{.name_pattern}}" placeholder="v*" autofocus required>
|
||||
</div>
|
||||
<div class="help">{{ctx.Locale.Tr "repo.settings.tags.protection.pattern.description"}}</div>
|
||||
<div class="help">{{ctx.Locale.Tr "repo.settings.tags.protection.pattern.description" "https://forgejo.org/docs/latest/user/protection/#protected-tags"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="whitelist field">
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
{{end}}
|
||||
<div class="center tw-mt-8">
|
||||
{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
|
||||
{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message"}}</p>{{end}}
|
||||
{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message" "https://codeberg.org/forgejo/forgejo/issues"}}</p>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{ctx.Locale.Tr "settings.webauthn_desc"}}</p>
|
||||
<p>{{ctx.Locale.Tr "settings.webauthn_desc" "https://w3c.github.io/webauthn/#webauthn-authenticator"}}</p>
|
||||
<p>{{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}</p>
|
||||
{{template "user/auth/webauthn_error" .}}
|
||||
<div class="flex-list">
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
<div class="field">
|
||||
<label for="branch_filter">{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label>
|
||||
<input id="branch_filter" name="branch_filter" type="text" value="{{or .Webhook.BranchFilter "*"}}">
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc"}}</span>
|
||||
<span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</span>
|
||||
</div>
|
||||
|
||||
{{$skipAuthorizationHeader := or (eq .HookType "sourcehut_builds") (eq .HookType "matrix")}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue