librelogo/source/LibreLogo/LibreLogo.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8aa72eafc62fe4778e3b1539e982e8954585097
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Fri Sep 30 11:21:16 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Oct 4 12:54:25 2022 +0200

    LibreLogo: fix ast, gug, hsb and sid language support
    
    Asturian (ast), Paraguayan Guaraní (gug), Sidamo (sid)
    and Upper-Sorbian (hsb) localizations did't work despite
    their existing localization stored in the language fallback
    dictionary of LibreLogo.py, because their 3-letter language
    identifiers with their country codes trimmed to 2-letter,
    for example: "hsb-DE" -> "hs" instead of the correct "hsb".
    
    Missing Upper-Sorbian support was reported by Michael Wolf.
    
    Change-Id: I57aa6752d05452d1f8bb95ff91f4d4456dffcd80
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140796
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 5948e2e9f032916e3278f904097eff6b47b869d6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140877
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index 7aa71cac7be0..2b7af994eb61 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -35,7 +35,7 @@ def __l12n__(lng):
                         __lng__[lng][i] = __lng_fallback__[i][lng]
                     except:
                         try:
-                            __lng__[lng][i] = __lng_fallback__[i][lng[:2]]
+                            __lng__[lng][i] = 
__lng_fallback__[i][lng.split('_')[0]]
                         except:
                             __lng__[lng][i] = __lng_fallback__[i]["en_US"]
                 return __lng__[lng]

Reply via email to