summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-23 13:27:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-25 11:09:16 +0200
commit57f649dc9a72e043901582a6e3da916da18ca4ed (patch)
tree3cb0e04e4226ee9db0e0359c58f4d7e6764fbefe /lingucomponent
parent83fd71e041f2c0520c4cc213e238c7f3c674c5a3 (diff)
Related: tdf#80713 allow translation of linguistic service display names
Change-Id: I23309dde1520e20e66d72fe9780454632d5f75b6 Reviewed-on: https://gerrit.libreoffice.org/43718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx7
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx7
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx8
3 files changed, 16 insertions, 6 deletions
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 9b6e41a423c2..5503333c18ce 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -36,9 +36,11 @@
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
+#include <svtools/strings.hrc>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <unotools/lingucfg.hxx>
+#include <unotools/resmgr.hxx>
#include <osl/file.hxx>
#include <stdio.h>
@@ -745,9 +747,10 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
return bRes;
}
-OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Hyphenator::getServiceDisplayName(const Locale& rLocale)
{
- return OUString( "Libhyphen Hyphenator" );
+ std::locale loc(Translate::Create("svt", LanguageTag(rLocale)));
+ return Translate::get(STR_DESCRIPTION_LIBHYPHEN, loc);
}
void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 0f363d7d35ad..a4b2a7c197f2 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -35,8 +35,10 @@
#include <linguistic/lngprops.hxx>
#include <linguistic/spelldta.hxx>
#include <i18nlangtag/languagetag.hxx>
+#include <svtools/strings.hrc>
#include <unotools/pathoptions.hxx>
#include <unotools/lingucfg.hxx>
+#include <unotools/resmgr.hxx>
#include <unotools/useroptions.hxx>
#include <osl/file.hxx>
#include <rtl/ustrbuf.hxx>
@@ -579,9 +581,10 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
return bRes;
}
-OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL SpellChecker::getServiceDisplayName(const Locale& rLocale)
{
- return OUString( "Hunspell SpellChecker" );
+ std::locale loc(Translate::Create("svt", LanguageTag(rLocale)));
+ return Translate::get(STR_DESCRIPTION_HUNSPELL, loc);
}
void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 9c008ef4ad9d..d0bdc0b46a7b 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -30,11 +30,14 @@
#include <osl/mutex.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/lingucfg.hxx>
+#include <unotools/resmgr.hxx>
#include <rtl/string.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/textenc.h>
+#include <svtools/strings.hrc>
+
#include "nthesimp.hxx"
#include <linguistic/misc.hxx>
#include <linguistic/lngprops.hxx>
@@ -517,9 +520,10 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
return xService;
}
-OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Thesaurus::getServiceDisplayName(const Locale& rLocale)
{
- return OUString( "Mythes Thesaurus" );
+ std::locale loc(Translate::Create("svt", LanguageTag(rLocale)));
+ return Translate::get(STR_DESCRIPTION_MYTHES, loc);
}
void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )