theLee3 / flutter_auto_translator

A command-line tool to translate ARB files.
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Add DeepL Translation support to auto_translator #7

Closed tibetduman closed 8 months ago

tibetduman commented 8 months ago

In the new version of the auto_translator I have fixed issues with placeholder replacement for Google Translate and added support for using the translation tool called DeepL.

Without any specification of the 'translate-tool' in the l10n.yaml file, the auto_translator defaults back to Google Translate. Thus this new version is backwards compatible; so any program that makes use of auto_translate and does not wish to make use of DeepL functionalities will only benefit from the bug fixes.

All necessary instructions to use DeepL are described on the updated README.md.

orkun1675 commented 8 months ago

Hi @theLee3 , I asked Tibet if he can help contribute DeepL support to this plugin.

DeepL performs better in certain situations, such as daily speech (non-formal).

Example:

Translating "Cancel" (text button) from English to Turkish:

Google Translate yields: "Iptmal Etmek" which is the act of cancelling something, to cancel, verb. DeepL yields: "Iptal" which means to cancel, noun.

The latter is much more appropriate for a text button. The former sounds erroneous.

theLee3 commented 8 months ago

I am reviewing now. Thank you both.

theLee3 commented 8 months ago

I added the ability to specify which translator service to use on a target language basis. I also made some opinionated changes to variable names, etc. Please check the README to see how these changes may affect you if you're using the build from this PR.

tibetduman commented 8 months ago

Great, thanks for the heads up!