Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human-readable strings in auto-generated PPDs for driverless printing inconsistent #5205

Closed
tillkamppeter opened this issue Dec 20, 2017 · 5 comments
Assignees
Milestone

Comments

@tillkamppeter
Copy link

tillkamppeter commented Dec 20, 2017

First issue reported on my first tests with CUPS 2.3.x (2.3b1):

If a temporary queue for a driverless printer is created (or lpadmin-m everywhere is used) the resulting auto-created PPD file (by _ppdCreateFromIPP() function in cups/ppd-cache.c) has some inconsistencies in the human-readable strings:

  1. The "PageSize"/"PageRegion" options do not have human-readable strings for the choices at all (but there are appropriate strings in the cups_XX.po files).
  2. The "MediaType" option has only correct human-readable strings for the choices if LC_ALL is set to a CUPS-supported (by cups_XX.po file) language but not English (en or en_US or C). On a system set to English the human-readable choice names are even more cryptic than the machine-readable ones.
  3. Only a part of the option and choice names are translated to the selected locale language, like for example "cupsPrintQuality" and its 3 standard choices. "PageSize" for example is not translated at all.
    For obtaining these results and for generating the attached files I have run the following commands:
$ driverless
ipp:https://localhost:60000/ipp/print
$ ipptool --ippserver ~/HP-DeskJet_2540-ipp-attr-ippserver.txt ipp:https://localhost:60000/ipp/print get-printer-attributes.test
$ lpadmin -p HP-DeskJet_2540-everywhere-en -E -v ipp:https://localhost:60000/ipp/print -m everywhere
$ LC_ALL=de lpadmin -p HP-DeskJet_2540-everywhere-de -E -v ipp:https://localhost:60000/ipp/print -m everywhere

The printer hardware is an HP DeskJet 2540 connected via USB and accessed via IPP-over-USB using ippusbxd, therefore the "localhost" URI.

Here are the files resulting from the commands above:
IPP attributes of the printer, ready to emulate this printer with ippserver:
HP-DeskJet_2540-ipp-attr-ippserver.txt
English PPD file:
HP-DeskJet_2540-everywhere-en.ppd.txt
German PPD file:
HP-DeskJet_2540-everywhere-de.ppd.txt

@tillkamppeter tillkamppeter changed the title Human-readable strings in auto-generated PPDs for driverless printing inconsistemt Human-readable strings in auto-generated PPDs for driverless printing inconsistent Dec 20, 2017
@michaelrsweet
Copy link
Collaborator

Strange, it shouldn't matter which language is used. Will investigate after the holiday break.

@michaelrsweet
Copy link
Collaborator

The reason is because English is not an installed locale right now... Fixing...

michaelrsweet pushed a commit that referenced this issue Jan 15, 2018
@michaelrsweet
Copy link
Collaborator

[master a8b28f1] IPP Everywhere PPDs were not localized to English (Issue #5205)

@tillkamppeter
Copy link
Author

I have tested your fix (by simply copying the locale/cups.pot file of the CUPS source to /usr/share/cups/locale/en/cups_en.po) and it fixes point (2) of my original posting. Point (1) and (3) still need to get fixed.

@michaelrsweet
Copy link
Collaborator

@tillkamppeter localization of page sizes never uses the text from the PPD. Similarly, print quality is always just one of three values and shouldn’t be displaying the strings from the PPD... not “fixing” those...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants