diff options
author | Khaled Hosny <khaled@aliftype.com> | 2023-02-07 21:29:12 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-02-09 11:20:53 +0100 |
commit | 627f011d9a45834329b664fb1e22278c57ae8a33 (patch) | |
tree | 76617a87b68096fa7d8583232c2f1908253b552a /lingucomponent | |
parent | 73a68d5713dfa5e8921c85db162586e324262fb1 (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/+/146616
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'lingucomponent')
-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" ); } |