diff options
author | Khaled Hosny <khaled@aliftype.com> | 2023-02-07 21:29:12 +0200 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2023-02-07 22:01:07 +0000 |
commit | 9d44236a62bf59d120dda89924d0d1407b2bd52b (patch) | |
tree | de42ad1e7f626e85faf4c29798c1a77ea1cf5cd9 /lingucomponent/source/spellcheck | |
parent | ded56141c44971aa4b279bf232f0383b5b679694 (diff) |
tdf#153436: Improve handling of Arabic system spell dictionary on macOS
The system has only a generic “ar” spell dictionary, but LibreOffice
wants country code as well. Since it is the same dictionary for all
Arabic locales, we now add entries to all Arabic country codes we know
about.
Change-Id: Iaf5a8f495b3d1023d7fe40654afa0cce3fe9fbdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146641
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'lingucomponent/source/spellcheck')
-rw-r--r-- | lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index c20871b1e127..448870e9125c 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -125,7 +125,19 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() // Fix up generic languages (without territory code) and odd combinations that LO // doesn't handle. - if ([pLangStr isEqualToString:@"da"]) + if ([pLangStr isEqualToString:@"ar"]) + { + const std::vector<NSString*> aAR + { @"AE", @"BH", @"DJ", @"DZ", @"EG", @"ER", @"IL", @"IQ", @"JO", + @"KM", @"KW", @"LB", @"LY", @"MA", @"MR", @"OM", @"PS", @"QA", + @"SA", @"SD", @"SO", @"SY", @"TD", @"TN", @"YE" }; + for (auto c: aAR) + { + pLangStr = [@"ar_" stringByAppendingString: c]; + postspdict.push_back( pLangStr ); + } + } + else if ([pLangStr isEqualToString:@"da"]) { postspdict.push_back( @"da_DK" ); } |