Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CLDR v39 #32

Open
bojanz opened this issue Nov 6, 2020 · 3 comments
Open

Update to CLDR v39 #32

bojanz opened this issue Nov 6, 2020 · 3 comments

Comments

@bojanz
Copy link
Contributor

bojanz commented Nov 6, 2020

The current data is 6 CLDR releases behind, so let's track the update here.

@bojanz
Copy link
Contributor Author

bojanz commented Nov 6, 2020

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.

bojanz added a commit to bojanz/locales that referenced this issue Nov 6, 2020
@bojanz
Copy link
Contributor Author

bojanz commented Nov 6, 2020

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.

@bojanz
Copy link
Contributor Author

bojanz commented Aug 9, 2021

#35 has been merged, v0.14 now has CLDR v36.1.
#38 brings us up to v37, since that one passed cleanly.

Updating to v38.1 still requires fixing additional bugs in the scripts.

@bojanz bojanz changed the title Update to CLDR v38 Update to CLDR v39 Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant