Author Topic: Plugin translator and save option.  (Read 14556 times)

SoCu

  • Newbie
  • *
  • Posts: 15
Plugin translator and save option.
« on: September 03, 2016, 01:19:53 pm »
Hello,

Is there a plugin that can be put to translate emails or texts selected ?, Just as there is for Mozilla Thunderbird Windows?

¿AquaMail have any option to save e-mail as a file?

Best regards

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Plugin translator and save option.
« Reply #1 on: September 03, 2016, 02:59:00 pm »
I am not aware of any plugin translators.
But I suspect, you can try to use "share" for that purpose, to pass the message to a translator program that is capable handling it.
I just checked and Google translate can receive the text that way.

No, unfortunately, you cannot save a message. But you can "share" it to a text editor, and save there.
And just in case you need to save the message: In the same "share" menu there is also "copy" text option.
You can paste it in any text editor.  (I like Jota text editor).
I hope this helps.

mikeone

  • Hero Member
  • *****
  • Posts: 2767
Re: Plugin translator and save option.
« Reply #2 on: September 03, 2016, 03:31:37 pm »
I am not aware of any plugin translators.
But I suspect, you can try to use "share" for that purpose, to pass the message to a translator program that is capable handling it.
I just checked and Google translate can receive the text that way.

No, unfortunately, you cannot save a message. But you can "share" it to a text editor, and save there.
And just in case you need to save the message: In the same "share" menu there is also "copy" text option.
You can paste it in any text editor.  (I like Jota text editor).
I hope this helps.
1. Using the app 'Google translate' through the "share" menu item should be a sufficient way, at least it is a solution for me.

2. Save a message as a file:
In addition to @StR's suggestions you should be also able to save a massage as a PDF-file:
> in Message view > overflow button (three dots on the action bar) > 'Copy/Send/Share/Print' > 'Print via Google Cloud Print' > 'Save as PDF'
« Last Edit: September 03, 2016, 05:02:24 pm by mikeone »

Geezer

  • Guest
Re: Plugin translator and save option.
« Reply #3 on: September 03, 2016, 04:31:59 pm »
The Google Translate app is quite flexible.  In addition to translating text that you enter manually, you can set it up to translate text residing in any other app using the Tap to Translate feature.  There's no need to save text to a file.  After you install the app it provides a tour of this feature, explaining how to activate and use it.


I have no experience with the Translate app but thought I'd mention it in case you would like to check it out.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Plugin translator and save option.
« Reply #4 on: September 04, 2016, 10:09:46 pm »
Yes, "share" works with Google Translate and *should* work with other apps too (but it depends on the developers of those apps).

There have been suggestions to have a "translate" button right in AquaMail -- but the difficult part is detecting a message's actual language. You can't detect this just from analyzing the characters.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

SoCu

  • Newbie
  • *
  • Posts: 15
Re: Plugin translator and save option.
« Reply #5 on: September 05, 2016, 12:58:42 pm »
thanks, I'll try our advice.

P.S. You could also put a button displayed when text is selected, to call the google translator application that we have installed.

.
« Last Edit: September 05, 2016, 01:07:01 pm by SoCu »

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Plugin translator and save option.
« Reply #6 on: September 08, 2016, 12:55:00 pm »
Yes, "share" works with Google Translate and *should* work with other apps too (but it depends on the developers of those apps).

There have been suggestions to have a "translate" button right in AquaMail -- but the difficult part is detecting a message's actual language. You can't detect this just from analyzing the characters.

Code: [Select]
Intent intent;
        intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setPackage("com.google.android.apps.translate");

        Uri uri = new Uri.Builder()
                .scheme("https")
                .authority("translate.google.com")
                .path("/m/translate")
                .appendQueryParameter("q", "dog")
                .appendQueryParameter("tl", "sk") // target language
                //.appendQueryParameter("sl", "fr") // source language
                .build();
        //intent.setType("text/plain"); //not needed, but possible
        intent.setData(uri);
        startActivity(intent);


just comment ".appendQueryParameter("sl", "fr")" and Google Translate would use auto detection. I think this is handy, to have item in Menu to Translate (ie call this intent)

Do you want to use the latest AquaMail version?
Try AquaMail Updater!

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Plugin translator and save option.
« Reply #7 on: September 11, 2016, 09:50:44 am »
Edit: I also implemented free way to translate text using Google - free, legal, no paid API key needed.

https://github.com/pylerSM/GoogleTranslatorLib/tree/master/googletranslator/src/main/java/com/pyler/googletranslator
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Plugin translator and save option.
« Reply #8 on: September 20, 2016, 09:02:43 pm »
@pyler -- yes, that's nice, but how do you *know* if a message needs translation?

It doesn't make any sense to translate from English to English, or from Russian to Russian.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Plugin translator and save option.
« Reply #9 on: September 20, 2016, 09:56:25 pm »
Well. Why not leave "Translate" menu item for all messages anyway?
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Plugin translator and save option.
« Reply #10 on: September 20, 2016, 11:48:39 pm »
Well, suppose I could...

In the snippet you posted above, is it possible to supply actual text to translate?

The usual way, for ACTION_SHARE is:

      intent.putExtra(Intent.EXTRA_TEXT, text);
      intent.setType(MimeDefs.MIME_TEXT_PLAIN);


Do you happen to know?
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Plugin translator and save option.
« Reply #11 on: September 21, 2016, 12:20:08 am »
appendQueryParameter("q", "any text")
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Plugin translator and save option.
« Reply #12 on: September 23, 2016, 08:59:44 pm »
Um, not good, the "text" may be very very very long, too long to be practical for a URL parameter.

I'll try to play with ACTION_SHARE + setPackageName("google translate"). Maybe there are intent extras...
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/