sw/source/core/text/inftxt.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64f885a6c9d51999b737c0f61bc3a7fa311a5a94
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Fri Jul 16 11:50:39 2021 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Fri Jul 16 13:27:05 2021 +0200

    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 <er...@redhat.com>
    Tested-by: Jenkins

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);
         }
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to