Re: Res: Adding context information for tooltips

2008-12-11 Thread F Wolff
On Ma, 2008-12-08 at 18:42 -0200, Leonardo Ferreira Fontenelle wrote:
 
 Hi, Joao; hi, all!
 
 I agree such metadata (eg this message comes from a checkbox label)
 would be very valuable. Technically I believe it should be part of the
 automatic comments, leaving msgctxt for disambiguation. I'm not
 confident we can expect from developers to systematically add such
 comments (even the Orca develpers don't do this), but maybe Glade or
 any other develpment tool could do it. Does anyone know if, and how,
 coukd we get this kind of information in the translator comments?

It will be very cool if this extra information is given. It can even be
useful as an extra entry in the #: comments.

I agree that msgctxt should only be used for disambiguation context. Not
notes from the programmers to help translators (although the context
will obviously also help :-)

What we might need to do is to adapt intltool to add the extra comment
when creating the POT file from the .glade file.

Friedel

--
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/blurred-vision-beeld

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Adding context information for tooltips

2008-12-08 Thread Joao S. O. Bueno
Hi there,

It is the first time I write to this list. and actually I've never before been  
subscribed to this list, although I've been maintaning GIMP and its 
associated modules to pt_BR for the last few years.

When I opened the po files for updating today, I noticed a large number of new 
fuzzy strings, and soon found out they had only changed because the gettext 
calls in GIMP got updated to the NC_ call which allows the inclusion of a 
context comment for translators.

So, a previously uncommented string like _Add to Selection now shows up on 
the translation GUI tool I use with a comment like channels-action.

That is actually great, and will surely ease the work for translators and make 
translations less prone to context related errors.

However, on the very same call that sets the above string, a tooltip is also 
set. In this case Add this channel to the current selection. However, this 
one is also contexted as channels-action.

Now, a thing that  is always difficult for me as a translator is exactly to 
distinguish which strings are for labels, and which ones are for tooltips - 
that makes a big difference at least for Portguese, but I suppose for a lot 
of languages as well, due to the fact that Labels are usually tranaslated to 
infinitive or imperative form, and tooltips are translated to the third 
person form (as they describe an action). In English, both forms usually are 
written the same way, so looking only at the string is hard to know if a 
Rename file string refers to a label - in which case, I ṕd transalte it 
to Renomear arquivo, or to a tooltip, in which case the pratice, and mos t 
confortable form for users, is to have it as  Renomear arquivo.

I know the example I picked with the GIMP tooltips above is a case in which it 
is easy to distinguish the label and the tooltip, but, that is not always the 
case.

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 },

What do you think of this as  a general policy? At least for .pt_BR it would 
make a lot of sense and help translators all over. 

(If you like the idea, I would make available a script to help the updating of 
these NC_ calls )

Regards,

js
--
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Adding context information for tooltips

2008-12-08 Thread Sven Neumann
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.


Sven


___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Adding context information for tooltips

2008-12-08 Thread Claude Paroz
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

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Res: Adding context information for tooltips

2008-12-08 Thread Leonardo Ferreira Fontenelle
Hi, Joao; hi, all!

I agree such metadata (eg this message comes from a checkbox label) would be 
very valuable. Technically I believe it should be part of the automatic 
comments, leaving msgctxt for disambiguation. I'm not confident we can expect 
from developers to systematically add such comments (even the Orca develpers 
don't do this), but maybe Glade or any other develpment tool could do it. Does 
anyone know if, and how, coukd we get this kind of information in the 
translator comments?

- Mensagem original -
Hi there,

It is the first time I write to this list. and actually I've never before been 
subscribed to this list, although I've been maintaning GIMP and its
associated modules to pt_BR for the last few years.

When I opened the po files for updating today, I noticed a large number of new
fuzzy strings, and soon found out they had only changed because the gettext
calls in GIMP got updated to the NC_ call which allows the inclusion of a
context comment for translators.

So, a previously uncommented string like _Add to Selection now shows up on
the translation GUI tool I use with a comment like channels-action.

That is actually great, and will surely ease the work for translators and make
translations less prone to context related errors.

However, on the very same call that sets the above string, a tooltip is also
set. In this case Add this channel to the current selection. However, this
one is also contexted as channels-action.

Now, a thing that  is always difficult for me as a translator is exactly to
distinguish which strings are for labels, and which ones are for tooltips -
that makes a big difference at least for Portguese, but I suppose for a lot
of languages as well, due to the fact that Labels are usually tranaslated to
infinitive or imperative form, and tooltips are translated to the third
person form (as they describe an action). In English, both forms usually are
written the same way, so looking only at the string is hard to know if a
Rename file string refers to a label - in which case, I ṕd transalte it
to Renomear arquivo, or to a tooltip, in which case the pratice, and mos t
confortable form for users, is to have it as  Renomear arquivo.

I know the example I picked with the GIMP tooltips above is a case in which it
is easy to distinguish the label and the tooltip, but, that is not always the
case.

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 },

What do you think of this as  a general policy? At least for .pt_BR it would
make a lot of sense and help translators all over.

(If you like the idea, I would make available a script to help the updating of
these NC_ calls )

Regards,

    js
    --
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Adding context information for tooltips

2008-12-08 Thread Christian Rose
On 12/8/08, Claude Paroz [EMAIL PROTECTED] 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.
[...]

 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.

Totally agree.
Translator comments are (or should be) there to help translators know
how a string is used.
Message context is there to disambiguate strings that would otherwise
be identical in English writing, but differ in contextual meaning.
Examples:

  NC_(keyboard-key, _Add key)
  NC_(ssh-key, _Add key)

  /* TRANSLATORS: This is shown in the menu. */
  N_(_Help)


Christian
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Res: Adding context information for tooltips

2008-12-08 Thread Leonardo F. Fontenelle
Gnome-i18n moderators, sorry for sending this e-mail from the wrong
address before:

Em Seg, 2008-12-08 às 18:42 -0200, Leonardo Ferreira Fontenelle
escreveu:
 Hi, Joao; hi, all!
 
 I agree such metadata (eg this message comes from a checkbox label)
 would be very valuable. Technically I believe it should be part of the
 automatic comments, leaving msgctxt for disambiguation. I'm not
 confident we can expect from developers to systematically add such
 comments (even the Orca develpers don't do this), but maybe Glade or
 any other develpment tool could do it. Does anyone know if, and how,
 coukd we get this kind of information in the translator comments?

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Adding context information for tooltips

2008-12-08 Thread Joao S. O. Bueno
On Monday 08 December 2008, Christian Rose wrote:
 Totally agree.
 Translator comments are (or should be) there to help translators know
 how a string is used.
 Message context is there to disambiguate strings that would otherwise
 be identical in English writing, but differ in contextual meaning.
 Examples:

   NC_(keyboard-key, _Add key)
   NC_(ssh-key, _Add key)

   /* TRANSLATORS: This is shown in the menu. */
   N_(_Help)

This clarifies a lot, thank you.
Indeed - what I was asking for (distinguishing tooltip strings from label 
strings) would require translation comments to be interleaved inside function 
calls - I don'tṫ  think that is feasible (having coding style in mind) - or 
is it?

js
--

 Christian


___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n