deepl-translate-github-action icon indicating copy to clipboard operation
deepl-translate-github-action copied to clipboard

Feature Request: Translate only changed text

Open fell-lucas opened this issue 1 year ago • 1 comments

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?

fell-lucas avatar Nov 26 '24 21:11 fell-lucas

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!

lyqht avatar Feb 25 '25 15:02 lyqht