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
|
@ -230,7 +230,7 @@ string.desc = Z - A
|
||||||
|
|
||||||
[error]
|
[error]
|
||||||
occurred = An error occurred
|
occurred = An error occurred
|
||||||
report_message = If you believe that this is a Forgejo bug, please search for issues on <a href="https://codeberg.org/forgejo/forgejo/issues" target="_blank">Codeberg</a> or open a new issue if necessary.
|
report_message = If you believe that this is a Forgejo bug, please search for issues on <a href="%s" target="_blank">Codeberg</a> or open a new issue if necessary.
|
||||||
invalid_csrf = Bad Request: invalid CSRF token
|
invalid_csrf = Bad Request: invalid CSRF token
|
||||||
not_found = The target couldn't be found.
|
not_found = The target couldn't be found.
|
||||||
network_error = Network error
|
network_error = Network error
|
||||||
|
@ -239,13 +239,13 @@ server_internal = Internal server error
|
||||||
[startpage]
|
[startpage]
|
||||||
app_desc = A painless, self-hosted Git service
|
app_desc = A painless, self-hosted Git service
|
||||||
install = Easy to install
|
install = Easy to install
|
||||||
install_desc = Simply <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org/download/#installation-from-binary">run the binary</a> for your platform, ship it with <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org/download/#container-image">Docker</a>, or get it <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org/download">packaged</a>.
|
install_desc = Simply <a target="_blank" rel="noopener noreferrer" href="%[1]s">run the binary</a> for your platform, ship it with <a target="_blank" rel="noopener noreferrer" href="%[2]s">Docker</a>, or get it <a target="_blank" rel="noopener noreferrer" href="%[3]s">packaged</a>.
|
||||||
platform = Cross-platform
|
platform = Cross-platform
|
||||||
platform_desc = Forgejo is confirmed to run on libre operating systems like Linux and FreeBSD, as well as different CPU architectures. Choose the one you love!
|
platform_desc = Forgejo is confirmed to run on libre operating systems like Linux and FreeBSD, as well as different CPU architectures. Choose the one you love!
|
||||||
lightweight = Lightweight
|
lightweight = Lightweight
|
||||||
lightweight_desc = Forgejo has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy!
|
lightweight_desc = Forgejo has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy!
|
||||||
license = Open Source
|
license = Open Source
|
||||||
license_desc = Go get <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org/download">Forgejo</a>! Join us by <a target="_blank" rel="noopener noreferrer" href="https://codeberg.org/forgejo/forgejo">contributing</a> to make this project even better. Don't be shy to be a contributor!
|
license_desc = Go get <a target="_blank" rel="noopener noreferrer" href="%[1]s">Forgejo</a>! Join us by <a target="_blank" rel="noopener noreferrer" href="%[2]s">contributing</a> to make this project even better. Don't be shy to be a contributor!
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
install = Installation
|
install = Installation
|
||||||
|
@ -468,7 +468,7 @@ authorize_application_description = If you grant the access, it will be able to
|
||||||
authorize_title = Authorize "%s" to access your account?
|
authorize_title = Authorize "%s" to access your account?
|
||||||
authorization_failed = Authorization failed
|
authorization_failed = Authorization failed
|
||||||
authorization_failed_desc = The authorization failed because we detected an invalid request. Please contact the maintainer of the app you have tried to authorize.
|
authorization_failed_desc = The authorization failed because we detected an invalid request. Please contact the maintainer of the app you have tried to authorize.
|
||||||
password_pwned = The password you chose is on a <a target="_blank" rel="noopener noreferrer" href="https://haveibeenpwned.com/Passwords">list of stolen passwords</a> previously exposed in public data breaches. Please try again with a different password and consider changing this password elsewhere too.
|
password_pwned = The password you chose is on a <a target="_blank" rel="noopener noreferrer" href="%s">list of stolen passwords</a> previously exposed in public data breaches. Please try again with a different password and consider changing this password elsewhere too.
|
||||||
password_pwned_err = Could not complete request to HaveIBeenPwned
|
password_pwned_err = Could not complete request to HaveIBeenPwned
|
||||||
last_admin = You cannot remove the last admin. There must be at least one admin.
|
last_admin = You cannot remove the last admin. There must be at least one admin.
|
||||||
back_to_sign_in = Back to Sign in
|
back_to_sign_in = Back to Sign in
|
||||||
|
@ -983,7 +983,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_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.
|
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 <a rel="noreferrer" target="_blank" href="https://w3c.github.io/webauthn/#webauthn-authenticator">WebAuthn Authenticator</a> standard.
|
webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the <a rel="noreferrer" target="_blank" href="%s">WebAuthn Authenticator</a> standard.
|
||||||
webauthn_register_key = Add security key
|
webauthn_register_key = Add security key
|
||||||
webauthn_nickname = Nickname
|
webauthn_nickname = Nickname
|
||||||
webauthn_delete_key = Remove security key
|
webauthn_delete_key = Remove security key
|
||||||
|
@ -2409,7 +2409,7 @@ settings.event_pull_request_enforcement = Enforcement
|
||||||
settings.event_package = Package
|
settings.event_package = Package
|
||||||
settings.event_package_desc = Package created or deleted in a repository.
|
settings.event_package_desc = Package created or deleted in a repository.
|
||||||
settings.branch_filter = Branch filter
|
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 <code>*</code>, events for all branches are reported. See <a href="https://pkg.go.dev/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> documentation for syntax. Examples: <code>master</code>, <code>{master,release*}</code>.
|
settings.branch_filter_desc = Branch whitelist for push, branch creation and branch deletion events, specified as glob pattern. If empty or <code>*</code>, events for all branches are reported. See <a href="%[1]s">%[2]s</a> documentation for syntax. Examples: <code>master</code>, <code>{master,release*}</code>.
|
||||||
settings.authorization_header = Authorization header
|
settings.authorization_header = Authorization header
|
||||||
settings.authorization_header_desc = Will be included as authorization header for requests when present. Examples: %s.
|
settings.authorization_header_desc = Will be included as authorization header for requests when present. Examples: %s.
|
||||||
settings.active = Active
|
settings.active = Active
|
||||||
|
@ -2504,12 +2504,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 = Require signed commits
|
||||||
settings.require_signed_commits_desc = Reject pushes to this branch if they are unsigned or unverifiable.
|
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 = Protected branch name pattern
|
||||||
settings.protect_branch_name_pattern_desc = Protected branch name patterns. See <a href="https://github.com/gobwas/glob">the documentation</a> for pattern syntax. Examples: main, release/**
|
settings.protect_branch_name_pattern_desc = Protected branch name patterns. See <a href="%s">the documentation</a> for pattern syntax. Examples: main, release/**
|
||||||
settings.protect_patterns = Patterns
|
settings.protect_patterns = Patterns
|
||||||
settings.protect_protected_file_patterns = Protected file patterns (separated using semicolon ";")
|
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 <a href="https://pkg.go.dev/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
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 <a href="%[1]s">%[2]s</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
||||||
settings.protect_unprotected_file_patterns = Unprotected file patterns (separated using semicolon ";")
|
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 <a href="https://pkg.go.dev/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
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 <a href="%[1]s">%[2]s</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
||||||
settings.update_protect_branch_success = Branch protection for rule "%s" has been updated.
|
settings.update_protect_branch_success = Branch protection for rule "%s" has been updated.
|
||||||
settings.remove_protected_branch_success = Branch protection for rule "%s" has been removed.
|
settings.remove_protected_branch_success = Branch protection for rule "%s" has been removed.
|
||||||
settings.remove_protected_branch_failed = Removing branch protection rule "%s" failed.
|
settings.remove_protected_branch_failed = Removing branch protection rule "%s" failed.
|
||||||
|
@ -2541,7 +2541,7 @@ settings.tags.protection.allowed.teams = Allowed teams
|
||||||
settings.tags.protection.allowed.noone = No one
|
settings.tags.protection.allowed.noone = No one
|
||||||
settings.tags.protection.create = Add rule
|
settings.tags.protection.create = Add rule
|
||||||
settings.tags.protection.none = There are no protected tags.
|
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 <a target="_blank" rel="noopener" href="https://forgejo.org/docs/latest/user/protection/#protected-tags">protected tags guide</a>.
|
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 <a target="_blank" rel="noopener" href="%s">protected tags guide</a>.
|
||||||
settings.bot_token = Bot token
|
settings.bot_token = Bot token
|
||||||
settings.chat_id = Chat ID
|
settings.chat_id = Chat ID
|
||||||
settings.thread_id = Thread ID
|
settings.thread_id = Thread ID
|
||||||
|
@ -2916,7 +2916,7 @@ last_page = Last
|
||||||
total = Total: %d
|
total = Total: %d
|
||||||
settings = Admin settings
|
settings = Admin settings
|
||||||
|
|
||||||
dashboard.new_version_hint = Forgejo %s is now available, you are running %s. Check <a target="_blank" rel="noreferrer" href="https://forgejo.org/news">the blog</a> for more details.
|
dashboard.new_version_hint = Forgejo %[1]s is now available, you are running %s. Check <a target="_blank" rel="noreferrer" href="%[2]s">the blog</a> for more details.
|
||||||
dashboard.statistic = Summary
|
dashboard.statistic = Summary
|
||||||
dashboard.operations = Maintenance operations
|
dashboard.operations = Maintenance operations
|
||||||
dashboard.system_status = System status
|
dashboard.system_status = System status
|
||||||
|
@ -3113,12 +3113,12 @@ packages.size = Size
|
||||||
packages.published = Published
|
packages.published = Published
|
||||||
|
|
||||||
defaulthooks = Default webhooks
|
defaulthooks = Default webhooks
|
||||||
defaulthooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Forgejo events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the <a target="_blank" rel="noopener" href="https://forgejo.org/docs/latest/user/webhooks/">webhooks guide</a>.
|
defaulthooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Forgejo events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the <a target="_blank" rel="noopener" href="%s">webhooks guide</a>.
|
||||||
defaulthooks.add_webhook = Add Default Webhook
|
defaulthooks.add_webhook = Add Default Webhook
|
||||||
defaulthooks.update_webhook = Update Default Webhook
|
defaulthooks.update_webhook = Update Default Webhook
|
||||||
|
|
||||||
systemhooks = System webhooks
|
systemhooks = System webhooks
|
||||||
systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Forgejo 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 <a target="_blank" rel="noopener" href="https://forgejo.org/docs/latest/user/webhooks/">webhooks guide</a>.
|
systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Forgejo 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 <a target="_blank" rel="noopener" href="%s">webhooks guide</a>.
|
||||||
systemhooks.add_webhook = Add System Webhook
|
systemhooks.add_webhook = Add System Webhook
|
||||||
systemhooks.update_webhook = Update System Webhook
|
systemhooks.update_webhook = Update System Webhook
|
||||||
|
|
||||||
|
@ -3214,18 +3214,18 @@ auths.tips.gmail_settings = Gmail settings:
|
||||||
auths.tips.oauth2.general = OAuth2 authentication
|
auths.tips.oauth2.general = OAuth2 authentication
|
||||||
auths.tips.oauth2.general.tip = When registering a new OAuth2 authentication, the callback/redirect URL should be:
|
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.oauth2_provider = OAuth2 provider
|
||||||
auths.tip.bitbucket = Register a new OAuth consumer on https://bitbucket.org/account/user/<your username>/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.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.dropbox = Create a new application at %s
|
||||||
auths.tip.facebook = Register a new application at https://developers.facebook.com/apps and add the product "Facebook Login"
|
auths.tip.facebook = Register a new application at %s and add the product "Facebook Login"
|
||||||
auths.tip.github = Register a new OAuth application on https://github.com/settings/applications/new
|
auths.tip.github = Register a new OAuth application on %s
|
||||||
auths.tip.gitlab_new = Register a new application on https://gitlab.com/-/profile/applications
|
auths.tip.gitlab_new = Register a new application on %s
|
||||||
auths.tip.google_plus = Obtain OAuth2 client credentials from the Google API console at https://console.developers.google.com/
|
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 (<server>/.well-known/openid-configuration) to specify the endpoints
|
auths.tip.openid_connect = Use the OpenID Connect Discovery URL (<server>/.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.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 https://discordapp.com/developers/applications/me
|
auths.tip.discord = Register a new application on %s
|
||||||
auths.tip.gitea = Register a new OAuth2 application. Guide can be found at https://forgejo.org/docs/latest/user/oauth2-provider
|
auths.tip.gitea = Register a new OAuth2 application. Guide can be found at %s
|
||||||
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.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.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.edit = Edit authentication source
|
||||||
auths.activated = This authentication source is activated
|
auths.activated = This authentication source is activated
|
||||||
|
|
|
@ -34,7 +34,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sys["Title"] = ctx.Tr("admin.systemhooks")
|
sys["Title"] = ctx.Tr("admin.systemhooks")
|
||||||
sys["Description"] = ctx.Tr("admin.systemhooks.desc")
|
sys["Description"] = ctx.Tr("admin.systemhooks.desc", "https://forgejo.org/docs/latest/user/webhooks/")
|
||||||
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, false)
|
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, false)
|
||||||
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
||||||
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
|
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
|
||||||
|
@ -45,7 +45,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
def["Title"] = ctx.Tr("admin.defaulthooks")
|
def["Title"] = ctx.Tr("admin.defaulthooks")
|
||||||
def["Description"] = ctx.Tr("admin.defaulthooks.desc")
|
def["Description"] = ctx.Tr("admin.defaulthooks.desc", "https://forgejo.org/docs/latest/user/webhooks/")
|
||||||
def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx)
|
def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx)
|
||||||
def["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
def["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
||||||
def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks"
|
def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks"
|
||||||
|
|
|
@ -166,7 +166,7 @@ func NewUserPost(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
if err := password.IsPwned(ctx, form.Password); err != nil {
|
if err := password.IsPwned(ctx, form.Password); err != nil {
|
||||||
ctx.Data["Err_Password"] = true
|
ctx.Data["Err_Password"] = true
|
||||||
errMsg := ctx.Tr("auth.password_pwned")
|
errMsg := ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords")
|
||||||
if password.IsErrIsPwnedRequest(err) {
|
if password.IsErrIsPwnedRequest(err) {
|
||||||
log.Error(err.Error())
|
log.Error(err.Error())
|
||||||
errMsg = ctx.Tr("auth.password_pwned_err")
|
errMsg = ctx.Tr("auth.password_pwned_err")
|
||||||
|
@ -401,7 +401,7 @@ func EditUserPost(ctx *context.Context) {
|
||||||
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplUserEdit, &form)
|
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplUserEdit, &form)
|
||||||
case errors.Is(err, password.ErrIsPwned):
|
case errors.Is(err, password.ErrIsPwned):
|
||||||
ctx.Data["Err_Password"] = true
|
ctx.Data["Err_Password"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned"), tplUserEdit, &form)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords"), tplUserEdit, &form)
|
||||||
case password.IsErrIsPwnedRequest(err):
|
case password.IsErrIsPwnedRequest(err):
|
||||||
ctx.Data["Err_Password"] = true
|
ctx.Data["Err_Password"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplUserEdit, &form)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplUserEdit, &form)
|
||||||
|
|
|
@ -500,7 +500,7 @@ func SignUpPost(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := password.IsPwned(ctx, form.Password); err != nil {
|
if err := password.IsPwned(ctx, form.Password); err != nil {
|
||||||
errMsg := ctx.Tr("auth.password_pwned")
|
errMsg := ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords")
|
||||||
if password.IsErrIsPwnedRequest(err) {
|
if password.IsErrIsPwnedRequest(err) {
|
||||||
log.Error(err.Error())
|
log.Error(err.Error())
|
||||||
errMsg = ctx.Tr("auth.password_pwned_err")
|
errMsg = ctx.Tr("auth.password_pwned_err")
|
||||||
|
|
|
@ -212,7 +212,7 @@ func ResetPasswdPost(ctx *context.Context) {
|
||||||
case errors.Is(err, password.ErrComplexity):
|
case errors.Is(err, password.ErrComplexity):
|
||||||
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplResetPassword, nil)
|
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplResetPassword, nil)
|
||||||
case errors.Is(err, password.ErrIsPwned):
|
case errors.Is(err, password.ErrIsPwned):
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned"), tplResetPassword, nil)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords"), tplResetPassword, nil)
|
||||||
case password.IsErrIsPwnedRequest(err):
|
case password.IsErrIsPwnedRequest(err):
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplResetPassword, nil)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplResetPassword, nil)
|
||||||
default:
|
default:
|
||||||
|
@ -295,7 +295,7 @@ func MustChangePasswordPost(ctx *context.Context) {
|
||||||
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplMustChangePassword, &form)
|
ctx.RenderWithErr(password.BuildComplexityError(ctx.Locale), tplMustChangePassword, &form)
|
||||||
case errors.Is(err, password.ErrIsPwned):
|
case errors.Is(err, password.ErrIsPwned):
|
||||||
ctx.Data["Err_Password"] = true
|
ctx.Data["Err_Password"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned"), tplMustChangePassword, &form)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords"), tplMustChangePassword, &form)
|
||||||
case password.IsErrIsPwnedRequest(err):
|
case password.IsErrIsPwnedRequest(err):
|
||||||
ctx.Data["Err_Password"] = true
|
ctx.Data["Err_Password"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplMustChangePassword, &form)
|
ctx.RenderWithErr(ctx.Tr("auth.password_pwned_err"), tplMustChangePassword, &form)
|
||||||
|
|
|
@ -72,7 +72,7 @@ func AccountPost(ctx *context.Context) {
|
||||||
case errors.Is(err, password.ErrComplexity):
|
case errors.Is(err, password.ErrComplexity):
|
||||||
ctx.Flash.Error(password.BuildComplexityError(ctx.Locale))
|
ctx.Flash.Error(password.BuildComplexityError(ctx.Locale))
|
||||||
case errors.Is(err, password.ErrIsPwned):
|
case errors.Is(err, password.ErrIsPwned):
|
||||||
ctx.Flash.Error(ctx.Tr("auth.password_pwned"))
|
ctx.Flash.Error(ctx.Tr("auth.password_pwned", "https://haveibeenpwned.com/Passwords"))
|
||||||
case password.IsErrIsPwnedRequest(err):
|
case password.IsErrIsPwnedRequest(err):
|
||||||
ctx.Flash.Error(ctx.Tr("auth.password_pwned_err"))
|
ctx.Flash.Error(ctx.Tr("auth.password_pwned_err"))
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -91,29 +91,29 @@
|
||||||
<h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
|
<h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<li>Bitbucket</li>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<li>OpenID Connect</li>
|
||||||
<span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span>
|
<span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span>
|
||||||
<li>Twitter</li>
|
<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>
|
<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>
|
<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>
|
<li>Nextcloud</li>
|
||||||
<span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span>
|
<span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span>
|
||||||
<li>Yandex</li>
|
<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>
|
<li>Mastodon</li>
|
||||||
<span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span>
|
<span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="admin-setting-content">
|
<div class="admin-setting-content">
|
||||||
{{if .NeedUpdate}}
|
{{if .NeedUpdate}}
|
||||||
<div class="ui negative message flash-error">
|
<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>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="large">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide center column">
|
<div class="eight wide center column">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
|
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="large">
|
<p class="large">
|
||||||
{{ctx.Locale.Tr "startpage.platform_desc"}}
|
{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="large">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,15 +14,15 @@
|
||||||
<legend>{{ctx.Locale.Tr "repo.settings.protect_patterns"}}</legend>
|
<legend>{{ctx.Locale.Tr "repo.settings.protect_patterns"}}</legend>
|
||||||
<label>{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern"}}
|
<label>{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern"}}
|
||||||
<input name="rule_name" type="text" value="{{.Rule.RuleName}}">
|
<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>
|
||||||
<label>{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns"}}
|
<label>{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns"}}
|
||||||
<input name="protected_file_patterns" type="text" value="{{.Rule.ProtectedFilePatterns}}">
|
<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>
|
||||||
<label>{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns"}}
|
<label>{{ctx.Locale.Tr "repo.settings.protect_unprotected_file_patterns"}}
|
||||||
<input name="unprotected_file_patterns" type="text" value="{{.Rule.UnprotectedFilePatterns}}">
|
<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>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="ui input">
|
<div class="ui input">
|
||||||
<input class="prompt" name="name_pattern" autocomplete="off" value="{{.name_pattern}}" placeholder="v*" autofocus required>
|
<input class="prompt" name="name_pattern" autocomplete="off" value="{{.name_pattern}}" placeholder="v*" autofocus required>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="whitelist field">
|
<div class="whitelist field">
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="center tw-mt-8">
|
<div class="center tw-mt-8">
|
||||||
{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
|
{{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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4>
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4>
|
||||||
<div class="ui attached segment">
|
<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>
|
<p>{{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}</p>
|
||||||
{{template "user/auth/webauthn_error" .}}
|
{{template "user/auth/webauthn_error" .}}
|
||||||
<div class="flex-list">
|
<div class="flex-list">
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="branch_filter">{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label>
|
<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 "*"}}">
|
<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>
|
</div>
|
||||||
|
|
||||||
{{$skipAuthorizationHeader := or (eq .HookType "sourcehut_builds") (eq .HookType "matrix")}}
|
{{$skipAuthorizationHeader := or (eq .HookType "sourcehut_builds") (eq .HookType "matrix")}}
|
||||||
|
|
Loading…
Reference in a new issue