From 6e6da2c2765ef7b350a7c9139ffb2444f2383151 Mon Sep 17 00:00:00 2001
From: James Lakin
Date: Fri, 7 Feb 2020 16:38:18 +0000
Subject: [PATCH] =?UTF-8?q?Tweak=20locale=20to=20respect=20singular=20conf?=
=?UTF-8?q?licting=20file=20message=20in=20P=E2=80=A6=20(#10177)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Antoine GIRARD
---
options/locale/locale_en-US.ini | 3 ++-
templates/repo/issue/list.tmpl | 2 +-
templates/user/dashboard/issues.tmpl | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 88fbce598f..2f7e0acb63 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -1066,7 +1066,8 @@ pulls.blocked_by_rejection = "This Pull Request has changes requested by an offi
pulls.can_auto_merge_desc = This pull request can be merged automatically.
pulls.cannot_auto_merge_desc = This pull request cannot be merged automatically due to conflicts.
pulls.cannot_auto_merge_helper = Merge manually to resolve the conflicts.
-pulls.num_conflicting_files = "%d conflicting files"
+pulls.num_conflicting_files_1 = "%d conflicting file"
+pulls.num_conflicting_files_n = "%d conflicting files"
pulls.no_merge_desc = This pull request cannot be merged because all repository merge options are disabled.
pulls.no_merge_helper = Enable merge options in the repository settings or merge the pull request manually.
pulls.no_merge_wip = This pull request can not be merged because it is marked as being a work in progress.
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 16cee8619d..9cf6cdd972 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -269,7 +269,7 @@
{{end}}
{{if .IsPull}}
{{if (len .PullRequest.ConflictedFiles) gt 0}}
- {{$.i18n.Tr "repo.pulls.num_conflicting_files" (len .PullRequest.ConflictedFiles)}}
+ {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}
{{end}}
{{end}}
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index 113dcf21f8..a5d7c1454e 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -153,7 +153,7 @@
{{end}}
{{if .IsPull}}
{{if (len .PullRequest.ConflictedFiles) gt 0}}
- {{$.i18n.Tr "repo.pulls.num_conflicting_files" (len .PullRequest.ConflictedFiles)}}
+ {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}
{{end}}
{{end}}