docs(validators): apply i18n for global
Overview
I have translated the @toss/validators package to the i18n specification.
Question
Currently, the folder structure seems to be not clean because there are implementation functions, test codes, and document files in one source file.

It may be okay now, but I think the bigger the @toss/validators package gets, the more messy it gets.
Is there a reason why you designed it like this? Here's how I thought about it.
π¦src
β£ πvalidators
β β πis-age.ts
β β πis-email.ts
β£ π__tests__
β β πis-age.spec.ts
β β πis-email.spec.ts
β£ πdocs
β πis-age.ko.md
β πis-age.en.md
β πis-email.ko.md
β πis-email.en.md
PR Checklist
- [x] I read and included theses actions below
- I have read the Contributing Guide
- I have written documents and tests, if needed.
Deploy Preview for slash-libraries ready!
| Name | Link |
|---|---|
| Latest commit | 87c3a8ffeb52b4cf2e3f492cf1973a8c6e9eb844 |
| Latest deploy log | https://app.netlify.com/sites/slash-libraries/deploys/634bb81b53407a0008992fc8 |
| Deploy Preview | https://deploy-preview-56--slash-libraries.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
It was by intention that the source code, test code, and documentation are put in the same directory. I thought they will always be edited together, so putting them as near as possible would be a better choice. (If they are far apart, we may forget to edit some files. I wish all docs and test cases are up to date)
But I agree that it might look messy as more files are added. For that case, what about arranging files like this?
is-age/
index.ts
index.spec.ts
index.en.md
index.ko.md
is-birth-date-6/
index.ts
index.spec.ts
index.en.md
index.ko.md
It was by intention that the source code, test code, and documentation are put in the same directory. I thought they will always be edited together, so putting them as near as possible would be a better choice. (If they are far apart, we may forget to edit some files. I wish all docs and test cases are up to date)
But I agree that it might look messy as more files are added. For that case, what about arranging files like this?
is-age/ index.ts index.spec.ts index.en.md index.ko.md is-birth-date-6/ index.ts index.spec.ts index.en.md index.ko.md
thank you for good suggestion!!
This is a really good method, but... There are many cases when I developing I find files by looking for Cmd+P on vscode. Would it be easy to find files if I implemented it like this?
I think it's okay! If others agree, I think it would be good to divide folders by domain and put doc files(en,ko), test codes, and actual files in them!
There are all the files in one domain, so it's neat as you suggested
Yes, I think we might try this. I think merging the pull request as is is not bad, so I will merge it right now. Feel free to open another pull request!
Thx! Have a good day