Skip to content

Commit

Permalink
Merge branch 'main' of github.com:aiji42/zod-i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
aiji42 committed Dec 18, 2022
2 parents 70ff18b + c05c3b2 commit 704114a
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
"translation",
"test"
]
},
{
"login": "Arturo-Lopez",
"name": "Arturo",
"avatar_url": "https://avatars.githubusercontent.com/u/35613775?v=4",
"profile": "http://arturolopez.co",
"contributions": [
"translation",
"test"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This project is licensed under the MIT License - see the [LICENSE](https://githu
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand All @@ -86,6 +86,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://github.com/montedonioluiz"><img src="https://avatars.githubusercontent.com/u/36773088?v=4?s=100" width="100px;" alt="Luiz Oliveira Montedonio"/><br /><sub><b>Luiz Oliveira Montedonio</b></sub></a><br /><a href="#translation-montedonioluiz" title="Translation">🌍</a> <a href="https://github.com/aiji42/zod-i18n/commits?author=montedonioluiz" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/izayoi-hibiki"><img src="https://avatars.githubusercontent.com/u/23469365?v=4?s=100" width="100px;" alt="Izayoi Hibiki"/><br /><sub><b>Izayoi Hibiki</b></sub></a><br /><a href="#translation-izayoi-hibiki" title="Translation">🌍</a> <a href="https://github.com/aiji42/zod-i18n/commits?author=izayoi-hibiki" title="Tests">⚠️</a></td>
<td align="center"><a href="https://hrafnkellbaldurs.com/"><img src="https://avatars.githubusercontent.com/u/5609118?v=4?s=100" width="100px;" alt="Hrafnkell Baldursson"/><br /><sub><b>Hrafnkell Baldursson</b></sub></a><br /><a href="#translation-hrafnkellbaldurs" title="Translation">🌍</a> <a href="https://github.com/aiji42/zod-i18n/commits?author=hrafnkellbaldurs" title="Tests">⚠️</a></td>
<td align="center"><a href="http://arturolopez.co"><img src="https://avatars.githubusercontent.com/u/35613775?v=4?s=100" width="100px;" alt="Arturo"/><br /><sub><b>Arturo</b></sub></a><br /><a href="#translation-Arturo-Lopez" title="Translation">🌍</a> <a href="https://github.com/aiji42/zod-i18n/commits?author=Arturo-Lopez" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-next-i18next/next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require("path");
module.exports = {
i18n: {
defaultLocale: "en",
locales: ["en", "ja", "fr", "ar", "pt", "zh-CN", "is"],
locales: ["en", "ja", "fr", "ar", "pt", "zh-CN", "is", "es"],
},
localePath: path.resolve("./public/locales"),
interpolation: {
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 @@ -77,6 +77,7 @@ export default function HookForm() {
borderLeftRadius={0}
>
<option value="ar">العربية</option>
<option value="es">Spanish</option>
<option value="en">English</option>
<option value="fr">Français</option>
<option value="is">Icelandic</option>
Expand Down
7 changes: 7 additions & 0 deletions examples/with-next-i18next/public/locales/es/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"User name": "Nombre de usuario",
"John Doe": "John Doe",
"Email": "Correo",
"Favorite number": "Número favorito",
"Submit": "Enviar"
}
112 changes: 112 additions & 0 deletions examples/with-next-i18next/public/locales/es/zod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"errors": {
"invalid_type": "Esperado {{expected}}, recibido {{received}}",
"invalid_type_received_undefined": "Requerido",
"invalid_literal": "Valor literal inválido, era esperado {{expected}}",
"unrecognized_keys": "Llave(s) no reconocida(s) en el objeto: {{- keys}}",
"invalid_union": "Entrada inválida",
"invalid_union_discriminator": "Valor discriminador inválido. Era esperado {{- options}}",
"invalid_enum_value": "Valor de enum inválido. Era esperado {{- options}}, fue recibido '{{received}}'",
"invalid_arguments": "Argumentos de función inválido",
"invalid_return_type": "Tipo de retorno de función inválido",
"invalid_date": "Fecha inválida",
"custom": "Entrada inválida",
"invalid_intersection_types": "Valores de intersección no pudieron ser mezclados",
"not_multiple_of": "Número debe ser multiplo de {{multipleOf}}",
"not_finite": "Número no puede ser infinito",
"invalid_string": {
"email": "{{validation}} inválido",
"url": "{{validation}} inválida",
"uuid": "{{validation}} inválido",
"cuid": "{{validation}} inválido",
"regex": "Inválido",
"datetime": "{{validation}} inválido",
"startsWith": "Entrada inválida: debe comenzar con \"{{startsWith}}\"",
"endsWith": "Entrada inválida: debe finalizar con \"{{endsWith}}\""
},
"too_small": {
"array": {
"exact": "El array debe contener exactamente {{minimum}} elemento(s)",
"inclusive": "El array debe contener al menos {{minimum}} elemento(s)",
"not_inclusive": "El array debe contener más de {{minimum}} elemento(s)"
},
"string": {
"exact": "El texto debe contener exactamente {{minimum}} carácter(es)",
"inclusive": "El texto debe contener al menos {{minimum}} carácter(es)",
"not_inclusive": "El texto debe contener más de {{minimum}} carácter(es)"
},
"number": {
"exact": "El número debe ser exactamente {{minimum}}",
"inclusive": "El número debe ser mayor o igual a {{minimum}}",
"not_inclusive": "El número debe ser mayor a {{minimum}}"
},
"set": {
"exact": "Entrada inválida",
"inclusive": "Entrada inválida",
"not_inclusive": "Entrada inválida"
},
"date": {
"exact": "La fecha debe ser exactamente {{- minimum, datetime}}",
"inclusive": "La fecha debe ser mayor o igual a {{- minimum, datetime}}",
"not_inclusive": "La fecha debe ser mayor a {{- minimum, datetime}}"
}
},
"too_big": {
"array": {
"exact": "El array debe contener exactamente {{maximum}} elemento(s)",
"inclusive": "El array debe contener como máximo {{maximum}} elemento(s)",
"not_inclusive": "El array debe contener menos que {{maximum}} elemento(s)"
},
"string": {
"exact": "El texto debe contener exactamente {{maximum}} carácter(es)",
"inclusive": "El texto debe contener como máximo {{maximum}} carácter(es)",
"not_inclusive": "El texto debe contener menos que {{maximum}} carácter(es)"
},
"number": {
"exact": "El número debe ser exactamente {{maximum}}",
"inclusive": "El número debe ser menor o igual a {{maximum}}",
"not_inclusive": "El número debe ser menor a {{maximum}}"
},
"set": {
"exact": "Entrada inválida",
"inclusive": "Entrada inválida",
"not_inclusive": "Entrada inválida"
},
"date": {
"exact": "La fecha debe ser exactamente {{- maximum, datetime}}",
"inclusive": "La fecha debe ser menor o igual a {{- maximum, datetime}}",
"not_inclusive": "La fecha debe ser menor a {{- maximum, datetime}}"
}
}
},
"validations": {
"email": "correo",
"url": "url",
"uuid": "uuid",
"cuid": "cuid",
"regex": "expresión regular",
"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/es/zod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"errors": {
"invalid_type": "Esperado {{expected}}, recibido {{received}}",
"invalid_type_received_undefined": "Requerido",
"invalid_literal": "Valor literal inválido, era esperado {{expected}}",
"unrecognized_keys": "Llave(s) no reconocida(s) en el objeto: {{- keys}}",
"invalid_union": "Entrada inválida",
"invalid_union_discriminator": "Valor discriminador inválido. Era esperado {{- options}}",
"invalid_enum_value": "Valor de enum inválido. Era esperado {{- options}}, fue recibido '{{received}}'",
"invalid_arguments": "Argumentos de función inválido",
"invalid_return_type": "Tipo de retorno de función inválido",
"invalid_date": "Fecha inválida",
"custom": "Entrada inválida",
"invalid_intersection_types": "Valores de intersección no pudieron ser mezclados",
"not_multiple_of": "Número debe ser multiplo de {{multipleOf}}",
"not_finite": "Número no puede ser infinito",
"invalid_string": {
"email": "{{validation}} inválido",
"url": "{{validation}} inválida",
"uuid": "{{validation}} inválido",
"cuid": "{{validation}} inválido",
"regex": "Inválido",
"datetime": "{{validation}} inválido",
"startsWith": "Entrada inválida: debe comenzar con \"{{startsWith}}\"",
"endsWith": "Entrada inválida: debe finalizar con \"{{endsWith}}\""
},
"too_small": {
"array": {
"exact": "El array debe contener exactamente {{minimum}} elemento(s)",
"inclusive": "El array debe contener al menos {{minimum}} elemento(s)",
"not_inclusive": "El array debe contener más de {{minimum}} elemento(s)"
},
"string": {
"exact": "El texto debe contener exactamente {{minimum}} carácter(es)",
"inclusive": "El texto debe contener al menos {{minimum}} carácter(es)",
"not_inclusive": "El texto debe contener más de {{minimum}} carácter(es)"
},
"number": {
"exact": "El número debe ser exactamente {{minimum}}",
"inclusive": "El número debe ser mayor o igual a {{minimum}}",
"not_inclusive": "El número debe ser mayor a {{minimum}}"
},
"set": {
"exact": "Entrada inválida",
"inclusive": "Entrada inválida",
"not_inclusive": "Entrada inválida"
},
"date": {
"exact": "La fecha debe ser exactamente {{- minimum, datetime}}",
"inclusive": "La fecha debe ser mayor o igual a {{- minimum, datetime}}",
"not_inclusive": "La fecha debe ser mayor a {{- minimum, datetime}}"
}
},
"too_big": {
"array": {
"exact": "El array debe contener exactamente {{maximum}} elemento(s)",
"inclusive": "El array debe contener como máximo {{maximum}} elemento(s)",
"not_inclusive": "El array debe contener menos que {{maximum}} elemento(s)"
},
"string": {
"exact": "El texto debe contener exactamente {{maximum}} carácter(es)",
"inclusive": "El texto debe contener como máximo {{maximum}} carácter(es)",
"not_inclusive": "El texto debe contener menos que {{maximum}} carácter(es)"
},
"number": {
"exact": "El número debe ser exactamente {{maximum}}",
"inclusive": "El número debe ser menor o igual a {{maximum}}",
"not_inclusive": "El número debe ser menor a {{maximum}}"
},
"set": {
"exact": "Entrada inválida",
"inclusive": "Entrada inválida",
"not_inclusive": "Entrada inválida"
},
"date": {
"exact": "La fecha debe ser exactamente {{- maximum, datetime}}",
"inclusive": "La fecha debe ser menor o igual a {{- maximum, datetime}}",
"not_inclusive": "La fecha debe ser menor a {{- maximum, datetime}}"
}
}
},
"validations": {
"email": "correo",
"url": "url",
"uuid": "uuid",
"cuid": "cuid",
"regex": "expresión regular",
"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 704114a

@vercel
Copy link

@vercel vercel bot commented on 704114a Dec 18, 2022

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-git-main-aiji42.vercel.app
zod-i18n.vercel.app
zod-i18n-aiji42.vercel.app

Please sign in to comment.