From 41c7387f2fc927224526209d046d634a6fdc1243 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Thu, 2 May 2024 05:50:23 +0500 Subject: [PATCH 1/4] :wrench: Added eo language code in locale generation command --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 3ffe831..bc563d5 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ //go:generate go install github.com/valyala/quicktemplate/qtc@master //go:generate qtc -dir=web //go:generate go install golang.org/x/text/cmd/gotext@master -//go:generate gotext -srclang=en update -lang=en,ru -out=locales_gen.go +//go:generate gotext -srclang=en update -lang=en,ru,eo -out=locales_gen.go package main import ( From 1fdb84345b2af822e986df5b22079a4ba60874fa Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Thu, 2 May 2024 05:51:21 +0500 Subject: [PATCH 2/4] :bento: Generated empty esperanto locale strings --- locales/eo/out.gotext.json | 68 ++++++++++++++++++++++++++++++++++++++ locales_gen.go | 11 +++++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 locales/eo/out.gotext.json diff --git a/locales/eo/out.gotext.json b/locales/eo/out.gotext.json new file mode 100644 index 0000000..4cf8e2e --- /dev/null +++ b/locales/eo/out.gotext.json @@ -0,0 +1,68 @@ +{ + "language": "eo", + "messages": [ + { + "id": "Donate ${Amount__100} to {Toby3d}", + "message": "Donate ${Amount__100} to {Toby3d}", + "translation": "", + "placeholders": [ + { + "id": "Amount__100", + "string": "%[1]d", + "type": "uint64", + "underlyingType": "uint64", + "argNum": 1, + "expr": "ctx.amount / 100" + }, + { + "id": "Toby3d", + "string": "%[2]s", + "type": "string", + "underlyingType": "string", + "argNum": 2, + "expr": "\"toby3d\"" + } + ] + }, + { + "id": "Donate", + "message": "Donate", + "translation": "" + }, + { + "id": "dollar amount", + "message": "dollar amount", + "translation": "" + }, + { + "id": "contribution frequency", + "message": "contribution frequency", + "translation": "" + }, + { + "id": "one time", + "message": "one time", + "translation": "" + }, + { + "id": "weekly", + "message": "weekly", + "translation": "" + }, + { + "id": "monthly", + "message": "monthly", + "translation": "" + }, + { + "id": "annually", + "message": "annually", + "translation": "" + }, + { + "id": "from Russia", + "message": "from Russia", + "translation": "" + } + ] +} \ No newline at end of file diff --git a/locales_gen.go b/locales_gen.go index 54a9bd7..7aafe77 100644 --- a/locales_gen.go +++ b/locales_gen.go @@ -28,6 +28,7 @@ func (d *dictionary) Lookup(key string) (data string, ok bool) { func init() { dict := map[string]catalog.Dictionary{ "en": &dictionary{index: enIndex, data: enData}, + "eo": &dictionary{index: eoIndex, data: eoData}, "ru": &dictionary{index: ruIndex, data: ruData}, } fallback := language.MustParse("en") @@ -62,6 +63,14 @@ const enData string = "" + // Size: 170 bytes "ount\x02contribution frequency\x02one time\x02weekly\x02monthly\x02annua" + "lly\x02from Russia" +var eoIndex = []uint32{ // 10 elements + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 64 bytes + +const eoData string = "" + var ruIndex = []uint32{ // 10 elements 0x00000000, 0x0000007f, 0x00000098, 0x000000b7, 0x000000d5, 0x000000ec, 0x00000103, 0x00000118, @@ -74,4 +83,4 @@ const ruData string = "" + // Size: 315 bytes "ма в долларах\x02частота взносов\x02единоразово\x02еженедельно\x02ежеме" + "сячно\x02ежегодно\x02из России" - // Total table size 613 bytes (0KiB); checksum: 7E1ACFAA + // Total table size 677 bytes (0KiB); checksum: D7C98321 From 8b0b8b4c28c9fe54629d75ba409070bf93911695 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Thu, 2 May 2024 05:52:17 +0500 Subject: [PATCH 3/4] :globe_with_meridians: Translate strings on esperanto --- locales/eo/messages.gotext.json | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 locales/eo/messages.gotext.json diff --git a/locales/eo/messages.gotext.json b/locales/eo/messages.gotext.json new file mode 100644 index 0000000..fc19d71 --- /dev/null +++ b/locales/eo/messages.gotext.json @@ -0,0 +1,68 @@ +{ + "language": "eo", + "messages": [ + { + "id": "Donate ${Amount__100} to {Toby3d}", + "message": "Donate ${Amount__100} to {Toby3d}", + "translation": "Donacu ${Amount__100} al {Toby3d}", + "placeholders": [ + { + "id": "Amount__100", + "string": "%[1]d", + "type": "uint64", + "underlyingType": "uint64", + "argNum": 1, + "expr": "ctx.amount / 100" + }, + { + "id": "Toby3d", + "string": "%[2]s", + "type": "string", + "underlyingType": "string", + "argNum": 2, + "expr": "\"toby3d\"" + } + ] + }, + { + "id": "Donate", + "message": "Donate", + "translation": "Donacu" + }, + { + "id": "dollar amount", + "message": "dollar amount", + "translation": "dolara kvanto" + }, + { + "id": "contribution frequency", + "message": "contribution frequency", + "translation": "ofteco de kontribuo" + }, + { + "id": "one time", + "message": "one time", + "translation": "unufoje" + }, + { + "id": "weekly", + "message": "weekly", + "translation": "ĉiusemajne" + }, + { + "id": "monthly", + "message": "monthly", + "translation": "monate" + }, + { + "id": "annually", + "message": "annually", + "translation": "ĉiujare" + }, + { + "id": "from Russia", + "message": "from Russia", + "translation": "el Rusio" + } + ] +} From 15a2febaecc5c7fcb87a1f2552660951c58c27be Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Thu, 2 May 2024 05:52:43 +0500 Subject: [PATCH 4/4] :bento: Regenerate esperanto strings --- locales/eo/out.gotext.json | 18 +++++++++--------- locales_gen.go | 12 +++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/locales/eo/out.gotext.json b/locales/eo/out.gotext.json index 4cf8e2e..16329b5 100644 --- a/locales/eo/out.gotext.json +++ b/locales/eo/out.gotext.json @@ -4,7 +4,7 @@ { "id": "Donate ${Amount__100} to {Toby3d}", "message": "Donate ${Amount__100} to {Toby3d}", - "translation": "", + "translation": "Donacu ${Amount__100} al {Toby3d}", "placeholders": [ { "id": "Amount__100", @@ -27,42 +27,42 @@ { "id": "Donate", "message": "Donate", - "translation": "" + "translation": "Donacu" }, { "id": "dollar amount", "message": "dollar amount", - "translation": "" + "translation": "dolara kvanto" }, { "id": "contribution frequency", "message": "contribution frequency", - "translation": "" + "translation": "ofteco de kontribuo" }, { "id": "one time", "message": "one time", - "translation": "" + "translation": "unufoje" }, { "id": "weekly", "message": "weekly", - "translation": "" + "translation": "ĉiusemajne" }, { "id": "monthly", "message": "monthly", - "translation": "" + "translation": "monate" }, { "id": "annually", "message": "annually", - "translation": "" + "translation": "ĉiujare" }, { "id": "from Russia", "message": "from Russia", - "translation": "" + "translation": "el Rusio" } ] } \ No newline at end of file diff --git a/locales_gen.go b/locales_gen.go index 7aafe77..7ca0d8d 100644 --- a/locales_gen.go +++ b/locales_gen.go @@ -64,12 +64,14 @@ const enData string = "" + // Size: 170 bytes "lly\x02from Russia" var eoIndex = []uint32{ // 10 elements - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x00000000, 0x00000017, 0x0000001e, 0x0000002c, + 0x00000040, 0x00000048, 0x00000054, 0x0000005b, + 0x00000064, 0x0000006d, } // Size: 64 bytes -const eoData string = "" +const eoData string = "" + // Size: 109 bytes + "\x02Donacu $%[1]d al %[2]s\x02Donacu\x02dolara kvanto\x02ofteco de kontr" + + "ibuo\x02unufoje\x02ĉiusemajne\x02monate\x02ĉiujare\x02el Rusio" var ruIndex = []uint32{ // 10 elements 0x00000000, 0x0000007f, 0x00000098, 0x000000b7, @@ -83,4 +85,4 @@ const ruData string = "" + // Size: 315 bytes "ма в долларах\x02частота взносов\x02единоразово\x02еженедельно\x02ежеме" + "сячно\x02ежегодно\x02из России" - // Total table size 677 bytes (0KiB); checksum: D7C98321 + // Total table size 786 bytes (0KiB); checksum: 3A225519