summaryrefslogtreecommitdiff
path: root/community/lastfm-client/set-locale.diff
blob: 3b81e6cbbab3929810904784f67f0730e0304a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/libUnicorn/Settings.h
+++ b/src/libUnicorn/Settings.h
@@ -226,6 +226,17 @@
         QString langCode = customAppLanguage();
         if ( langCode.isEmpty() )
         {
+            #ifdef LINUX
+            // Now check the environment including LC_MESSAGES
+            // This fixes Debian bug #432232
+            if ( langCode.isEmpty() )
+                langCode = qgetenv( "LC_ALL" );
+            if ( langCode.isEmpty() )
+                langCode = qgetenv( "LC_MESSAGES" );
+            if ( langCode.isEmpty() )
+                langCode = qgetenv( "LANG" );
+            #endif
+
             // If none found, use system locale
             #ifdef Q_WS_MAC
             QLocale::Language qtLang = UnicornUtils::osxLanguageCode();