From e20d2de7836da52dbf9e528d1043b1e188097bfd Mon Sep 17 00:00:00 2001 From: Mert Tumer Date: Tue, 5 Jul 2022 12:03:27 +0300 Subject: new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140624 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- .../org/openoffice/Office/UI/WriterCommands.xcu | 8 ++++++++ .../schema/org/openoffice/Office/Linguistic.xcs | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'officecfg') diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 9513c20cd5d1..1c20f951bf1d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -1349,6 +1349,14 @@ 1 + + + Translate... + + + 1 + + Co~lumns... diff --git a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs index fe9365d036dc..2ecc4ae34804 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs @@ -408,6 +408,28 @@ + + + Contains translation relevant settings. + + + + Contains DeepL API relevant settings. + + + + Deepl Translator API URL + + + + + + Deepl Translator API URL Authkey + + + + + Contains hyphenation relevant settings. -- cgit