Open bojanz opened 3 years ago
I have tried to download the latest data to cmd/data/core, but "go run generate_resources.go" fails with:
Writing Data: yo_BJ
2020/11/06 13:11:32 failed execute "goimports" for file ../yo_BJ/yo_BJ.go: exit status 2
panic: failed execute "goimports" for file ../yo_BJ/yo_BJ.go: exit status 2
Running goimports on yo_BJ.go manually gave me:
❯ goimports -w ../yo_BJ/yo_BJ.go
../yo_BJ/yo_BJ.go:559:35: expected ';', found b
../yo_BJ/yo_BJ.go:571:35: expected ';', found b
Here are the two offending functions in the file:
func(yo *yo_BJ) FmtTimeShort(t time.Time) string {
b := make([]byte, 0, 32)
b = strconv.AppendInt(b, int64(t.Hour()), 10)
b = append(b, yo.timeSeparator...)b = strconv.AppendInt(b, int64(t.Minute()), 10)
return string(b)
}
and
// FmtTimeMedium returns the medium time representation of 't' for 'yo_BJ'
func(yo *yo_BJ) FmtTimeMedium(t time.Time) string {
b := make([]byte, 0, 32)
b = strconv.AppendInt(b, int64(t.Hour()), 10)
b = append(b, yo.timeSeparator...)b = strconv.AppendInt(b, int64(t.Minute()), 10)
b = append(b, yo.timeSeparator...)b = strconv.AppendInt(b, int64(t.Second()), 10)
return string(b)
}
This means that generate_resources.go has a bug in parseDateTimeFormat().
To be continued.
EDIT: Tracked down to a missing newline on line 1344.
Out of time. The v38 PR will need further work.
Opened #35 which gets us to CLDR v36.1 cleanly. Probably best to merge that and then chase the next two updates.
Updating to v38.1 still requires fixing additional bugs in the scripts.
The current data is 6 CLDR releases behind, so let's track the update here.