Re: Whining about gettext limitation



>  The problem I refere to is that original English text is used as a
>  message ID. English has rather trivial grammar and, as a result, the
>  same word can be used in greater variety of circumstances then in
>  other languages. E.g. English adjectives does not change with gender
>  and are the same when used with plural and singular nouns.
>  
>  Just one example: "General" and "Advanced" labels can be used in
>  "Settings" and in "Setup" dialogs. While in English both Settings and
>  Setup can be General or Advanced in other languages different grammer
>  forms should be used. That particular problem has a simple solution --
>  translate Settings, Setup, Preferenses and Options as one term. But 
>  there are more complex cases.
>  
>  Does anyone knows a general solution, short of altering gettext design? 

It is not a gettext limitation.  If an application does not translate
correctly because of that, it has to be fixed.  It is similar to the
plurals case; you should be doing

	if (n > 1)
		sprintf (buf, _("You have %d thing"), n);
	else
		sprintf (buf, _("You have %d things"), n);

instead of

	sprintf (buf, _("You have %d thing%s"), n, (n > 1) ? _("s") : "");

since the latter is not correct.

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]