diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-08-02 16:24:04 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-08-02 19:40:32 +0200 |
commit | 3a96655592d0b0db4126f20ca717d553dda9c4ed (patch) | |
tree | 659ab65dda84c17f3406e33a294aa0ac3d325e1e /tpl | |
parent | 9a7383caf3945b9b11db2b108003f87e2e8b6a3a (diff) |
Reduce binary size vs locale, update to CLDR v36.1
Test building with `go build -ldflags="-s -w"`
Hugo 0.86.2: 46MB
Before this commit: 77MB
After this commit: 54MB
Fixes #8839
Fixes #8841
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/lang/lang.go | 6 | ||||
-rw-r--r-- | tpl/lang/lang_test.go | 2 | ||||
-rw-r--r-- | tpl/time/time.go | 2 | ||||
-rw-r--r-- | tpl/time/time_test.go | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/tpl/lang/lang.go b/tpl/lang/lang.go index 0cf448caa..49f4dc1ec 100644 --- a/tpl/lang/lang.go +++ b/tpl/lang/lang.go @@ -20,8 +20,8 @@ import ( "strconv" "strings" - translators "github.com/bep/gotranslators" - "github.com/go-playground/locales" + translators "github.com/gohugoio/localescompressed" + "github.com/gohugoio/locales" "github.com/pkg/errors" "github.com/gohugoio/hugo/deps" @@ -186,7 +186,7 @@ func (ns *Namespace) FormatNumberCustom(precision, number interface{}, options . exp := math.Pow(10.0, float64(prec)) r := math.Round(n*exp) / exp - // Logic from MIT Licensed github.com/go-playground/locales/ + // Logic from MIT Licensed github.com/gohugoio/locales/ // Original Copyright (c) 2016 Go Playground s := strconv.FormatFloat(math.Abs(r), 'f', prec, 64) diff --git a/tpl/lang/lang_test.go b/tpl/lang/lang_test.go index 782a0a69a..3a1f66df7 100644 --- a/tpl/lang/lang_test.go +++ b/tpl/lang/lang_test.go @@ -3,7 +3,7 @@ package lang import ( "testing" - translators "github.com/bep/gotranslators" + translators "github.com/gohugoio/localescompressed" qt "github.com/frankban/quicktest" "github.com/gohugoio/hugo/deps" ) diff --git a/tpl/time/time.go b/tpl/time/time.go index f91bf1047..b89dcfe09 100644 --- a/tpl/time/time.go +++ b/tpl/time/time.go @@ -21,7 +21,7 @@ import ( "github.com/gohugoio/hugo/common/htime" - "github.com/go-playground/locales" + "github.com/gohugoio/locales" "github.com/spf13/cast" ) diff --git a/tpl/time/time_test.go b/tpl/time/time_test.go index 22cbc9bcc..518d9f846 100644 --- a/tpl/time/time_test.go +++ b/tpl/time/time_test.go @@ -17,7 +17,7 @@ import ( "testing" "time" - translators "github.com/bep/gotranslators" + translators "github.com/gohugoio/localescompressed" ) func TestTimeLocation(t *testing.T) { |