Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4652ae4

Browse files
committed
Move to new locales library and upgrade CLDR from v36.1 to v48.1
* I had all kinds of issues upgrading CLDR on the old library, so I decided to start fresh in github.com/bep/golocales * It shaves off about 3 MB of the binary, and package init cost is zero compared to the old localescompressed (5000x faster). * We will probably move to the `text/**` packages at this point, but this will have to do for now.
1 parent 4eafd9e commit 4652ae4

10 files changed

Lines changed: 77 additions & 103 deletions

File tree

common/htime/time.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
"strings"
1919
"time"
2020

21+
"github.com/bep/golocales"
22+
2123
"github.com/bep/clocks"
2224
"github.com/spf13/cast"
23-
24-
"github.com/gohugoio/locales"
2525
)
2626

2727
var (
@@ -78,9 +78,9 @@ var (
7878
Clock = clocks.System()
7979
)
8080

81-
func NewTimeFormatter(ltr locales.Translator) TimeFormatter {
81+
func NewTimeFormatter(ltr golocales.Translator) TimeFormatter {
8282
if ltr == nil {
83-
panic("must provide a locales.Translator")
83+
panic("must provide a golocales.Translator")
8484
}
8585
return TimeFormatter{
8686
ltr: ltr,
@@ -89,7 +89,7 @@ func NewTimeFormatter(ltr locales.Translator) TimeFormatter {
8989

9090
// TimeFormatter is locale aware.
9191
type TimeFormatter struct {
92-
ltr locales.Translator
92+
ltr golocales.Translator
9393
}
9494

9595
func (f TimeFormatter) Format(t time.Time, layout string) string {
@@ -101,39 +101,39 @@ func (f TimeFormatter) Format(t time.Time, layout string) string {
101101
// It may be one of Hugo's custom layouts.
102102
switch strings.ToLower(layout[1:]) {
103103
case "date_full":
104-
return f.ltr.FmtDateFull(t)
104+
return f.ltr.FormatDateFull(t)
105105
case "date_long":
106-
return f.ltr.FmtDateLong(t)
106+
return f.ltr.FormatDateLong(t)
107107
case "date_medium":
108-
return f.ltr.FmtDateMedium(t)
108+
return f.ltr.FormatDateMedium(t)
109109
case "date_short":
110-
return f.ltr.FmtDateShort(t)
110+
return f.ltr.FormatDateShort(t)
111111
case "time_full":
112-
return f.ltr.FmtTimeFull(t)
112+
return f.ltr.FormatTimeFull(t)
113113
case "time_long":
114-
return f.ltr.FmtTimeLong(t)
114+
return f.ltr.FormatTimeLong(t)
115115
case "time_medium":
116-
return f.ltr.FmtTimeMedium(t)
116+
return f.ltr.FormatTimeMedium(t)
117117
case "time_short":
118-
return f.ltr.FmtTimeShort(t)
118+
return f.ltr.FormatTimeShort(t)
119119
}
120120
}
121121

122122
s := t.Format(layout)
123123

124-
monthIdx := t.Month() - 1 // Month() starts at 1.
124+
monthIdx := t.Month() - 1 // time.Month is 1-based, but our month name slices are 0-based.
125125
dayIdx := t.Weekday()
126126

127127
if strings.Contains(layout, "January") {
128-
s = strings.ReplaceAll(s, longMonthNames[monthIdx], f.ltr.MonthWide(t.Month()))
128+
s = strings.ReplaceAll(s, longMonthNames[monthIdx], f.ltr.MonthsWide()[monthIdx])
129129
} else if strings.Contains(layout, "Jan") {
130-
s = strings.ReplaceAll(s, shortMonthNames[monthIdx], f.ltr.MonthAbbreviated(t.Month()))
130+
s = strings.ReplaceAll(s, shortMonthNames[monthIdx], f.ltr.MonthsAbbreviated()[monthIdx])
131131
}
132132

133133
if strings.Contains(layout, "Monday") {
134-
s = strings.ReplaceAll(s, longDayNames[dayIdx], f.ltr.WeekdayWide(t.Weekday()))
134+
s = strings.ReplaceAll(s, longDayNames[dayIdx], f.ltr.WeekdaysWide()[dayIdx])
135135
} else if strings.Contains(layout, "Mon") {
136-
s = strings.ReplaceAll(s, shortDayNames[dayIdx], f.ltr.WeekdayAbbreviated(t.Weekday()))
136+
s = strings.ReplaceAll(s, shortDayNames[dayIdx], f.ltr.WeekdaysAbbreviated()[dayIdx])
137137
}
138138

139139
return s

common/htime/time_test.go

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import (
1717
"testing"
1818
"time"
1919

20+
"github.com/bep/golocales"
21+
2022
qt "github.com/frankban/quicktest"
21-
translators "github.com/gohugoio/localescompressed"
2223
)
2324

2425
func TestTimeFormatter(t *testing.T) {
@@ -34,75 +35,75 @@ func TestTimeFormatter(t *testing.T) {
3435
mondayNovemberFirst = mondayNovemberFirst.Add(33 * time.Second)
3536

3637
c.Run("Norsk nynorsk", func(c *qt.C) {
37-
f := NewTimeFormatter(translators.GetTranslator("nn"))
38+
f := NewTimeFormatter(golocales.New("nn"))
3839

3940
c.Assert(f.Format(june06, "Monday Jan 2 2006"), qt.Equals, "onsdag juni 6 2018")
4041
c.Assert(f.Format(june06, "Mon January 2 2006"), qt.Equals, "on. juni 6 2018")
4142
c.Assert(f.Format(june06, "Mon Mon"), qt.Equals, "on. on.")
4243
})
4344

4445
c.Run("Custom layouts Norsk nynorsk", func(c *qt.C) {
45-
f := NewTimeFormatter(translators.GetTranslator("nn"))
46+
f := NewTimeFormatter(golocales.New("nn"))
4647

4748
c.Assert(f.Format(june06, ":date_full"), qt.Equals, "onsdag 6. juni 2018")
4849
c.Assert(f.Format(june06, ":date_long"), qt.Equals, "6. juni 2018")
4950
c.Assert(f.Format(june06, ":date_medium"), qt.Equals, "6. juni 2018")
50-
c.Assert(f.Format(june06, ":date_short"), qt.Equals, "06.06.2018")
51+
c.Assert(f.Format(june06, ":date_short"), qt.Equals, "06.06.18")
5152

52-
c.Assert(f.Format(june06, ":time_full"), qt.Equals, "kl. 02:09:37 UTC")
53+
c.Assert(f.Format(june06, ":time_full"), qt.Equals, "02:09:37 UTC")
5354
c.Assert(f.Format(june06, ":time_long"), qt.Equals, "02:09:37 UTC")
5455
c.Assert(f.Format(june06, ":time_medium"), qt.Equals, "02:09:37")
5556
c.Assert(f.Format(june06, ":time_short"), qt.Equals, "02:09")
5657
})
5758

5859
c.Run("Custom layouts English", func(c *qt.C) {
59-
f := NewTimeFormatter(translators.GetTranslator("en"))
60+
f := NewTimeFormatter(golocales.New("en"))
6061

6162
c.Assert(f.Format(june06, ":date_full"), qt.Equals, "Wednesday, June 6, 2018")
6263
c.Assert(f.Format(june06, ":date_long"), qt.Equals, "June 6, 2018")
6364
c.Assert(f.Format(june06, ":date_medium"), qt.Equals, "Jun 6, 2018")
6465
c.Assert(f.Format(june06, ":date_short"), qt.Equals, "6/6/18")
6566

66-
c.Assert(f.Format(june06, ":time_full"), qt.Equals, "2:09:37 am UTC")
67-
c.Assert(f.Format(june06, ":time_long"), qt.Equals, "2:09:37 am UTC")
68-
c.Assert(f.Format(june06, ":time_medium"), qt.Equals, "2:09:37 am")
69-
c.Assert(f.Format(june06, ":time_short"), qt.Equals, "2:09 am")
67+
c.Assert(f.Format(june06, ":time_full"), qt.Equals, "2:09:37\u202fam UTC")
68+
c.Assert(f.Format(june06, ":time_long"), qt.Equals, "2:09:37\u202fam UTC")
69+
c.Assert(f.Format(june06, ":time_medium"), qt.Equals, "2:09:37\u202fam")
70+
c.Assert(f.Format(june06, ":time_short"), qt.Equals, "2:09\u202fam")
7071
})
7172

7273
c.Run("English", func(c *qt.C) {
73-
f := NewTimeFormatter(translators.GetTranslator("en"))
74+
f := NewTimeFormatter(golocales.New("en"))
7475

7576
c.Assert(f.Format(june06, "Monday Jan 2 2006"), qt.Equals, "Wednesday Jun 6 2018")
7677
c.Assert(f.Format(june06, "Mon January 2 2006"), qt.Equals, "Wed June 6 2018")
7778
c.Assert(f.Format(june06, "Mon Mon"), qt.Equals, "Wed Wed")
7879
})
7980

8081
c.Run("Weekdays German", func(c *qt.C) {
81-
tr := translators.GetTranslator("de")
82+
tr := golocales.New("de")
8283
f := NewTimeFormatter(tr)
8384

8485
// Issue #9107
8586
for i, weekDayWideGerman := range []string{"Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"} {
8687
date := mondayNovemberFirst.Add(time.Duration(i*24) * time.Hour)
87-
c.Assert(tr.WeekdayWide(date.Weekday()), qt.Equals, weekDayWideGerman)
88+
c.Assert(tr.WeekdaysWide()[date.Weekday()], qt.Equals, weekDayWideGerman)
8889
c.Assert(f.Format(date, "Monday"), qt.Equals, weekDayWideGerman)
8990
}
9091

9192
for i, weekDayAbbreviatedGerman := range []string{"Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa.", "So."} {
9293
date := mondayNovemberFirst.Add(time.Duration(i*24) * time.Hour)
93-
c.Assert(tr.WeekdayAbbreviated(date.Weekday()), qt.Equals, weekDayAbbreviatedGerman)
94+
c.Assert(tr.WeekdaysAbbreviated()[date.Weekday()], qt.Equals, weekDayAbbreviatedGerman)
9495
c.Assert(f.Format(date, "Mon"), qt.Equals, weekDayAbbreviatedGerman)
9596
}
9697
})
9798

9899
c.Run("Months German", func(c *qt.C) {
99-
tr := translators.GetTranslator("de")
100+
tr := golocales.New("de")
100101
f := NewTimeFormatter(tr)
101102

102103
// Issue #9107
103104
for i, monthWideNorway := range []string{"Januar", "Februar", "März", "April", "Mai", "Juni", "Juli"} {
104105
date := jan06.Add(time.Duration(i*24*31) * time.Hour)
105-
c.Assert(tr.MonthWide(date.Month()), qt.Equals, monthWideNorway)
106+
c.Assert(tr.MonthsWide()[date.Month()-1], qt.Equals, monthWideNorway)
106107
c.Assert(f.Format(date, "January"), qt.Equals, monthWideNorway)
107108
}
108109
})
@@ -121,7 +122,7 @@ func BenchmarkTimeFormatter(b *testing.B) {
121122
})
122123

123124
b.Run("Localized", func(b *testing.B) {
124-
f := NewTimeFormatter(translators.GetTranslator("nn"))
125+
f := NewTimeFormatter(golocales.New("nn"))
125126
b.ResetTimer()
126127
for b.Loop() {
127128
got := f.Format(june06, "Monday Jan 2 2006")
@@ -132,7 +133,7 @@ func BenchmarkTimeFormatter(b *testing.B) {
132133
})
133134

134135
b.Run("Localized Custom", func(b *testing.B) {
135-
f := NewTimeFormatter(translators.GetTranslator("nn"))
136+
f := NewTimeFormatter(golocales.New("nn"))
136137
b.ResetTimer()
137138
for b.Loop() {
138139
got := f.Format(june06, ":date_medium")

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ require (
1212
github.com/bep/goat v0.5.0
1313
github.com/bep/godartsass/v2 v2.5.0
1414
github.com/bep/golibsass v1.2.0
15+
github.com/bep/golocales v0.1.0
1516
github.com/bep/goportabletext v0.1.0
16-
github.com/bep/helpers v0.7.0
17+
github.com/bep/helpers v0.8.0
1718
github.com/bep/imagemeta v0.17.0
1819
github.com/bep/lazycache v0.8.1
1920
github.com/bep/logg v0.4.0
@@ -42,8 +43,6 @@ require (
4243
github.com/gohugoio/httpcache v0.8.0
4344
github.com/gohugoio/hugo-goldmark-extensions/extras v0.6.0
4445
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.4.0
45-
github.com/gohugoio/locales v0.14.0
46-
github.com/gohugoio/localescompressed v1.0.1
4746
github.com/google/go-cmp v0.7.0
4847
github.com/gorilla/websocket v1.5.3
4948
github.com/hairyhenderson/go-codeowners v0.7.0

go.sum

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ github.com/bep/godartsass/v2 v2.5.0 h1:tKRvwVdyjCIr48qgtLa4gHEdtRkPF8H1OeEhJAEv7
156156
github.com/bep/godartsass/v2 v2.5.0/go.mod h1:rjsi1YSXAl/UbsGL85RLDEjRKdIKUlMQHr6ChUNYOFU=
157157
github.com/bep/golibsass v1.2.0 h1:nyZUkKP/0psr8nT6GR2cnmt99xS93Ji82ZD9AgOK6VI=
158158
github.com/bep/golibsass v1.2.0/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA=
159+
github.com/bep/golocales v0.1.0 h1:rjWf1S4basIje+G+je5WMW8G+yzaoz4gEDFolrFVdvA=
160+
github.com/bep/golocales v0.1.0/go.mod h1:Hl78nje8mNL3LzLeJvYN9NsIZgyFJGrGfvgO9r1+mwE=
159161
github.com/bep/goportabletext v0.1.0 h1:8dqym2So1cEqVZiBa4ZnMM1R9l/DnC1h4ONg4J5kujw=
160162
github.com/bep/goportabletext v0.1.0/go.mod h1:6lzSTsSue75bbcyvVc0zqd1CdApuT+xkZQ6Re5DzZFg=
161-
github.com/bep/helpers v0.7.0 h1:xruRGxcJ1lkbFhoTftFw4UdQ5/3TqEyxWCQLtfY/Pbg=
162-
github.com/bep/helpers v0.7.0/go.mod h1:NOkGxcWYMzJfri141CUO2MnnEXEKJsnj6xKPlrsahA0=
163+
github.com/bep/helpers v0.8.0 h1:plg2BFgA9AgIHF2XemyZdZLqixjzQk3uyyArV48FngQ=
164+
github.com/bep/helpers v0.8.0/go.mod h1:PfE7MGdA8sSQ19nyDh4tYbs5rAlStlJaDI21f/fnNps=
163165
github.com/bep/imagemeta v0.17.0 h1:0sCIQTcmERGUCazrBfmoeh7SoHutlYQqLr24GCItTxA=
164166
github.com/bep/imagemeta v0.17.0/go.mod h1:+Hlp195TfZpzsqCxtDKTG6eWdyz2+F2V/oCYfr3CZKA=
165167
github.com/bep/lazycache v0.8.1 h1:ko6ASLjkPxyV5DMWoNNZ8B2M0weyjqXX8IZkjBoBtvg=
@@ -176,8 +178,6 @@ github.com/bep/textandbinarywriter v0.1.0 h1:KXmXsRN2Uhwhm1G3e/snM8+5SPQBJrCEpIo
176178
github.com/bep/textandbinarywriter v0.1.0/go.mod h1:dAcHveajlWWU7PXhp6Dn4PIAYDg2H13Huif9xMS2w8w=
177179
github.com/bep/tmc v0.6.0 h1:5zWy4L+3gS+Kk8czzLC4g7ETaC3wkX9ZtTRdAdL8V4s=
178180
github.com/bep/tmc v0.6.0/go.mod h1:SNHxc3o2WSNMAYqJcAO0rxFY+pbhZzMwjIHe5xaAue0=
179-
github.com/bep/workers v1.0.0 h1:U+H8YmEaBCEaFZBst7GcRVEoqeRC9dzH2dWOwGmOchg=
180-
github.com/bep/workers v1.0.0/go.mod h1:7kIESOB86HfR2379pwoMWNy8B50D7r99fRLUyPSNyCs=
181181
github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE=
182182
github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
183183
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -236,7 +236,6 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw
236236
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
237237
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
238238
github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
239-
github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU=
240239
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
241240
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
242241
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
@@ -281,10 +280,6 @@ github.com/gohugoio/hugo-goldmark-extensions/extras v0.6.0 h1:c16engMi6zyOGeCrP7
281280
github.com/gohugoio/hugo-goldmark-extensions/extras v0.6.0/go.mod h1:e3+TRCT4Uz6NkZOAVMOMgPeJ+7KEtQMX8hdB+WG4qRs=
282281
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.4.0 h1:awFlqaCQ0N/RS9ndIBpDYNms101I1sGbDRG1bksa5Js=
283282
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.4.0/go.mod h1:lK1CjqrueCd3OBnsLLQJGrQ+uodWfT9M9Cq2zfDWJCE=
284-
github.com/gohugoio/locales v0.14.0 h1:Q0gpsZwfv7ATHMbcTNepFd59H7GoykzWJIxi113XGDc=
285-
github.com/gohugoio/locales v0.14.0/go.mod h1:ip8cCAv/cnmVLzzXtiTpPwgJ4xhKZranqNqtoIu0b/4=
286-
github.com/gohugoio/localescompressed v1.0.1 h1:KTYMi8fCWYLswFyJAeOtuk/EkXR/KPTHHNN9OS+RTxo=
287-
github.com/gohugoio/localescompressed v1.0.1/go.mod h1:jBF6q8D7a0vaEmcWPNcAjUZLJaIVNiwvM3WlmTvooB0=
288283
github.com/golang-jwt/jwt/v5 v5.2.3 h1:kkGXqQOBSDDWRhWNXTFpqGSCMyh/PLnqUvMGJPDJDs0=
289284
github.com/golang-jwt/jwt/v5 v5.2.3/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
290285
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
@@ -325,7 +320,6 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
325320
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
326321
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
327322
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
328-
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
329323
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
330324
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
331325
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
@@ -392,7 +386,6 @@ github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXw
392386
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
393387
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
394388
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
395-
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
396389
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
397390
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
398391
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
@@ -520,7 +513,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
520513
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
521514
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
522515
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
523-
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
524516
github.com/yuin/goldmark v1.7.16 h1:n+CJdUxaFMiDUNnWC3dMWCIQJSkxH4uz3ZwQBkAlVNE=
525517
github.com/yuin/goldmark v1.7.16/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
526518
github.com/yuin/goldmark-emoji v1.0.6 h1:QWfF2FYaXwL74tfGOW5izeiZepUDroDJfWubQI9HTHs=
@@ -604,7 +596,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
604596
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
605597
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
606598
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
607-
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
608599
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
609600
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
610601
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -638,7 +629,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY
638629
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
639630
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
640631
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
641-
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
642632
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
643633
golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=
644634
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
@@ -663,7 +653,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
663653
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
664654
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
665655
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
666-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
667656
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
668657
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
669658
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -698,10 +687,8 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
698687
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
699688
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
700689
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
701-
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
702690
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
703691
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
704-
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
705692
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
706693
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
707694
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -770,7 +757,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
770757
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
771758
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
772759
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
773-
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
774760
golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
775761
golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
776762
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

hugolib/dates_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Past talks: 3
253253
Home's Date should be greater than past: true
254254
Home's Date should be less than future: true
255255
Home's Date should be equal mydata date: true
256-
Full time: 6:00:00 am UTC
256+
Full time: 6:00:00am UTC
257257
`)
258258
}
259259

hugolib/language_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ FormatNumberCustom: 12,345.68
118118

119119
b.AssertFileContent("public/nn/index.html", `
120120
FormatNumber: 512,50
121-
FormatPercent: 512,50 %
122-
FormatCurrency: 512,50 USD
123-
FormatAccounting: 512,50 kr
121+
FormatPercent: 512,50 %
122+
FormatCurrency: 512,50 USD
123+
FormatAccounting: 512,50 kr
124124
FormatNumberCustom: 12,345.68
125125
126126
`)

0 commit comments

Comments
 (0)