diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 32d9bebc8b1a3..2ae800c21fbc9 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -23,6 +23,7 @@ enable_javascript = This website requires JavaScript. toc = Table of Contents licenses = Licenses return_to_gitea = Return to Gitea +abbr_not_available = N/A username = Username email = Email Address diff --git a/templates/admin/cron.tmpl b/templates/admin/cron.tmpl index 6ab37ca354844..6e812632e8619 100644 --- a/templates/admin/cron.tmpl +++ b/templates/admin/cron.tmpl @@ -22,7 +22,7 @@ {{$.locale.Tr (printf "admin.dashboard.%s" .Name)}} {{.Spec}} {{DateTime "full" .Next}} - {{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}N/A{{end}} + {{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}{{$.locale.Tr "abbr_not_available"}}{{end}} {{.ExecTimes}} {{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}} diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index 5e4390937c5f6..9b5d48e7a91bc 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -7,11 +7,11 @@ {{svg "octicon-git-commit"}} {{$.locale.Tr "repo.pulls.tab_commits"}} - {{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}} + {{if .NumCommits}}{{.NumCommits}}{{else}}{{$.locale.Tr "abbr_not_available"}}{{end}} {{svg "octicon-diff"}} {{$.locale.Tr "repo.pulls.tab_files"}} - {{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}} + {{if .NumFiles}}{{.NumFiles}}{{else}}{{$.locale.Tr "abbr_not_available"}}{{end}} diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 2102dac641027..39d85b8847afb 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -174,7 +174,7 @@ {{else}} - N/A + {{$.locale.Tr "abbr_not_available"}} {{end}} diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index e573d221d14be..cfde83d5aba72 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -37,7 +37,7 @@ {{.ResponseInfo.Status}} {{end}} {{else}} - N/A + {{$.locale.Tr "abbr_not_available"}} {{end}} {{if or $.Permission.IsAdmin $.IsOrganizationOwner $.PageIsAdmin $.PageIsUserSettings}} @@ -59,7 +59,7 @@
{{$.locale.Tr "repo.settings.webhook.payload"}}
{{.PayloadContent}}
{{else}} - N/A + {{$.locale.Tr "abbr_not_available"}} {{end}}
@@ -70,7 +70,7 @@
{{$.locale.Tr "repo.settings.webhook.body"}}
{{.ResponseInfo.Body}}
{{else}} - N/A + {{$.locale.Tr "abbr_not_available"}} {{end}}
diff --git a/web_src/js/features/repo-settings.js b/web_src/js/features/repo-settings.js index 9f094cd2d1624..67a71c4fdd0fd 100644 --- a/web_src/js/features/repo-settings.js +++ b/web_src/js/features/repo-settings.js @@ -32,6 +32,7 @@ export function initRepoSettingsCollaboration() { if ($item) { $dropdown.dropdown('set selected', $dropdown.attr('data-last-value')); } else { + // TODO: should use the localized key "abbr_not_available" $text.text('(N/A)'); // prevent from misleading users when the access mode is undefined } }, 0);