Re: Adding context information for tooltips



Le lundi 08 décembre 2008 à 21:29 +0100, Sven Neumann a écrit :
> Hi,
> 
> On Mon, 2008-12-08 at 14:38 -0200, Joao S. O. Bueno wrote:
> 
> > I ḋ like to propose, since thses NC_ calls are being introduced now (at least 
> > in GIMP - I don't know about other gnome-projects) to have teh context string 
> > to distinguish between the Label and the Tooltip strings.
> > 
> > In the example above, instead of having "channels-action" describing 
> > both  "_Add to Selection" and "Add this channel to the current selection",
> > I'd propose describing the lable "_Add to selection" 
> > with "channels-action-label" and the tooltip with "channels-action-tooltip".
> > 
> > In other words source code for that  would change from:
> >   { "channels-selection-add", GIMP_STOCK_SELECTION_ADD,
> >     NC_("channels-action", "_Add to Selection"), NULL,
> >     NC_("channels-action", "Add this channel to the current selection"),
> >     GIMP_CHANNEL_OP_ADD, FALSE,
> >     GIMP_HELP_CHANNEL_SELECTION_ADD },
> > to
> > 
> >   { "channels-selection-add", GIMP_STOCK_SELECTION_ADD,
> >     NC_("channels-action-label", "_Add to Selection"), NULL,
> >     NC_("channels-action-tooltip", "Add this channel to the current 
> > selection"),
> >     GIMP_CHANNEL_OP_ADD, FALSE,
> >     GIMP_HELP_CHANNEL_SELECTION_ADD },
> 
> That would not be sufficient. You would also have to pass both contexts
> to the gimp_action_group_add*() functions and change the code there to
> take the two different contexts into account. I am not sure if that is
> worth the effort.

I think we should not mingle translator comments and context specifier.
The former should be used for adding verbose comments to help
translating a string (e.g. "This is a tooltip"), and the latter should
be used to disambiguate two identical strings where their context differ
(it would be the case here if the tooltip and the label were identical
strings).
If we abuse the context specifier, we'll end up with duplicated strings
when there should not.

Claude



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