summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-06-20 08:14:20 +0200
committerHeiko Tietze <tietze.heiko@gmail.com>2018-06-26 10:41:01 +0200
commiteff395c2d2a3026d9d65121e273af336fb0cfb19 (patch)
treeecfed2e0992b450ceb872f4e0623e9aaeb0b5169 /linguistic
parent96c43a21da48e9ef50f199b9418e089da42a8ebb (diff)
tdf#117620 Localize the temporary IgnoreAllList dictionarys name
Also give it a human readable original name Change-Id: I86060badac145e7b60cf7dc2e67e16e7c84c2837 Reviewed-on: https://gerrit.libreoffice.org/56143 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dicimp.cxx6
-rw-r--r--linguistic/source/dlistimp.cxx5
-rw-r--r--linguistic/source/misc.cxx7
3 files changed, 10 insertions, 8 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 12c82f461401..ddc5074f62c7 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -75,12 +75,6 @@ using namespace linguistic;
// The following fake file name extension will be
// added to the text of the title: field for correct
// text stripping and dictionary saving.
-//
-// TODO: add translation support?
-// tdf#50827 language dependent wordlists are already in
-// the appropriate dict packages.
-// Note: Also name of the special run-time dictionary
-// "IgnoreAllList" hasn't been localized yet.
#define EXTENSION_FOR_TITLE_TEXT "."
static const sal_Char* const pVerStr2 = "WBSWG2";
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 5aade2b9e02e..e1b92d4a41a1 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -37,6 +37,8 @@
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <svtools/strings.hrc>
+#include <unotools/resmgr.hxx>
#include "defs.hxx"
#include "dlistimp.hxx"
@@ -611,8 +613,9 @@ void DicList::CreateDicList()
// create IgnoreAllList dictionary with empty URL (non persistent)
// and add it to list
+ std::locale loc(Translate::Create("svt"));
uno::Reference< XDictionary > xIgnAll(
- createDictionary( "IgnoreAllList", LinguLanguageToLocale( LANGUAGE_NONE ),
+ createDictionary( Translate::get(STR_DESCRIPTION_IGNOREALLLIST, loc), LinguLanguageToLocale( LANGUAGE_NONE ),
DictionaryType_POSITIVE, OUString() ) );
if (xIgnAll.is())
{
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index ac0f508751d3..6582c91db586 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -38,6 +38,8 @@
#include <comphelper/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx>
+#include <svtools/strings.hrc>
+#include <unotools/resmgr.hxx>
#include <rtl/instance.hxx>
@@ -741,7 +743,10 @@ uno::Reference< XDictionary > GetIgnoreAllList()
uno::Reference< XDictionary > xRes;
uno::Reference< XSearchableDictionaryList > xDL( GetDictionaryList() );
if (xDL.is())
- xRes = xDL->getDictionaryByName( "IgnoreAllList" );
+ {
+ std::locale loc(Translate::Create("svt"));
+ xRes = xDL->getDictionaryByName( Translate::get(STR_DESCRIPTION_IGNOREALLLIST, loc) );
+ }
return xRes;
}