Make DeepL translator experimental for now
Needs documentation. Change-Id: If77436a37b5ec40f3eb08a32f0315c1696428c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145184 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
parent
b00c1ea3c4
commit
0a2b048482
2 changed files with 16 additions and 0 deletions
|
@ -1418,6 +1418,14 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
|
|||
nPageId = static_cast<sal_uInt16>(SID_LANGUAGE_OPTIONS_RES[i].second);
|
||||
if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
|
||||
continue;
|
||||
|
||||
// Disable DeepL translation settings, if experimental mode is not enabled
|
||||
if( RID_SVXPAGE_DEEPL_OPTIONS == nPageId )
|
||||
{
|
||||
if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() )
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ( RID_SVXPAGE_JSEARCH_OPTIONS != nPageId || SvtCJKOptions::IsJapaneseFindEnabled() ) &&
|
||||
( RID_SVXPAGE_ASIAN_LAYOUT != nPageId || SvtCJKOptions::IsAsianTypographyEnabled() ) &&
|
||||
( RID_SVXPAGE_OPTIONS_CTL != nPageId || aCTLLanguageOptions.IsCTLFontEnabled() ) )
|
||||
|
|
|
@ -106,6 +106,8 @@
|
|||
#include <authfld.hxx>
|
||||
#include <config_wasm_strip.h>
|
||||
#if !ENABLE_WASM_STRIP_EXTRA
|
||||
#include <officecfg/Office/Common.hxx>
|
||||
#include <svl/visitem.hxx>
|
||||
#include <translatelangselect.hxx>
|
||||
#include <svtools/deeplcfg.hxx>
|
||||
#endif // ENABLE_WASM_STRIP_EXTRA
|
||||
|
@ -2211,6 +2213,12 @@ void SwTextShell::GetState( SfxItemSet &rSet )
|
|||
case SID_FM_TRANSLATE:
|
||||
{
|
||||
#if !ENABLE_WASM_STRIP_EXTRA
|
||||
if (!officecfg::Office::Common::Misc::ExperimentalMode::get()
|
||||
&& !comphelper::LibreOfficeKit::isActive())
|
||||
{
|
||||
rSet.Put(SfxVisibilityItem(nWhich, false));
|
||||
break;
|
||||
}
|
||||
const SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
|
||||
if (rDeeplOptions.getAPIUrl().isEmpty() || rDeeplOptions.getAuthKey().isEmpty())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue