From e61b390d545919244141b699b28e3fbc42adc66f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 2 Jan 2022 11:33:57 +0800 Subject: Unify and simplify TrN for i18n (#18141) Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099 Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic. --- templates/mail/issue/default.tmpl | 2 +- templates/repo/activity.tmpl | 55 ++++++++++++++++--------- templates/repo/blame.tmpl | 2 +- templates/repo/create.tmpl | 2 +- templates/repo/issue/view_content/comments.tmpl | 6 +-- templates/repo/issue/view_content/pull.tmpl | 4 +- templates/repo/sub_menu.tmpl | 6 +-- templates/repo/view_file.tmpl | 2 +- templates/shared/issuelist.tmpl | 8 ++-- 9 files changed, 51 insertions(+), 36 deletions(-) (limited to 'templates') diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index e01ec667ee..aa91861d11 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -30,7 +30,7 @@ {{.i18n.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink | Str2html}} {{else}} - {{.i18n.Tr (TrN .i18n.Lang (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n") .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits) | Str2html}} + {{.i18n.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits) | Str2html}} {{end}}
{{.i18n.Tr (TrN .i18n.Lang .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n") .MaxCreationLimit}}
{{.i18n.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimit}}