You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Globalized PPD Strings not showing in web interface #1913
I have added two translations to my ppd (French and German) according to the documentation on the site (http://www.cups.org/documentation.php/spec-ppd.html). cupstestppd says it is ok. However, when I go to the web interface, all of my printer options remain in English.
The localhost:631 homepage is localized in my desired language. However, when I go to any other page, it is either all in English or mixed languages. Example: On the home page, the top menu is completely localized, but when I click "Printers", the top menu changes back to English.
I changed my loglevel to debug and tail'd the log file while browsing
the web interface. It always shows locale=(my desired target code).
Activity
michaelrsweet commentedon Aug 15, 2006
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Aug 15, 2006
"ppdlocalize.patch":
Index: localize.c
--- localize.c (revision 5823)
+++ localize.c (working copy)
@@ -80,6 +80,8 @@
*/
if (!ppd)
return (-1);
@@ -93,6 +95,9 @@
strlcpy(ll_CC, lang->language, sizeof(ll_CC));
strlcpy(ll, lang->language, sizeof(ll));
DEBUG_printf((" lang->language="%s", ll="%s", ll_CC="%s"...\n",
/*
/
@@ -165,17 +170,29 @@
ppd_attr_t *attr; / Current attribute */
DEBUG_printf(("ppd_text(ppd=%p, keyword="%s", spec="%s", "
/*
*/
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", keyword, ll_CC);
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll_CC, keyword);
if ((attr = ppdFindAttr(ppd, lkeyword, spec)) == NULL)
{
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", keyword, ll);
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
+#ifdef DEBUG
+#endif /* DEBUG _/
/_
Return text if we find it...
--- ppd.c (revision 5823)*/
Index: ppd.c
+++ ppd.c (working copy)
@@ -2037,10 +2037,8 @@
if ((ret = strcasecmp(a->name, b->name)) != 0)
return (ret);
else
}
Index: attr.c
--- attr.c (revision 5823)
+++ attr.c (working copy)
@@ -44,14 +44,19 @@
*/
-ppd_attr_t * /* O - Attribute or NULL if not found /
-ppdFindAttr(ppd_file_t *ppd, / I - PPD file data */
+ppd_attr_t * /_ O - Attribute or NULL if not found /
+ppdFindAttr(ppd_file_t *ppd, / I - PPD file data */
{
ppd_attr_t key; /* Search key */
ppd_attr_t key, /* Search key */
int diff; /* Current difference */
DEBUG_printf(("ppdFindAttr(ppd=%p, name="%s", spec="%s")\n", ppd,
/*
*/
@@ -72,7 +77,36 @@
*/
return ((ppd_attr_t *)cupsArrayFind(ppd->sorted_attrs, &key));
if ((attr = (ppd_attr_t *)cupsArrayFind(ppd->sorted_attrs, &key)) != NULL)
return (attr);
else if (spec)
return (NULL);
}
Index: testppd.c
--- testppd.c (revision 5823)
+++ testppd.c (working copy)
@@ -192,10 +192,18 @@
else
{
int i, j, k; /* Looping vars */
ppd_group_t *group; /_ Option group /
ppd_option_t *option; / Option */
putenv(lang);
ppdLocalize(ppd);
for (i = ppd->num_groups, group = ppd->groups;
@@ -203,7 +211,7 @@
i --, group ++)
{
printf("%s (%s):\n", group->name, group->text);
for (j = group->num_options, option = group->options;
j > 0;
j --, option ++)
@@ -215,6 +223,14 @@
option->choices[k].text);
}
}
+
}
}