summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-07-16 11:50:39 +0200
committerEike Rathke <erack@redhat.com>2021-07-16 13:27:05 +0200
commit64f885a6c9d51999b737c0f61bc3a7fa311a5a94 (patch)
tree46d84cc936d8bf5b827d59d9403ede1fc6229024 /sw
parentcaac77e62fe44aa8d5ef282b63765ae05148548b (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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/inftxt.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index f43f811bd744..ddfc54bc6fc3 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1504,7 +1504,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);
}
}