summaryrefslogtreecommitdiffstats
path: root/lingucomponent
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-06-01 19:31:38 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-06-05 16:56:54 +0200
commitdaa6caafb35c2f263518910f82359f73c0794b63 (patch)
tree7e0d103e3389f68473e589f126ae73712e0e53b1 /lingucomponent
parenttdf#132301 AutoCorrect: fix ’« in French qu’« word » (diff)
downloadcore-daa6caafb35c2f263518910f82359f73c0794b63.tar.gz
core-daa6caafb35c2f263518910f82359f73c0794b63.zip
tdf#133589 AutoCorrect: transliterate to Old Hungarian
In right-to-left paragraph mode, transliterate Hungarian text word by word during typing, also add the associated checkbox to Localized Options page of AutoCorrect dialog window. Old Hungarian (ISO 15924: Hung) is a historical and renewed script which is still in use to transliterate Hungarian writing. As a localized AutoCorrect feature, the patch supports the followings: – word-by-word transliteration of Hungarian texts only in right-to-left paragraph mode. – consonant disambiguation of digraphs and trigraphs based on hyphenation (now pattern-based Huhyphn dictionary of libhyphen, planned dictionary based Hunspell later) – transliteration by extended hu-Hung module of Numbertext library. Note: transliteration of the selected text using AutoCorrect Apply function has't been implemented, yet. Change-Id: Iee0f18e2485c974c35acf0a3abc3a49c2cf80196 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry-picked from commit da64ec8c8a91db6a6ec9657898f081d5ee67e739) Change-Id: If6639761278048d2fca61f7881a3287d38a1a313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95378 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/numbertext/numbertext.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx
index 006e99d30aed..bc13530d5250 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -138,6 +138,9 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo
LanguageTag aLanguageTag(rLocale);
OUString aCode(aLanguageTag.getLanguage());
OUString aCountry(aLanguageTag.getCountry());
+ OUString aScript(aLanguageTag.getScript());
+ if (!aScript.isEmpty())
+ aCode += "-" + aScript;
if (!aCountry.isEmpty())
aCode += "-" + aCountry;
OString aLangCode(OUStringToOString(aCode, RTL_TEXTENCODING_ASCII_US));