-CHANGES.txt - 2.1.0 - 2015-08-05
+CHANGES.txt - 2.1.0 - 2015-08-06
--------------------------------
CHANGES IN CUPS V2.1.0
+ - The new Hong Kong Chinese locale did not correctly use Taiwan Chinese
+ as a fallback (<rdar://problem/22130168>)
- "make check" incorrectly reported an expectation of 18 warning
messages when 8 were expected (STR #4684)
locale = "Japanese";
else if (!strncmp(locale, "es", 2))
locale = "Spanish";
+ else if (!strcmp(locale, "zh_HK"))
+ {
+ /*
+ * <rdar://problem/22130168>
+ *
+ * Try zh_TW first, then zh... Sigh...
+ */
+
+ if (!access(CUPS_BUNDLEDIR "/Resources/zh_TW.lproj/cups.strings", 0))
+ locale = "zh_TW";
+ else
+ locale = "zh";
+ }
else if (strstr(locale, "_") != NULL || strstr(locale, "-") != NULL)
{
/*
*
* PPD localization routines for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll_CC, keyword);
if ((attr = ppdFindAttr(ppd, lkeyword, spec)) == NULL)
{
- snprintf(lkeyword, sizeof(lkeyword), "%2.2s.%s", ll_CC, keyword);
- attr = ppdFindAttr(ppd, lkeyword, spec);
+ /*
+ * <rdar://problem/22130168>
+ *
+ * Hong Kong locale needs special handling... Sigh...
+ */
+
+ if (!strcmp(ll_CC, "zh_HK"))
+ {
+ snprintf(lkeyword, sizeof(lkeyword), "zh_TW.%s", keyword);
+ attr = ppdFindAttr(ppd, lkeyword, spec);
+ }
+
+ if (!attr)
+ {
+ snprintf(lkeyword, sizeof(lkeyword), "%2.2s.%s", ll_CC, keyword);
+ attr = ppdFindAttr(ppd, lkeyword, spec);
+ }
if (!attr)
{