CUPS sometimes returns wrong localized strings for options and choices
Closed this issue · 1 comments
Describe the bug
While using CUPS to get localized strings for printer options and choices for those options, CUPS sometimes returns wrong localized strings. I was using the CPDB API functions, cpdbGetOptionTranslation and cpdbGetChoiceTranslation to get human-readable localized strings for the options and choices of options for printers as a part of my efforts to provide CPDB support to the LibreOffice Print Dialog. Since these functions work on getting the human-readable strings from CUPS, these functions are also giving wrong answers. For example for the option "media" if the one of the values is "na_ledger_11x17in" it gives "11 x 17" as the translated output, which is wrong. On the other hand for the choice "iso_a4_201x297mm" in "media" itself, it gives "A4" as the translated output which is correct.
Expected behavior
CUPS should return the correct localized string all the time. For "na_ledger_11x17in" it should give "Ledger" as the output and so on.
System Information:
- OS and its version: Ubuntu 23.10
- CUPS version 2.4.6
“Behaves correctly”
We provide a limited number of localized names for common media sizes since some sizes have multiple names not tied to a particular language or region (like “ledger” which is also “tabloid” and “b”) and others are so esoteric as to be meaningless (most photo sizes). Thus, the localized size name will be a dimensional name in many cases using the language/region’s appropriate units and separators.