Bug 152247 - Machine translation does not work with our own documentation guides
Summary: Machine translation does not work with our own documentation guides
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DeepL
  Show dependency treegraph
 
Reported: 2022-11-27 09:31 UTC by Jean-Baptiste Faure
Modified: 2023-11-26 13:32 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2022-11-27 09:31:30 UTC
Description:
Since october 12, we have a new functionality in LO 7.5 : automatic translation using DeepL API.
The commit implementing that is https://git.libreoffice.org/core/+/e20d2de7836da52dbf9e528d1043b1e188097bfd

It is easy to configure the function, once you have open an account at DeepL. You can open a free account for 500.000 characters per month.

The remaining problems are how the translator send paragraphs to DeepL and receive translated paragraphs from DeepL.

My test file is the preface avec the LO 7.3 guide : https://wiki.documentfoundation.org/images/9/98/GS7300-Preface.odt

I identified at least 2 difficulties:
- translator does not like sections or/and fields. It seems that sections or fields disrupt the paragraph flow so that the translator does not see the paragraphs in the same order than the user, so it does not send and receive paragraphs corresponding to what was selected.
- translator does not like lists : it adds an empty paragraph after each item. As a consequence, if you select 6 paragraphs to translate, it receive only the first three + 3 empty paragraphs.

Steps to Reproduce:
1.Open GS7300-Preface.odt
2.Menu Tools > Translate
3.Choose the target language
4.select the list in the second chapter
5.Tools > Translate

Actual Results:
After 3: Translator try to translate the whole document. You see many entries from the ToC in place of the normal paragraphs.

After 5: you get only the half of translated paragraphs and an empty paragraph after each translated paragraph.


Expected Results:
Does not replace a translated paragraph by another
Does not insert empty paragraph where there is not.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ae2d1315766581259756c819f0227270d344f4d4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded
Comment 1 Dieter 2022-11-27 13:54:33 UTC
Wasn't aware about that tool. Would be great, if it works. Couldn't add Mert Tumer as author of the commit in cc, so I've added Miklos Vajna.

BTW: Feature doesn't work for me at all (after selecting target language nothing happens)
Comment 2 Jean-Baptiste Faure 2022-11-27 15:24:58 UTC Comment hidden (obsolete)
Comment 3 Aron Budea 2022-11-28 07:55:10 UTC
(In reply to Jean-Baptiste Faure from comment #2)
> Did you configure API URL and Authentication key in Tools > Options >
> Language Settings > DeepL Server ?
A patch so the Translate entry in Options is only enabled if both config fields are filled:
https://gerrit.libreoffice.org/c/core/+/143359
Comment 4 Dieter 2022-12-17 13:09:54 UTC Comment hidden (obsolete)
Comment 5 Jean-Baptiste Faure 2022-12-18 19:35:01 UTC
(In reply to Dieter from comment #4)
> Still not possible for me to use that feature
> [...]
> BTW: Is api-free.deepl.com the correct URL?

No, it is: https://api-free.deepl.com/v2/translate

Of course you need an authentication key too.

Best regards. JBF
Comment 6 Dieter 2022-12-19 11:31:22 UTC
Thank you. Will try it later. I have an authentication key. I couldn't found bug report for documentation of this feature. So I've opened bug 152589.
Comment 7 Dieter 2022-12-19 19:38:42 UTC Comment hidden (obsolete)
Comment 8 Jean-Baptiste Faure 2022-12-19 23:03:47 UTC Comment hidden (obsolete)
Comment 9 Sebastiaan Veld 2022-12-28 11:50:30 UTC Comment hidden (obsolete)
Comment 10 Dieter 2022-12-28 12:16:42 UTC Comment hidden (obsolete)
Comment 11 Jean-Baptiste Faure 2023-01-03 21:25:20 UTC Comment hidden (obsolete)
Comment 12 Sebastiaan Veld 2023-01-04 08:55:06 UTC
(In reply to Jean-Baptiste Faure from comment #11)
> (In reply to Sebastiaan Veld from comment #9)
<--snip-->
> How many paragraphs do you have in your text to be translated? Do you have
> the same error message if you select only one paragraph?
> 
> I get the same error message if I try to translate the whole document
> GS7300-Preface.odt. At the beginning that works, but after a moment it seems
> that the synchronization between what is sent and what is received is
> broken. Then some translated text from the ToC is inserted in place of the
> normal text. 
> 
> Best regards.
> JBF

I started with just one sentence, that didn't work for either selecting the sentence or the whole document for translation. The text just disappears after the mentioned error message has appeared.

Then made two paragraphs: when selecting one of the sentences for translation the same thing happens and the text that was selected disappears.
When translating the whole document the error appears but only the first paragraph disappears in the process. Click OK on the error message the translation seems to go on and the second paragraph disappears as the next error appears. This goes on with more paragraphs added to the document until there is nothing more to translate. At the end the document is empty.
Comment 13 Timur 2023-11-09 17:26:58 UTC
Deepl is Experimental and I now see why. I set New.
I obsolete error to use, which should be bug 152706.
Comment 14 Dieter 2023-11-26 13:32:05 UTC
I confirm dissapearance of paragraphs with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5fe2bf914c251009ec4709fa8fdc45c3b53f676b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded