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
path: root/ln_CF
diff options
context:
space:
mode:
authorDean Karn <Dean.Karn@metricaid.com>2016-09-11 16:37:03 +0300
committerDean Karn <Dean.Karn@metricaid.com>2016-09-11 16:37:03 +0300
commit5b6f32dd67efd00b8d58b98ea7d6c8b7fdff6e9b (patch)
tree19a0522646eafcdc8bc4a83b67fdaa68da814cc4 /ln_CF
parentaaae900248cc5de78e3c73c1ec3b3cc6dac92f9b (diff)
add check for multibyte chars after switching from []byte to string
Diffstat (limited to 'ln_CF')
-rw-r--r--ln_CF/ln_CF.go23
1 files changed, 10 insertions, 13 deletions
diff --git a/ln_CF/ln_CF.go b/ln_CF/ln_CF.go
index f5a5607b..12a8b3d3 100644
--- a/ln_CF/ln_CF.go
+++ b/ln_CF/ln_CF.go
@@ -69,7 +69,7 @@ func New() locales.Translator {
erasAbbreviated: []string{"libóso ya", "nsima ya Y"},
erasNarrow: []string{"", ""},
erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"},
- timezones: map[string]string{"ADT": "ADT", "NZDT": "NZDT", "ARST": "ARST", "JDT": "JDT", "HADT": "HADT", "WIB": "WIB", "ECT": "ECT", "LHST": "LHST", "HAST": "HAST", "EST": "EST", "AST": "AST", "WEZ": "WEZ", "UYT": "UYT", "BOT": "BOT", "HNT": "HNT", "CLT": "CLT", "MDT": "MDT", "MEZ": "MEZ", "MST": "MST", "CHAST": "CHAST", "GYT": "GYT", "ACWST": "ACWST", "CST": "CST", "HKT": "HKT", "UYST": "UYST", "PST": "PST", "ART": "ART", "WAT": "WAT", "COT": "COT", "WART": "WART", "TMST": "TMST", "SAST": "Ntángo ya Afríka ya Sidi", "LHDT": "LHDT", "AWST": "AWST", "CAT": "Ntángo ya Lubumbashi", "AEDT": "AEDT", "WIT": "WIT", "AKST": "AKST", "AKDT": "AKDT", "IST": "IST", "AWDT": "AWDT", "MYT": "MYT", "NZST": "NZST", "COST": "COST", "CHADT": "CHADT", "SRT": "SRT", "AEST": "AEST", "PDT": "PDT", "TMT": "TMT", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "CLST": "CLST", "GMT": "Ntángo ya Londoni", "ACST": "ACST", "WARST": "WARST", "ACWDT": "ACWDT", "GFT": "GFT", "WITA": "WITA", "ChST": "ChST", "HAT": "HAT", "OEZ": "OEZ", "HKST": "HKST", "WESZ": "WESZ", "MESZ": "MESZ", "BT": "BT", "VET": "VET", "OESZ": "OESZ", "WAST": "WAST", "JST": "JST", "∅∅∅": "∅∅∅", "SGT": "SGT", "CDT": "CDT", "EDT": "EDT", "ACDT": "ACDT"},
+ timezones: map[string]string{"BOT": "BOT", "SGT": "SGT", "AWDT": "AWDT", "EDT": "EDT", "ACWST": "ACWST", "WART": "WART", "GMT": "Ntángo ya Londoni", "LHDT": "LHDT", "BT": "BT", "∅∅∅": "∅∅∅", "UYT": "UYT", "TMT": "TMT", "HAST": "HAST", "NZST": "NZST", "ACWDT": "ACWDT", "CHADT": "CHADT", "SRT": "SRT", "MEZ": "MEZ", "AEST": "AEST", "HAT": "HAT", "CAT": "Ntángo ya Lubumbashi", "CDT": "CDT", "ECT": "ECT", "WIB": "WIB", "OEZ": "OEZ", "ACST": "ACST", "ART": "ART", "NZDT": "NZDT", "CHAST": "CHAST", "HKT": "HKT", "MYT": "MYT", "GFT": "GFT", "WITA": "WITA", "COST": "COST", "WESZ": "WESZ", "WIT": "WIT", "HNT": "HNT", "HKST": "HKST", "TMST": "TMST", "CST": "CST", "HADT": "HADT", "WAST": "WAST", "JST": "JST", "WARST": "WARST", "AWST": "AWST", "GYT": "GYT", "JDT": "JDT", "PST": "PST", "PDT": "PDT", "EST": "EST", "WAT": "WAT", "WEZ": "WEZ", "VET": "VET", "UYST": "UYST", "AKST": "AKST", "ACDT": "ACDT", "AEDT": "AEDT", "IST": "IST", "ChST": "ChST", "COT": "COT", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "MESZ": "MESZ", "AST": "AST", "AKDT": "AKDT", "LHST": "LHST", "MST": "MST", "MDT": "MDT", "CLT": "CLT", "ADT": "ADT", "SAST": "Ntángo ya Afríka ya Sidi", "OESZ": "OESZ", "CLST": "CLST", "ARST": "ARST"},
}
}
@@ -186,7 +186,8 @@ func (ln *ln_CF) WeekdaysWide() []string {
}
// FmtNumber returns 'num' with digits/precision of 'v' for 'ln_CF' and handles both Whole and Real numbers based on 'v'
-func (ln *ln_CF) FmtNumber(num float64, v uint64) (results string) {
+func (ln *ln_CF) FmtNumber(num float64, v uint64) string {
+
s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
l := len(s) + len(ln.decimal) + len(ln.group)*len(s[:len(s)-int(v)-1])/3
count := 0
@@ -222,19 +223,17 @@ func (ln *ln_CF) FmtNumber(num float64, v uint64) (results string) {
b[i], b[j] = b[j], b[i]
}
- results = string(b)
- return
+ return string(b)
}
// FmtPercent returns 'num' with digits/precision of 'v' for 'ln_CF' and handles both Whole and Real numbers based on 'v'
// NOTE: 'num' passed into FmtPercent is assumed to be in percent already
-func (ln *ln_CF) FmtPercent(num float64, v uint64) (results string) {
- results = strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
- return
+func (ln *ln_CF) FmtPercent(num float64, v uint64) string {
+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
}
// FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ln_CF'
-func (ln *ln_CF) FmtCurrency(num float64, v uint64, currency currency.Type) (results string) {
+func (ln *ln_CF) FmtCurrency(num float64, v uint64, currency currency.Type) string {
s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
symbol := ln.currencies[currency]
@@ -287,13 +286,12 @@ func (ln *ln_CF) FmtCurrency(num float64, v uint64, currency currency.Type) (res
b = append(b, symbol...)
- results = string(b)
- return
+ return string(b)
}
// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ln_CF'
// in accounting notation.
-func (ln *ln_CF) FmtAccounting(num float64, v uint64, currency currency.Type) (results string) {
+func (ln *ln_CF) FmtAccounting(num float64, v uint64, currency currency.Type) string {
s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
symbol := ln.currencies[currency]
@@ -353,8 +351,7 @@ func (ln *ln_CF) FmtAccounting(num float64, v uint64, currency currency.Type) (r
b = append(b, symbol...)
}
- results = string(b)
- return
+ return string(b)
}
// FmtDateShort returns the short date representation of 't' for 'ln_CF'