Kaydet (Commit) eff395c2 authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Heiko Tietze

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: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Tested-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
üst 96c43a21
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include <linguistic/misc.hxx> #include <linguistic/misc.hxx>
#include <editeng/eerdll.hxx> #include <editeng/eerdll.hxx>
#include <editeng/editrids.hrc> #include <editeng/editrids.hrc>
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
using namespace ::comphelper; using namespace ::comphelper;
using namespace ::linguistic; using namespace ::linguistic;
...@@ -594,7 +596,10 @@ uno::Reference< XDictionary > LinguMgr::GetIgnoreAll() ...@@ -594,7 +596,10 @@ uno::Reference< XDictionary > LinguMgr::GetIgnoreAll()
uno::Reference< XSearchableDictionaryList > xTmpDicList( GetDictionaryList() ); uno::Reference< XSearchableDictionaryList > xTmpDicList( GetDictionaryList() );
if (xTmpDicList.is()) if (xTmpDicList.is())
{ {
xIgnoreAll.set( xTmpDicList->getDictionaryByName( "IgnoreAllList" ), UNO_QUERY ); std::locale loc(Translate::Create("svt"));
xIgnoreAll.set( xTmpDicList->getDictionaryByName(
Translate::get(STR_DESCRIPTION_IGNOREALLLIST, loc) ),
UNO_QUERY );
} }
return xIgnoreAll; return xIgnoreAll;
} }
......
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
#define STR_DESCRIPTION_HUNSPELL NC_("STR_DESCRIPTION_HUNSPELL", "Hunspell SpellChecker") #define STR_DESCRIPTION_HUNSPELL NC_("STR_DESCRIPTION_HUNSPELL", "Hunspell SpellChecker")
#define STR_DESCRIPTION_LIBHYPHEN NC_("STR_DESCRIPTION_LIBHYPHEN", "Libhyphen Hyphenator") #define STR_DESCRIPTION_LIBHYPHEN NC_("STR_DESCRIPTION_LIBHYPHEN", "Libhyphen Hyphenator")
#define STR_DESCRIPTION_MYTHES NC_("STR_DESCRIPTION_MYTHES", "Mythes Thesaurus") #define STR_DESCRIPTION_MYTHES NC_("STR_DESCRIPTION_MYTHES", "Mythes Thesaurus")
#define STR_DESCRIPTION_IGNOREALLLIST NC_("STR_DESCRIPTION_IGNOREALLLIST", "List of Ignored Words")
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -75,12 +75,6 @@ using namespace linguistic; ...@@ -75,12 +75,6 @@ using namespace linguistic;
// The following fake file name extension will be // The following fake file name extension will be
// added to the text of the title: field for correct // added to the text of the title: field for correct
// text stripping and dictionary saving. // 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 "." #define EXTENSION_FOR_TITLE_TEXT "."
static const sal_Char* const pVerStr2 = "WBSWG2"; static const sal_Char* const pVerStr2 = "WBSWG2";
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp> #include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
#include "defs.hxx" #include "defs.hxx"
#include "dlistimp.hxx" #include "dlistimp.hxx"
...@@ -611,8 +613,9 @@ void DicList::CreateDicList() ...@@ -611,8 +613,9 @@ void DicList::CreateDicList()
// create IgnoreAllList dictionary with empty URL (non persistent) // create IgnoreAllList dictionary with empty URL (non persistent)
// and add it to list // and add it to list
std::locale loc(Translate::Create("svt"));
uno::Reference< XDictionary > xIgnAll( uno::Reference< XDictionary > xIgnAll(
createDictionary( "IgnoreAllList", LinguLanguageToLocale( LANGUAGE_NONE ), createDictionary( Translate::get(STR_DESCRIPTION_IGNOREALLLIST, loc), LinguLanguageToLocale( LANGUAGE_NONE ),
DictionaryType_POSITIVE, OUString() ) ); DictionaryType_POSITIVE, OUString() ) );
if (xIgnAll.is()) if (xIgnAll.is())
{ {
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <unotools/localedatawrapper.hxx> #include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx> #include <unotools/syslocale.hxx>
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
...@@ -741,7 +743,10 @@ uno::Reference< XDictionary > GetIgnoreAllList() ...@@ -741,7 +743,10 @@ uno::Reference< XDictionary > GetIgnoreAllList()
uno::Reference< XDictionary > xRes; uno::Reference< XDictionary > xRes;
uno::Reference< XSearchableDictionaryList > xDL( GetDictionaryList() ); uno::Reference< XSearchableDictionaryList > xDL( GetDictionaryList() );
if (xDL.is()) if (xDL.is())
xRes = xDL->getDictionaryByName( "IgnoreAllList" ); {
std::locale loc(Translate::Create("svt"));
xRes = xDL->getDictionaryByName( Translate::get(STR_DESCRIPTION_IGNOREALLLIST, loc) );
}
return xRes; return xRes;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment