Translating labels with inserted widgets

2011-08-22 Thread Felix Riemann
Hi *,

I'm looking for some input regarding bug 654548[1].

The bug's problem is a spinbutton widget that is inserted between two
labels in eog's preferences dialog. This is problematic to translate at
least into Zulu as the label that is after the spinbutton would be
empty. Is this an issue to other languages as well? If yes, how did you
solve/worked around it?

As we currently can't come up with a better solution/string to solve it,
the proposed solution is to assign translation contexts to the labels to
allow setting one of the two label strings empty (avoiding problems if
one subsentence is used elsewhere). Also tranlator comments explaining
the situation to translators can be added.
Would that be a viable translation to you?

Thanks in advance,

Felix

P.S.: Other proposals to solve it are of course welcome too. ;)

[1] https://bugzilla.gnome.org/show_bug.cgi?id=654548

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


Re: Translating labels with inserted widgets

2011-08-22 Thread Andre Klapper
On Mon, 2011-08-22 at 21:10 +0200, Felix Riemann wrote:
 I'm looking for some input regarding bug 654548[1].
 
 The bug's problem is a spinbutton widget that is inserted between two
 labels in eog's preferences dialog. This is problematic to translate at
 least into Zulu as the label that is after the spinbutton would be
 empty. Is this an issue to other languages as well? If yes, how did you
 solve/worked around it?

This reminded me of a blogpost that had been in my Drafts folder for
three years called Reordering Widgets so I'll dump it here:


Some dialogs are based on an English sentence structure, consisting of
several dropdown widgets.
One complex example from GNOME Evolution:
Go to New  Appointment  Recurrence, enable This appointment recurs
and change the day(s) dropdown to month(s). You will get:

Every [1,2,...] [day(s),(week(s),...] on the [first,second,...]
[day,Monday,...] [for,until] [1,2] occurrences.

I am not aware of a way to change the order of the dropdown widgets
depending on the language/locale.

A friend came up with this basic idea of a framework, however I wonder
if anybody knows how other systems handle this problem?

translationCanvas
 blockquote
  element type=StringRecurrence every/element
  element type=input name=number1 2 3 4 .../element
  element type=Selection
   blockquote
element type=String
 blockquote
  dependency on=number
   blockquote
element if=1day/element
element if=1days/element
   /blockquote
  /dependency
 /blockquote
/element
element type=String
 blockquote
  dependency on=number
   blockquote
element if=1month/element
element if=1months/element
   /blockquote
  /dependency
 /blockquote
/element
   /blockquote
  /element
 /blockquote
/translationCanvas

andre
-- 
mailto:ak...@gmx.net | failed
http://blogs.gnome.org/aklapper | http://www.openismus.com

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


Re: Translating labels with inserted widgets

2011-08-22 Thread Chusslove Illich
 [: Andre Klapper :]
 Some dialogs are based on an English sentence structure, consisting of
 several dropdown widgets.
 [...]
 I am not aware of a way to change the order of the dropdown widgets
 depending on the language/locale.

 A friend came up with this basic idea of a framework, however I wonder if
 anybody knows how other systems handle this problem?

No other systems handle this problem.

There are actually two distnict problems, and both were implied in the said
bug report. The first is the problem Priscilla reported, of widget and label
ordering. The second problem is grammar congruence between labels and
widgets, as Friedel noted.

The problem of widget and label ordering could be handled as follows. Each
widgeted sentence can be split into N widgets and N + 1 labels. One or
more labels might be empty in English, but all of them should be exposed for
translation, with proper comments and contexts. Additionally there should be
a meta-message per widget, asking the translator to indicate the widget to
fit at that position. These label and widget selection messages should be
interweaved in proper order. For example, if the widgeted sentence is:

  Repeat each [Monday|Tuesday|...] in [January|February...]

the PO file would contain:

  #. TRANSLATORS: Assembly of widgeted sentence
  #.   Repeat each [weekday] in [month]
  #. This is the label before the first widget.
  msgctxt ws-repeateach-label-1
  msgid Repeat each
  msgstr 

  #. TRANSLATORS: Assembly of widgeted sentence
  #.   Repeat each [weekday] in [month]
  #. This is the first widget, translate as 1 for [weekday] or 2 for [month].
  msgctxt ws-repeateach-widget-1
  msgid 1
  msgstr 

  #. TRANSLATORS: Assembly of widgeted sentence
  #.   Repeat each [weekday] in [month]
  #. This is the label between the first and the second widget.
  msgctxt ws-repeateach-label-2
  msgid in
  msgstr 

  #. TRANSLATORS: Assembly of widgeted sentence
  #.   Repeat each [weekday] in [month]
  #. This is the second widget, translate as 1 for [weekday] or 2 for [month].
  msgctxt ws-repeateach-widget-2
  msgid 2
  msgstr 

  #. TRANSLATORS: Assembly of widgeted sentence
  #.   Repeat each [weekday] in [month]
  #. This is the label after the second widget.
  msgctxt ws-repeateach-label-3
  msgid  
  msgstr 

It would be nicer if widget selection messages would ask for literal
[weekday] and [month] instead of numbers, but then unwary translators
would likely screw it up. In this way, there is little to screw up for the
unwary. The empty label message needs one space, or else it would record as
untranslated in statistics.

The problem of grammar congruence between widgets and labels is the harder
one. In the above example, in my language the first label (Repeat each)
would have to change as the first widget selection ([weekday]) changes,
because the pronoun each has to conform to gender of the week day (some
are masculine, other are feminine). To handle this generally for all
languages, heavy artillery is required. Here comes the shameless plug, for
which I'm writing this reply in the first place:

http://sourceforge.net/mailarchive/message.php?msg_id=27932895

Specifically pertinent to widgeted sentences is the bit about runtime
contexts.

-- 
Chusslove Illich (Часлав Илић)


signature.asc
Description: This is a digitally signed message part.
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n