diff options
author | joeybloggs <Dean.Karn@gmail.com> | 2016-08-15 05:41:26 +0300 |
---|---|---|
committer | joeybloggs <Dean.Karn@gmail.com> | 2016-08-15 05:41:26 +0300 |
commit | 15e8d9841c4e3269faa135537ab14e77ae1a0a81 (patch) | |
tree | bd1e150efc7f3b56df3400489d168b21b9ff7913 /be | |
parent | fb2acb93602d54a9be9ff735bcabbe17a66cb876 (diff) |
sure up percent prefix logic, just need to turn prefixes into bytes...
Diffstat (limited to 'be')
-rw-r--r-- | be/be.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -53,8 +53,8 @@ func (be *be) PluralsOrdinal() []locales.PluralRule { func (be *be) CardinalPluralRule(num float64, v uint64) locales.PluralRule { n := math.Abs(num) - nMod100 := math.Mod(n, 100) nMod10 := math.Mod(n, 10) + nMod100 := math.Mod(n, 100) if nMod10 == 1 && nMod100 != 11 { return locales.PluralRuleOne @@ -71,8 +71,8 @@ func (be *be) CardinalPluralRule(num float64, v uint64) locales.PluralRule { func (be *be) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { n := math.Abs(num) - nMod100 := math.Mod(n, 100) nMod10 := math.Mod(n, 10) + nMod100 := math.Mod(n, 100) if (nMod10 == 2 || nMod10 == 3) && (nMod100 != 12 && nMod100 != 13) { return locales.PluralRuleFew @@ -163,7 +163,9 @@ func (be *be) FmtPercent(num float64, v uint64) []byte { b[i], b[j] = b[j], b[i] } - b = append(b, be.Percent[0]) + b = append(b, " "...) + + b = append(b, be.percent...) return b } |