]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix handling of "yue" language.
authorMichael R Sweet <michaelrsweet@gmail.com>
Mon, 30 Oct 2017 16:20:12 +0000 (12:20 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Mon, 30 Oct 2017 16:20:12 +0000 (12:20 -0400)
cups/language.c
cups/testlang.c

index 289f7b41886183506085fbee06f3ea8cf132646a..e6d2d44aad459faea4ededb12b94a8555feae215 100644 (file)
@@ -697,9 +697,9 @@ cupsLangGet(const char *language)   /* I - Language or locale */
       * Map Chinese region codes to legacy country codes.
       */
 
-      if (!strcmp(country, "HANS"))
+      if (!strcmp(language, "zh") && !strcmp(country, "HANS"))
         strlcpy(country, "CN", sizeof(country));
-      if (!strcmp(country, "HANT"))
+      if (!strcmp(language, "zh") && !strcmp(country, "HANT"))
         strlcpy(country, "TW", sizeof(country));
     }
 
index 5d9a4719af41a707fc44edf6c2b80b0bfc47b412..3f140d9bec17f9f00c34b4e42122ce541d8d7b5b 100644 (file)
@@ -245,6 +245,9 @@ main(int  argc,                             /* I - Number of command-line arguments */
   }
 #endif /* __APPLE__ */
 
+  if (errors == 0)
+    puts("ALL TESTS PASSED");
+
   return (errors > 0);
 }