[gnome-software: 1/2] gs-appstream: Treat all territorial variants of English the same




commit f70ddb6fd48993f7bd597f0438fb1cc536952a5c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Aug 17 12:34:58 2021 +0100

    gs-appstream: Treat all territorial variants of English the same
    
    Assume that all territorial variants of English are mutually intelligble
    to the extent that apps are unlikely to be translated to them, and it’s
    not worth pointing out to the user that an app will only be in US
    English and not British English (or Zimbabwean English, etc.).
    
    If apps start being translated to English variants more commonly, we
    could revert this commit.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1406

 lib/gs-appstream.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index 565b1df25..86cfe16eb 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -631,8 +631,8 @@ _gs_utils_locale_has_translations (const gchar *locale)
        g_autofree gchar *locale_copy = g_strdup (locale);
        gchar *separator;
 
-       /* Strip off the codeset and modifier, if present. */
-       separator = strpbrk (locale_copy, ".@");
+       /* Strip off the territory, codeset and modifier, if present. */
+       separator = strpbrk (locale_copy, "_.@");
        if (separator != NULL)
                *separator = '\0';
 
@@ -640,8 +640,6 @@ _gs_utils_locale_has_translations (const gchar *locale)
                return FALSE;
        if (g_strcmp0 (locale_copy, "en") == 0)
                return FALSE;
-       if (g_strcmp0 (locale_copy, "en_US") == 0)
-               return FALSE;
        return TRUE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]