diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-07-05 12:03:27 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-12 16:52:03 +0200 |
commit | e20d2de7836da52dbf9e528d1043b1e188097bfd (patch) | |
tree | cec9878830ff561c6d9eb492aa25eb8e8b49876a /include/sfx2 | |
parent | d75f27fd738eeb2c7dc6d22f198d55d3a877aa0b (diff) |
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 <vmiklos@collabora.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/pageids.hxx | 1 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/sfx2/pageids.hxx b/include/sfx2/pageids.hxx index 9371848b784a..1464ec40c55a 100644 --- a/include/sfx2/pageids.hxx +++ b/include/sfx2/pageids.hxx @@ -57,6 +57,7 @@ #define RID_SVXPAGE_COLORCONFIG (RID_SVX_START + 249) #define RID_SVXPAGE_BASICIDE_OPTIONS (RID_SVX_START + 209) #define RID_SVXPAGE_LANGTOOL_OPTIONS (RID_SVX_START + 210) +#define RID_SVXPAGE_DEEPL_OPTIONS (RID_SVX_START + 211) // Resource-Id's ------------------------------------------------------------ diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index e37c7894e574..8333ce792d9d 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -224,6 +224,7 @@ class SvxZoomItem; #define SID_VIEW_DATA_SOURCE_BROWSER (SID_SFX_START + 1660) #define SID_UNPACK (SID_SFX_START + 1662) // (SID_SFX_START + 1663) used further down +#define SID_ATTR_TARGETLANG_STR (SID_SFX_START + 1664) // FREE #define SID_OUTPUTSTREAM TypedWhichId<SfxUnoAnyItem>(SID_SFX_START + 1666) #define SID_IMAGE_ORIENTATION (SID_SFX_START + 1667) |