]> git.pld-linux.org Git - packages/cups.git/blob - cups-locale.patch
- fix empty output of lpstat if LANG=pl; part of 10321 in cups cvn
[packages/cups.git] / cups-locale.patch
1 Index: cups/language.c
2 ===================================================================
3 --- cups/language.c     (revision 10320)
4 +++ cups/language.c     (revision 10321)
5 @@ -3,7 +3,7 @@
6   *
7   *   I18N/language support for CUPS.
8   *
9 - *   Copyright 2007-2011 by Apple Inc.
10 + *   Copyright 2007-2012 by Apple Inc.
11   *   Copyright 1997-2007 by Easy Software Products.
12   *
13   *   These coded instructions, statements, and computer programs are the
14 @@ -979,8 +979,23 @@
15        */
16  
17        if (m)
18 -        cupsArrayAdd(a, m);
19 +      {
20 +        if (m->str[0])
21 +        {
22 +          cupsArrayAdd(a, m);
23 +        }
24 +        else
25 +        {
26 +         /*
27 +          * Translation is empty, don't add it... (STR #4033)
28 +          */
29  
30 +          free(m->id);
31 +          free(m->str);
32 +          free(m);
33 +        }
34 +      }
35 +
36       /*
37        * Create a new message with the given msgid string...
38        */
39 @@ -1057,8 +1072,23 @@
40    */
41  
42    if (m)
43 -    cupsArrayAdd(a, m);
44 +  {
45 +    if (m->str[0])
46 +    {
47 +      cupsArrayAdd(a, m);
48 +    }
49 +    else
50 +    {
51 +     /*
52 +      * Translation is empty, don't add it... (STR #4033)
53 +      */
54  
55 +      free(m->id);
56 +      free(m->str);
57 +      free(m);
58 +    }
59 +  }
60 +
61   /*
62    * Close the message catalog file and return the new array...
63    */
This page took 0.1195 seconds and 3 git commands to generate.