-
Notifications
You must be signed in to change notification settings - Fork 8
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
Ability to translate blocks of subtitles instead of translating line by line #19
Comments
It's urgent to improve this ability. I need it badly |
@mrnossiom @snow212-cn I agree this could radically improve translation quality. Could you volunteer a PR? |
The code seems to already do what you're asking for though, after review. All text lines are collected, then translated in 8000 character blocks. (@pepri correct me if I misunderstand the code). subtitles-editor/src/extension.ts Lines 390 to 408 in f878ab6
I think this request could be closed. |
I batch the lines when sending them for translation, but the lines are translated independently by the translation service. To improve this, I would need to join the lines to be translated together, but then I have to split them again as I want to keep multiple lines. I already tested this with |
Hello @pepri and @klausbadelt, So I did a little research and found that the free version we are using isn't documented at all. I think it is an old endpoint keep for backward compatibility reasons. I also found that Google Cloud APIs for batch traduction requires an account with billing setup. Furthermore, I use another translator since a while called DeepL, they have a fresh API with free plan of 500k chars a month. The API supports batch translation, by sending multiples sentences at once and add context to the translation. The only drawback it that it needs an API key along with an account.
Maybe, we could implement the functionality with DeepL API but keep Google API wonky translations as an alternative. Tell me what you think. Links |
Hey @pepri, |
Hi,
I ran into a problem when trying to translate subtitles.
The program translate lines separately from each other, but this make the translation incorrect.
Instead, it would be great to translate block by block to give Google Translate more context.
I can try to think of a better solution to enhance this function:
subtitles-editor/src/extension.ts
Lines 356 to 366 in f878ab6
Thanks for your answer.
The text was updated successfully, but these errors were encountered: