(Feat): Initial Commit
Some checks failed
Build & Test / build-test (push) Has been cancelled
Build & Test / swagger-codegen-cli (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled

This commit is contained in:
2026-07-03 19:41:31 +05:30
commit 7e940c83a7
461 changed files with 45002 additions and 0 deletions

3
internal/i18n/testdata/README.md vendored Normal file
View File

@@ -0,0 +1,3 @@
# `internal/i18n/testdata`
These translation toml files are not meant to be touched while doing application development, rather they are here to test the baseline functionality of the i18n package.

View File

View File

@@ -0,0 +1,2 @@
# This file in invalid on purpose.
This is not toml.

View File

@@ -0,0 +1,13 @@
# {{.Count}} is injected by default while using service.TranslatePlural
# pluralized structured format
[cats]
zero="Ich habe keine Katze."
one="Ich habe eine Katze."
other="Ich habe {{.Count}} Katzen."
# pluralized single line format
"dogs.zero"="Ich habe keinen Hund."
"dogs.one"="Ich habe einen Hund."
"dogs.other"="Ich habe {{.Count}} Hunde."

View File

@@ -0,0 +1,12 @@
# {{.Count}} is injected by default while using service.TranslatePlural
# pluralized structured format
[cats]
zero="I don't have a cat."
one="I've one cat."
other="I've {{.Count}} cats."
# pluralized single line format
"dogs.zero"="I don't have a dog."
"dogs.one"="I've one dog."
"dogs.other"="I've {{.Count}} dogs."

View File

@@ -0,0 +1,34 @@
# "reserved" keys:
# "id", "description", "hash", "leftdelim", "rightdelim", "zero", "one", "two", "few", "many", "other"
# see https://github.com/nicksnyder/go-i18n/blob/2180cd9f35b3e125cfe3773a6bf3ea483347f060/v2/i18n/message.go#L181
"reserved1.zero"="Null"
"reserved2.one"="Eins"
"reserved3.two"="Zwei"
"reserved4.few"="Wenig"
"reserved5.many"="Mehr"
"reserved6.other"="Andere"
"reserved7.id"="ID"
"reserved8.description"="Beschreibung"
[reservedMap]
zero="Null"
one="Eins"
two="Zwei"
few="Wenig"
many="Mehr"
other="Andere"
"reserved.plain.zero"="Null"
"reserved.plain.one"="Eins"
"reserved.plain.two"="Zwei"
"reserved.plain.few"="Wenig"
"reserved.plain.many"="Mehr"
"reserved.plain.other"="Andere"
"reserved.plain2.id"="ID"
"reserved.plain2.description"="Beschreibung"
"reserved.plain3.id"="ID"
"reserved.plain3.description"="Beschreibung"
"reserved.plain3.test"="Test" # can i see this non-reserved one by FQDN?

View File

@@ -0,0 +1,34 @@
# "reserved" keys:
# "id", "description", "hash", "leftdelim", "rightdelim", "zero", "one", "two", "few", "many", "other"
# see https://github.com/nicksnyder/go-i18n/blob/2180cd9f35b3e125cfe3773a6bf3ea483347f060/v2/i18n/message.go#L181
"reserved1.zero"="Zero"
"reserved2.one"="One"
"reserved3.two"="Two"
"reserved4.few"="Few"
"reserved5.many"="Many"
"reserved6.other"="Other"
"reserved7.id"="id"
"reserved8.description"="Description"
[reservedMap]
zero="Zero"
one="One"
two="Two"
few="Few"
many="Many"
other="Other"
"reserved.plain.zero"="Zero"
"reserved.plain.one"="One"
"reserved.plain.two"="Two"
"reserved.plain.few"="Few"
"reserved.plain.many"="Many"
"reserved.plain.other"="Other"
"reserved.plain2.id"="id"
"reserved.plain2.description"="Description"
"reserved.plain3.id"="id"
"reserved.plain3.description"="Description"
"reserved.plain3.test"="Test" # can i see this non-reserved one by FQDN?

View File

@@ -0,0 +1,2 @@
[test]
punchline="Koan i Humor?"

View File

@@ -0,0 +1,2 @@
[test]
punchline="Habe ich Humor?"

View File

@@ -0,0 +1,2 @@
[test]
punchline="I can has HUMOUR?"

View File

@@ -0,0 +1,2 @@
[test]
punchline="I can has HUMOR?"

View File

@@ -0,0 +1,2 @@
[test]
language="xx"

4
internal/i18n/testdata/i18n/de.toml vendored Normal file
View File

@@ -0,0 +1,4 @@
[Test]
Body = "Das ist ein Test"
Welcome = "Guten Tag {{.Name}}"
"String.DE.only" = "This key only exists in DE"

4
internal/i18n/testdata/i18n/en.toml vendored Normal file
View File

@@ -0,0 +1,4 @@
[Test]
Body = "This is a test"
Welcome = "Welcome {{.Name}}"
"String.EN.only" = "This key only exists in EN"