deepl-translate-github-action
deepl-translate-github-action copied to clipboard
Feature Request: Translate only changed text
Hey! I've recently integrated this in one of my projects, the work you've done here is amazing!
I have an idea that might improve the results and consume less tokens from DeepL: Is it possible to check for changed/added translations and send only those texts to DeepL? I imagine the implementation would be something like: (considering a flat .json scenario)
- Compare the changed lines in the source file with the same file in the main/master branch.
- If there is no file to compare it to, consider all lines as new
- If there is, save the new and changed lines in a temporary json
- Submit the temporary file to DeepL for translations
- Merge the new modified translations from DeepL into the respective flat .json outputs
What do you think?
yes, i would love to have this too. unfortunately i don't really have any bandwidth nowadays, if you know how to do it, please open a PR!