Hello again.
Quote:
Originally Posted by pazos
...Offline translators are android activities and have their own UI. You cannot integrate them with KOReader UI. Just open them...
|
Quote:
Originally Posted by pazos
...it turns out that you can open Google Translate on top of KOReader activity...So it is relatively easy to extend the "translate button" behaviour like we extended the "dictionary button" behaviour (ie: providing integration with 3rd party apps).
|
Just to be clear, does this mean it could be possible to bring the offline translator as an overlay using the koreader UI? or I am confusing things again?
Quote:
Originally Posted by pazos
...it turns out that you can open Google Translate on top of KOReader activity. That doesn't happen using the SHARE intent but works fine with PROCESS_TEXT intent.
|
When you say "open ...
on top of" using the PROCESS_TEXT intent, you mean opening it as an activity not necessarily as an overlay, correct?
Quote:
Originally Posted by pazos
...So it is relatively easy to extend the "translate button" behaviour like we extended the "dictionary button" behaviour (ie: providing integration with 3rd party apps).
In fact if I create a dictionaries.lua with:
Code:
return {
{ "GTranslate", "Google Translate", true, "com.google.android.apps.translate", "text" },
}
and select that dict on the menu the overlay just pops over the activity exactly like when you use "tap to translate" feature.
I don't plan to implement it myself but I will be happy to help 
|
You mean the "translate button" would manage a list of 3rd party translators to choose from the same way the "dictionary button" can bring on colordict, goldendict, fora, etc. Right?
In that case one should not use the dictionaries.lua to bring up translators because a dictionary pops up when you select one word, and the main function of a translator is to translate phrases or sentences.
It would be better to create a translators.lua that acts as a dictionary.lua but only when you select more than one word and hold the last word for about a second. I cannot imagine how much work would be needed but would be interesting.