Skip to content

Commit

Permalink
Add _CUPS_MESSAGE_EMPTY flag to allow loading of empty localizations …
Browse files Browse the repository at this point in the history
…(needed

for checkpo program)
  • Loading branch information
michaelrsweet committed Jan 24, 2019
1 parent 7cc7148 commit 7281649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cups/language-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern "C" {
# define _CUPS_MESSAGE_PO 0 /* Message file is in GNU .po format */
# define _CUPS_MESSAGE_UNQUOTE 1 /* Unescape \foo in strings? */
# define _CUPS_MESSAGE_STRINGS 2 /* Message file is in Apple .strings format */
# define _CUPS_MESSAGE_EMPTY 4 /* Allow empty localized strings */


/*
Expand Down
4 changes: 2 additions & 2 deletions cups/language.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ _cupsMessageLoad(const char *filename, /* I - Message catalog to load */

if (m)
{
if (m->str && m->str[0])
if (m->str && (m->str[0] || (flags & _CUPS_MESSAGE_EMPTY)))
{
cupsArrayAdd(a, m);
}
Expand Down Expand Up @@ -1114,7 +1114,7 @@ _cupsMessageLoad(const char *filename, /* I - Message catalog to load */

if (m)
{
if (m->str && m->str[0])
if (m->str && (m->str[0] || (flags & _CUPS_MESSAGE_EMPTY)))
{
cupsArrayAdd(a, m);
}
Expand Down

0 comments on commit 7281649

Please sign in to comment.