]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix localization of InputSlot/media-source (Issue #120)
authorMichael R Sweet <msweet@msweet.org>
Thu, 11 Mar 2021 00:25:21 +0000 (19:25 -0500)
committerMichael R Sweet <msweet@msweet.org>
Thu, 11 Mar 2021 00:25:30 +0000 (19:25 -0500)
cups/ppd-cache.c

index 5446fe189db85d54338133b0181dd8463d0d6c59..1032b13fc2d3a61f19869c1fdd40a8b3de9be8e7 100644 (file)
@@ -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: \"<</MediaPosition %d>>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;
        }
     }