Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/locales.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoeybloggs <Dean.Karn@gmail.com>2016-08-15 05:59:51 +0300
committerjoeybloggs <Dean.Karn@gmail.com>2016-08-15 05:59:51 +0300
commit7a50918c70b219070868048aa533f5b142880103 (patch)
tree3399743aeba4da4c909d0bb6766dcd12b6739d21 /prg/prg.go
parent15e8d9841c4e3269faa135537ab14e77ae1a0a81 (diff)
Modify to store percent prefix & suffix on translator instance ( when available )
Diffstat (limited to 'prg/prg.go')
-rw-r--r--prg/prg.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/prg/prg.go b/prg/prg.go
index 55f77163..4b30391c 100644
--- a/prg/prg.go
+++ b/prg/prg.go
@@ -15,6 +15,8 @@ type prg struct {
group []byte
minus []byte
percent []byte
+ percentPrefix []byte
+ percentSuffix []byte
perMille []byte
currencies [][]byte // idx = enum of currency code
}
@@ -56,8 +58,8 @@ func (prg *prg) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
f := locales.F(n, v)
nMod10 := math.Mod(n, 10)
nMod100 := math.Mod(n, 100)
- fMod10 := f % 10
fMod100 := f % 100
+ fMod10 := f % 10
if (nMod10 == 0) || (nMod100 >= 11 && nMod100 <= 19) || (v == 2 && fMod100 >= 11 && fMod100 <= 19) {
return locales.PluralRuleZero