Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Translate recursively all files in a repo #29

Open
mikgross opened this issue May 23, 2023 · 2 comments
Open

[FEATURE REQUEST] Translate recursively all files in a repo #29

mikgross opened this issue May 23, 2023 · 2 comments

Comments

@mikgross
Copy link

mikgross commented May 23, 2023

Hi! I would like to request a new feature which would take as input multiple file, or a repo and then recursively go through all the files and perform the translation.

something like:

jsontt . or
jsontt ./folder/* or
jsontt ./folder-x

Happy to help achieve this.

@ParvinEyvazov
Copy link
Member

Hey @mikgross, Thank you for your comment.

It looks like an interesting feature but for this scenario, all files have to be in the same language. And output names have to be adjusted by their origin name.

And another dilemma is if the user runs jsontt for the entire folder, it will not be possible to run it again after completion. Because newly generated files will be in the same folder and when the user runs it again, it will process these generated ones too which will make confusion.

Of course, we can find a way to solve them, that could create a bad UX.

Do you have any great ideas to solve them?

@mikgross
Copy link
Author

Hey @ParvinEyvazov, I get your points.

We could maybe think of creating an output folder at the same level as the root folder? Or create an output folder in the root folder directly, which will be ignored if reran for a different language.

Let's imagine we are in root/ and run jsontt . and chose fr and es as an output (which could also be defined at the CLI level). The output could look like:

root/en.js
root/translation-es-fr/fr.js
root/translation-es-fr/es.js

OR

root/en.js
root/../root-jsontt-es-fr/fr.js
root/../root-jsontt-es-fr/es.js

Something like this....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants