From: Michael R Sweet Date: Mon, 30 Oct 2017 16:20:12 +0000 (-0400) Subject: Fix handling of "yue" language. X-Git-Tag: v2.2.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6579c998c4c8cdff9429ee6f949a2d1628a32b0d;p=thirdparty%2Fcups.git Fix handling of "yue" language. --- diff --git a/cups/language.c b/cups/language.c index 289f7b4188..e6d2d44aad 100644 --- a/cups/language.c +++ b/cups/language.c @@ -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)); } diff --git a/cups/testlang.c b/cups/testlang.c index 5d9a4719af..3f140d9bec 100644 --- a/cups/testlang.c +++ b/cups/testlang.c @@ -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); }