Skip to content

Commit

Permalink
Merge pull request #185 from undeadevs/main
Browse files Browse the repository at this point in the history
feat(localizations): Add id localization
  • Loading branch information
aiji42 authored Dec 13, 2023
2 parents 00adae0 + 3b3cb08 commit 5af4297
Show file tree
Hide file tree
Showing 6 changed files with 450 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/with-next-i18next/next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
"hr-HR",
"fi",
"cs",
"id",
],
},
localePath: path.resolve("./public/locales"),
Expand Down
1 change: 1 addition & 0 deletions examples/with-next-i18next/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default function HookForm() {
borderLeftRadius={0}
>
<option value="ar">العربية</option>
<option value="id">Bahasa Indonesia</option>
<option value="cs">Čeština</option>
<option value="de">Deutsch</option>
<option value="en">English</option>
Expand Down
7 changes: 7 additions & 0 deletions examples/with-next-i18next/public/locales/id/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"username": "Nama user",
"username_placeholder": "John Doe",
"email": "Email",
"favoriteNumber": "Angka favorit",
"submit": "Kirim"
}
112 changes: 112 additions & 0 deletions examples/with-next-i18next/public/locales/id/zod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"errors": {
"invalid_type": "Nilai seharusnya memiliki tipe data {{expected}}, diterima {{received}}",
"invalid_type_received_undefined": "Wajib diisi",
"invalid_literal": "Nilai literal tidak valid, seharusnya {{expected}}",
"unrecognized_keys": "Key {{- keys}} tidak valid pada object",
"invalid_union": "Input tidak valid",
"invalid_union_discriminator": "Nilai discriminator tidak ditemukan dalam {{- options}}",
"invalid_enum_value": "Nilai enum '{{received}}' tidak ditemukan dalam {{- options}}",
"invalid_arguments": "Argumen function tidak valid",
"invalid_return_type": "Tipe data return function tidak valid",
"invalid_date": "Tanggal tidak valid",
"custom": "Input tidak valid",
"invalid_intersection_types": "Hasil intersection tidak dapat disatukan",
"not_multiple_of": "Angka harus merupakan kelipatan dari {{multipleOf}}",
"not_finite": "Angka harus berhingga",
"invalid_string": {
"email": "Format {{validation}} tidak valid",
"url": "Format {{validation}} tidak valid",
"uuid": "Format {{validation}} tidak valid",
"cuid": "Format {{validation}} tidak valid",
"regex": "Tidak valid",
"datetime": "Format {{validation}} tidak valid",
"startsWith": "String harus dimulai dengan \"{{startsWith}}\"",
"endsWith": "String harus diakhiri dengan \"{{endsWith}}\""
},
"too_small": {
"array": {
"exact": "Array harus berisi tepat {{minimum}} elemen",
"inclusive": "Array harus berisi minimal {{minimum}} elemen",
"not_inclusive": "Array harus berisi lebih dari {{minimum}} elemen"
},
"string": {
"exact": "String harus {{minimum}} karakter",
"inclusive": "String harus minimal {{minimum}} karakter",
"not_inclusive": "String harus lebih dari {{minimum}} karakter"
},
"number": {
"exact": "Angka harus bernilai {{minimum}}",
"inclusive": "Angka harus lebih atau sama dengan dari {{minimum}}",
"not_inclusive": "Angka harus lebih dari {{minimum}}"
},
"set": {
"exact": "Input tidak valid",
"inclusive": "Input tidak valid",
"not_inclusive": "Input tidak valid"
},
"date": {
"exact": "Tanggal harus bernilai {{- minimum, datetime}}",
"inclusive": "Tanggal harus lebih atau sama dengan dari {{- minimum, datetime}}",
"not_inclusive": "Tanggal harus lebih dari {{- minimum, datetime}}"
}
},
"too_big": {
"array": {
"exact": "Array harus berisi tepat {{maximum}} elemen",
"inclusive": "Array harus berisi maksimal {{maximum}} elemen",
"not_inclusive": "Array harus berisi kurang dari {{maximum}} elemen"
},
"string": {
"exact": "String harus {{maximum}} karakter",
"inclusive": "String harus maksimal {{maximum}} karakter",
"not_inclusive": "String harus kurang dari {{maximum}} karakter"
},
"number": {
"exact": "Angka harus bernilai {{maximum}}",
"inclusive": "Angka harus kurang atau sama dengan dari {{maximum}}",
"not_inclusive": "Angka harus kurang dari {{maximum}}"
},
"set": {
"exact": "Input tidak valid",
"inclusive": "Input tidak valid",
"not_inclusive": "Input tidak valid"
},
"date": {
"exact": "Tanggal harus bernilai {{- maximum, datetime}}",
"inclusive": "Tanggal harus kurang atau sama dengan dari {{- maximum, datetime}}",
"not_inclusive": "Tanggal harus kurang dari {{- maximum, datetime}}"
}
}
},
"validations": {
"email": "email",
"url": "url",
"uuid": "uuid",
"cuid": "cuid",
"regex": "regex",
"datetime": "datetime"
},
"types": {
"function": "function",
"number": "number",
"string": "string",
"nan": "nan",
"integer": "integer",
"float": "float",
"boolean": "boolean",
"date": "date",
"bigint": "bigint",
"undefined": "undefined",
"symbol": "symbol",
"null": "null",
"array": "array",
"object": "object",
"unknown": "unknown",
"promise": "promise",
"void": "void",
"never": "never",
"map": "map",
"set": "set"
}
}
112 changes: 112 additions & 0 deletions packages/core/locales/id/zod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"errors": {
"invalid_type": "Nilai seharusnya memiliki tipe data {{expected}}, diterima {{received}}",
"invalid_type_received_undefined": "Wajib diisi",
"invalid_literal": "Nilai literal tidak valid, seharusnya {{expected}}",
"unrecognized_keys": "Key {{- keys}} tidak valid pada object",
"invalid_union": "Input tidak valid",
"invalid_union_discriminator": "Nilai discriminator tidak ditemukan dalam {{- options}}",
"invalid_enum_value": "Nilai enum '{{received}}' tidak ditemukan dalam {{- options}}",
"invalid_arguments": "Argumen function tidak valid",
"invalid_return_type": "Tipe data return function tidak valid",
"invalid_date": "Tanggal tidak valid",
"custom": "Input tidak valid",
"invalid_intersection_types": "Hasil intersection tidak dapat disatukan",
"not_multiple_of": "Angka harus merupakan kelipatan dari {{multipleOf}}",
"not_finite": "Angka harus berhingga",
"invalid_string": {
"email": "Format {{validation}} tidak valid",
"url": "Format {{validation}} tidak valid",
"uuid": "Format {{validation}} tidak valid",
"cuid": "Format {{validation}} tidak valid",
"regex": "Tidak valid",
"datetime": "Format {{validation}} tidak valid",
"startsWith": "String harus dimulai dengan \"{{startsWith}}\"",
"endsWith": "String harus diakhiri dengan \"{{endsWith}}\""
},
"too_small": {
"array": {
"exact": "Array harus berisi tepat {{minimum}} elemen",
"inclusive": "Array harus berisi minimal {{minimum}} elemen",
"not_inclusive": "Array harus berisi lebih dari {{minimum}} elemen"
},
"string": {
"exact": "String harus {{minimum}} karakter",
"inclusive": "String harus minimal {{minimum}} karakter",
"not_inclusive": "String harus lebih dari {{minimum}} karakter"
},
"number": {
"exact": "Angka harus bernilai {{minimum}}",
"inclusive": "Angka harus lebih atau sama dengan dari {{minimum}}",
"not_inclusive": "Angka harus lebih dari {{minimum}}"
},
"set": {
"exact": "Input tidak valid",
"inclusive": "Input tidak valid",
"not_inclusive": "Input tidak valid"
},
"date": {
"exact": "Tanggal harus bernilai {{- minimum, datetime}}",
"inclusive": "Tanggal harus lebih atau sama dengan dari {{- minimum, datetime}}",
"not_inclusive": "Tanggal harus lebih dari {{- minimum, datetime}}"
}
},
"too_big": {
"array": {
"exact": "Array harus berisi tepat {{maximum}} elemen",
"inclusive": "Array harus berisi maksimal {{maximum}} elemen",
"not_inclusive": "Array harus berisi kurang dari {{maximum}} elemen"
},
"string": {
"exact": "String harus {{maximum}} karakter",
"inclusive": "String harus maksimal {{maximum}} karakter",
"not_inclusive": "String harus kurang dari {{maximum}} karakter"
},
"number": {
"exact": "Angka harus bernilai {{maximum}}",
"inclusive": "Angka harus kurang atau sama dengan dari {{maximum}}",
"not_inclusive": "Angka harus kurang dari {{maximum}}"
},
"set": {
"exact": "Input tidak valid",
"inclusive": "Input tidak valid",
"not_inclusive": "Input tidak valid"
},
"date": {
"exact": "Tanggal harus bernilai {{- maximum, datetime}}",
"inclusive": "Tanggal harus kurang atau sama dengan dari {{- maximum, datetime}}",
"not_inclusive": "Tanggal harus kurang dari {{- maximum, datetime}}"
}
}
},
"validations": {
"email": "email",
"url": "url",
"uuid": "uuid",
"cuid": "cuid",
"regex": "regex",
"datetime": "datetime"
},
"types": {
"function": "function",
"number": "number",
"string": "string",
"nan": "nan",
"integer": "integer",
"float": "float",
"boolean": "boolean",
"date": "date",
"bigint": "bigint",
"undefined": "undefined",
"symbol": "symbol",
"null": "null",
"array": "array",
"object": "object",
"unknown": "unknown",
"promise": "promise",
"void": "void",
"never": "never",
"map": "map",
"set": "set"
}
}
Loading

1 comment on commit 5af4297

@vercel
Copy link

@vercel vercel bot commented on 5af4297 Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

zod-i18n – ./

zod-i18n-aiji42.vercel.app
zod-i18n-git-main-aiji42.vercel.app
zod-i18n.vercel.app

Please sign in to comment.