colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
33.09k stars 1.15k forks source link

Create an error map in pt-br #3632

Open douglasfelc opened 2 months ago

douglasfelc commented 2 months ago

First, I would separate the translation texts into a json, which would be passed as a parameter to the errorMap function.

I would move the errorMap function that is in the en.ts file to the root, or we could even create a folder called errors, to place the files that deal with errors.

Then, I would create a pt-br file within the locales, with the translation of the error content.

This would initially make it easier for Brazilians to use, but it would also be easier to implement in other languages ​​as well.