From: Michael R Sweet Date: Thu, 11 Mar 2021 00:25:21 +0000 (-0500) Subject: Fix localization of InputSlot/media-source (Issue #120) X-Git-Tag: v2.4b1~188^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7720619bacea5886be0d79d263d6221f1088520a;p=thirdparty%2Fcups.git Fix localization of InputSlot/media-source (Issue #120) --- diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 5446fe189d..1032b13fc2 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3700,8 +3700,13 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ if (!strcmp(sources[j], keyword)) { snprintf(msgid, sizeof(msgid), "media-source.%s", keyword); + + if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr)) + if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid) + msgstr = keyword; + cupsFilePrintf(fp, "*InputSlot %s: \"<>setpagedevice\"\n", ppdname, j); - cupsFilePrintf(fp, "*%s.InputSlot %s/%s: \"\"\n", lang->language, ppdname, _cupsLangString(lang, msgid)); + cupsFilePrintf(fp, "*%s.InputSlot %s/%s: \"\"\n", lang->language, ppdname, msgstr); break; } }