[cups.development] [RFE] STR #2290: Options and Choices text[PPD_MAX_TEXT] does not return the correct localized string when using Globalized PPD

Diana Chriscille Alumbro - Alvarado dalumbro at lexmark.com
Thu Mar 15 05:12:30 PDT 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Options and Choices text[PPD_MAX_TEXT] does not return the correct
localized string when using Globalized PPD. It always returns the English
string.

In getting for the translation strings of controls in our PDEs, we get the
PPD cached by the OS when printer queue was created using cupsGetPPD() and
traverses through the PPD (to the Options and Choices) based on the ppd.h
structures. In Tiger, specific localized PPD was cached. So when it
traverses to the Option or Choice and gets the translated string in
text[PPD_MAX_TEXT], the translated string is the correct one.

------------------------------------------------------
Snippet of the Specific Locale cached PPD:
  ...
  *OpenUI *PageSize/Mediestørrelse: PickOne 
  *DefaultPageSize:       Letter
  ...
------------------------------------------------------


However when using Globalized PPD (which is a requirement in Leopard),
text[PPD_MAX_TEXT] always picks up the English string.

Current structure of ppd_option and ppd_choice (from Mac OS 10.5 sdk) have
no way to specify what locale will be picked up for translation strings in
Globalized PPDs. The text[PPD_MAX_TEXT] picked up is always that of
English. This was tested in Leopard 9A377a.


Here's a snippet of ppd.h:
  struct ppd_option_s				/**** Options ****/
  {
    char		conflicted;			/* 0 if no conflicts exist, 1 otherwise */
    char		keyword[PPD_MAX_NAME];	/* Option keyword name ("PageSize", etc.)
*/
    char		defchoice[PPD_MAX_NAME];	/* Default option choice */
    char		text[PPD_MAX_TEXT];		/* Human-readable text */
    ppd_ui_t	ui;				/* Type of UI option */
    ppd_section_t	section;				/* Section for command */
    float		order;				/* Order number */
    int		num_choices;			/* Number of option choices */
    ppd_choice_t	*choices;			/* Option choices */
  };	

--------------------------------------------------------------
Snippet of Globalized cached PPD:
  ...
  *OpenUI *PageSize/Media Size: PickOne 
  *DefaultPageSize:       Letter
  *% ---------- Localized PageSize ----------
  *da.Translation PageSize/Mediestørrelse:       ""                      
                
  *de.Translation PageSize/Format des Mediums:    ""
  ...
--------------------------------------------------------------

Link: http://www.cups.org/str.php?L2290
Version:  -feature





More information about the cups-devel mailing list