[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 16 15:05:18 UTC 2021


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

New commits:
commit afe8b282d79d1f5c848558200363b65def201ded
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Jul 16 11:50:39 2021 +0200
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Jul 16 17:04:40 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 <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 64f885a6c9d51999b737c0f61bc3a7fa311a5a94)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118931
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

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);
         }
     }


More information about the Libreoffice-commits mailing list