diff options
author | Eike Rathke <erack@redhat.com> | 2021-07-16 11:50:39 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-07-20 09:30:31 +0200 |
commit | 30f2e44833c1f7edbda2faadcf3a62657d588a60 (patch) | |
tree | b48607b435e855648fcc42480cb8929f3ec6c654 /sw | |
parent | 92e44b6feb2d694ca25883545a1b22254ca2c1b1 (diff) |
Fix lang::Locale.Language usage, tdf#128191 follow-up
Using plain lang::Locale.Language is always wrong, it may even be
'qlt' for a more complex language tag. As the InfoBar message is
"Please install the hyphenation package for locale “%1”."
actually use the BCP 47 language tag of that character/paragraph
attribution.
Spotted in
https://ask.libreoffice.org/en/question/280102/install-the-hyphenation-package-for-locale-ka/
https://ask.libreoffice.org/en/question/238764/error-message-reads-install-the-hyphenation-package-for-locale-zh/
Change-Id: I5805d4d711989a9d0260940666d3eb33eae830af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119020
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 64f885a6c9d51999b737c0f61bc3a7fa311a5a94)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119032
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index ac0b61f29a79..20120767266c 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1501,7 +1501,7 @@ bool SwTextFormatInfo::IsHyphenate() const pShell->AppendInfoBarWhenReady( "hyphenationmissing", SwResId(STR_HYPH_MISSING), SwResId(STR_HYPH_MISSING_DETAIL) - .replaceFirst("%1", g_pBreakIt->GetLocale(eTmp).Language), + .replaceFirst("%1", LanguageTag::convertToBcp47( g_pBreakIt->GetLocale(eTmp))), InfobarType::WARNING); } } |