]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
ppdLocalize() now supports localizing for Japanese using the "jp"
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 20 Mar 2007 01:34:29 +0000 (01:34 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 20 Mar 2007 01:34:29 +0000 (01:34 +0000)
locale name used by the ppdmerge program from the CUPS DDK 1.1.0
(STR #2301)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6367 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.2.txt
cups/localize.c

index 790e41ac5c522cbaa8a8ef966c3c41dcaeb19d42..d1fe1e7637175026d331753debf69a6f1792d041 100644 (file)
@@ -3,6 +3,9 @@ CHANGES-1.2.txt
 
 CHANGES IN CUPS V1.2.10
 
+       - ppdLocalize() now supports localizing for Japanese
+         using the "jp" locale name used by the ppdmerge
+         program from the CUPS DDK 1.1.0 (STR #2301)
        - _cupsAdminSetServerSettings() did not support changing
          of top-level directives as designed.
        - The init script path check was broken.
index ef699ddf2fece92926dc32086d3fb1ac538875b9..aa1742d18c374d85e9e39705d779e5bec4f7dea4 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   PPD custom option routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -183,6 +183,19 @@ ppd_text(ppd_file_t *ppd,          /* I - PPD file */
   {
     snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
     attr = ppdFindAttr(ppd, lkeyword, spec);
+
+    if (!attr && !strcmp(ll, "ja"))
+    {
+     /*
+      * Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
+      * PPD files were incorrectly assigned "jp" as the locale name
+      * instead of "ja".  Support both the old (incorrect) and new
+      * locale names for Japanese...
+      */
+
+      snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
+      attr = ppdFindAttr(ppd, lkeyword, spec);
+    }
   }
 
 #ifdef DEBUG