Page 2 of 2

Re: Trans_tray translation program

Posted: Tue Jun 07, 2022 11:24 am
by amethyst

The application is definitely slower with the translation in comparison to using the text box on the site. Seems to be a delay with the "fetching". Not so noticeable when it's only a few words.


Re: Trans_tray translation program

Posted: Wed Jun 08, 2022 1:39 pm
by stemsee
fredx181 wrote: Tue Jun 07, 2022 10:56 am

*** New trans-tray package v1.2 *** with a few changes:
- Only Google engine is used for translation, so no choice for Bing and/or Yandex (didn't work anymore), this might take away some confusion and annoyance.
- Set as default now is to NOT show original text in the main window (previously default was to show it) can be changed in the Preferences.
(may need to delete '/root/.trans_tray/prefs' after installing v1.2 and restart trans_tray, to apply)
Attached at first post
2022-06-07_12-59-40.png
@stemsee I didn't implement your latest changes (e.g. for dialogue mode), perhaps if you want, you can share your own package with these included :?:

Yes I have updated my Dogz_n_Pups sfs version.

trans_tray-noarch-Dogz_n_Pups-1.2.sfs
(64 KiB) Downloaded 58 times

Re: Trans_tray translation program

Posted: Wed Jun 08, 2022 2:52 pm
by stemsee

preferences looks like this

prefs.png
prefs.png (60.76 KiB) Viewed 866 times

whats the last radial checkbox? in fact the names could be more self explanatory, imho, in the case of mono, confexit, and the invisible one.


Re: Trans_tray translation program

Posted: Thu Jun 09, 2022 11:50 am
by fredx181
stemsee wrote:

preferences looks like this ..

.
How come ? I don't understand, tested your mod and it looks same as before for me, not like you showed.


Re: Trans_tray translation program

Posted: Fri Jun 10, 2022 6:34 pm
by amethyst

I see there are portables of DeepL available for Windows (will probably run with WINE but the download is rather large (150MB +) so didn't download.


Re: Trans_tray translation program

Posted: Fri Jun 10, 2022 7:10 pm
by stemsee

Deepl API examples for curl and web ... seems easy enough to include in trans_tray. This is the free, but maybe still need an account.

Code: Select all

curl https://api-free.deepl.com/v2/translate \
	-d auth_key=[yourAuthKey] \
	-d "text=Hello, world!"  \
	-d "target_lang=DE"
EXAMPLE RESPONSE
{
	"translations": [{
		"detected_source_language":"EN",
		"text":"Hallo, Welt!"
	}]
}

Code: Select all

POST /v2/translate?auth_key=[yourAuthKey]> HTTP/1.0
Host: api-free.deepl.com
User-Agent: YourApp
Accept: */*
Content-Length: [length]
Content-Type: application/x-www-form-urlencoded

auth_key=[yourAuthKey]&text=Hello, world&target_lang=DE
EXAMPLE RESPONSE
{
	"translations": [{
		"detected_source_language":"EN",
		"text":"Hallo, Welt!"
	}]
}

Document translation up to 1,000,000 characters

Code: Select all

EXAMPLE REQUEST
curl https://api-free.deepl.com/v2/document \
	-F "file=@mydoc.docx" \
	-F "auth_key=[yourAuthKey]" \
	-F "target_lang=DE"
EXAMPLE RESPONSE
{
	"document_id": "4D93510B386BA64DC32102B88C17F018",
	"document_key": "[documentKey]"
}

With google it would be fairly trivial to split a document up automatically into acceptable (10,000 chars or whatever the limit is) chunks for translating and collect them together for viewing.


Re: Trans_tray translation program

Posted: Sat Jun 11, 2022 2:10 am
by amethyst

I need the full version for big documents. The limit for DeepL free version is 5000 characters. Rather useless for converting books. HOWEVER, maybe a future project which should work as follows with the limited character version of DeepL (and Google Translate) will be useful. A script to:

1. Import the split text files of 5KB each (or the contents thereof copied) to the application for translation (assuming that DeepL can be be integrated into the utility).
2. Delete any default translation messages in the translation window after the translations have been done.
3. Save the translated text to a text document.

This should be possible because continuous translations can be done in one translation window.


Re: Trans_tray translation program

Posted: Sat Jun 11, 2022 3:37 am
by Grey

@amethyst By the way, have you tried Crow Translate?
There is voice pronunciation and image recognition using Tesseract.

I use it sometimes, according to my mood. However, I use "crutches", that is, I run inside Fossapup using Conty (there is a topic about it somewhere in the offtopic section).
There seems to be an Appimage on Git already :)

It would be necessary to create a topic on the forum about Crow Translate... But laziness :)


Re: Trans_tray translation program

Posted: Sat Jun 11, 2022 5:13 am
by amethyst
Grey wrote: Sat Jun 11, 2022 3:37 am

@amethyst By the way, have you tried Crow Translate?
There is voice pronunciation and image recognition using Tesseract.

I use it sometimes, according to my mood. However, I use "crutches", that is, I run inside Fossapup using Conty (there is a topic about it somewhere in the offtopic section).
There seems to be an Appimage on Git already :)

It would be necessary to create a topic on the forum about Crow Translate... But laziness :)

Crow translate uses the well-known translate engines like Google translate. It's just a sort of a frontend for these translation engines.


Re: Trans_tray translation program

Posted: Sat Jun 11, 2022 4:45 pm
by Grey
amethyst wrote: Sat Jun 11, 2022 5:13 am

Crow translate uses the well-known translate engines like Google translate. It's just a sort of a frontend for these translation engines.

Let it be so. But it is quite a convenient thing and as an alternative it can come in handy :)