Re: Trans_tray translation program
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.
Discussion, talk and tips
https://forum.puppylinux.com/
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.
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.
preferences looks like this
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.
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.
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.
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.
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.
@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
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 alreadyIt 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.
amethyst wrote: Sat Jun 11, 2022 5:13 amCrow 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