From 7806deab967716b7ad5779334d692c2896309171 Mon Sep 17 00:00:00 2001 From: ngourdon <31291059+ngourdon@users.noreply.github.com> Date: Sun, 5 May 2019 00:44:43 +0200 Subject: [PATCH] add french specific rule for translating plural texts (#6846) --- modules/templates/helper.go | 6 ++++++ 1 file changed, 6 insertions(+) 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