summaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
authorngourdon <31291059+ngourdon@users.noreply.github.com>2019-05-05 00:44:43 +0200
committerzeripath <art27@cantab.net>2019-05-04 23:44:43 +0100
commit7806deab967716b7ad5779334d692c2896309171 (patch)
tree80412037fd375057b96081597c681576bb69bdb1 /modules/templates
parente0dde8173f0da6cb3628cadca564a219df082d76 (diff)
downloadgitea-7806deab967716b7ad5779334d692c2896309171.tar.gz
gitea-7806deab967716b7ad5779334d692c2896309171.zip
add french specific rule for translating plural texts (#6846)
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/helper.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 94e0748872..6d964e88a5 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -486,6 +486,12 @@ var trNLangRules = map[string]func(int64) int{
"zh-TW": func(cnt int64) int {
return 0
},
+ "fr-FR": func(cnt int64) int {
+ if cnt > -2 && cnt < 2 {
+ return 0
+ }
+ return 1
+ },
}
// TrN returns key to be used for plural text translation