Fix some localization issues with Norwegian.

Esse commit está contido em:
Michael Sweet
2016-04-14 12:09:35 -04:00
commit b052deedae
4 arquivos alterados com 35 adições e 6 exclusões
+3 -1
Ver Arquivo
@@ -1,4 +1,4 @@
CHANGES.txt - 2.2b1 - 2016-04-12
CHANGES.txt - 2.2b1 - 2016-04-14
--------------------------------
CHANGES IN CUPS V2.2b1
@@ -27,4 +27,6 @@ CHANGES IN CUPS V2.2b1
(<rdar://problem/23135640>)
- Added a new cupsHashData API and support for hashed job passwords
(<rdar://problem/20221502>)
- Localization fixes (<rdar://problem/25292403>,
<rdar://problem/25461517>)
- Documentation changes (Issue #4781)
+16 -2
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* I18N/language support for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
* Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -1335,6 +1335,18 @@ appleMessageLoad(const char *locale) /* I - Locale ID */
snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale);
}
if (access(filename, 0))
{
/*
* <rdar://problem/25292403>
*
* Try with just the language code...
*/
strlcpy(baselang, locale, sizeof(baselang));
snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", baselang);
}
DEBUG_printf(("1appleMessageLoad: filename=\"%s\"", filename));
if (access(filename, 0))
@@ -1345,7 +1357,9 @@ appleMessageLoad(const char *locale) /* I - Locale ID */
if (!strncmp(locale, "en", 2))
locale = "English";
else if (!strncmp(locale, "nb", 2) || !strncmp(locale, "nl", 2))
else if (!strncmp(locale, "nb", 2))
locale = "no";
else if (!strncmp(locale, "nl", 2))
locale = "Dutch";
else if (!strncmp(locale, "fr", 2))
locale = "French";
+12 -1
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* PPD localization routines for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
* Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -694,6 +694,17 @@ _ppdLocalizedAttr(ppd_file_t *ppd, /* I - PPD file */
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
else if (!strncmp(ll_CC, "nb", 2))
{
/*
* Norway has two languages, "Bokmal" (the primary one)
* and "Nynorsk" (new Norwegian); this code maps from the (currently)
* recommended "nb" to the previously recommended "no"...
*/
snprintf(lkeyword, sizeof(lkeyword), "no.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
else if (!strncmp(ll_CC, "no", 2))
{
/*
+4 -2
Ver Arquivo
@@ -1,7 +1,7 @@
//
// Shared message catalog class for the CUPS PPD Compiler.
//
// Copyright 2007-2014 by Apple Inc.
// Copyright 2007-2016 by Apple Inc.
// Copyright 2002-2006 by Easy Software Products.
//
// These coded instructions, statements, and computer programs are the
@@ -78,7 +78,9 @@ ppdcCatalog::ppdcCatalog(const char *l, // I - Locale
if (!strncmp(l, "en", 2))
tl = "English";
else if (!strncmp(l, "nb", 2) || !strncmp(l, "nl", 2))
else if (!strncmp(l, "nb", 2))
tl = "no";
else if (!strncmp(l, "nl", 2))
tl = "Dutch";
else if (!strncmp(l, "fr", 2))
tl = "French";