[Bugs] #3698 Pippy UNSP: Pippy has translation issues

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sat Jun 16 06:14:56 EDT 2012


#3698: Pippy has translation issues
------------------------------------------+---------------------------------
    Reporter:  manuq                      |          Owner:  dirakx     
        Type:  defect                     |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  0.96       
   Component:  Pippy                      |        Version:  Unspecified
    Severity:  Unspecified                |       Keywords:  12.1.0     
Distribution:  Unspecified                |   Status_field:  Unconfirmed
------------------------------------------+---------------------------------

Comment(by sascha_silbe):

 Replying to [comment:14 cjl]:
 > My recommendation for the ultimately necessary long-term re-working of
 the i18n of the toolbar and tooltip strings for Pippy would include
 eliminating the accelerators (keyboard shortcuts) entirely.
 >
 > I also happen to think that the Sugar HIG should specifically recommend
 against using accelerators for two reasons.
 >
 > 1) Accelerators are special characters (usually underscore "_" or
 ampersand "&" prepended to (or embedded in) words that theoretically allow
 the following character to be used as a keyboard shortcut (usually when
 combined with the 'Alt" key).  IMHO, no Sugar activity should have a pull-
 down menu so complex that keyboard shortcuts are needed to make it usable.

 You're mixing up several different terms and concepts here and as a result
 of that arrive at a rather sweeping notion (removing keyboard shortcuts
 altogether, even from the HIG). I hope I don't need to point out that
 forcing the user to use a pointing device rather than offering to access
 the same functionality using the keyboard would result in a rather bad
 user experience for anyone except novices.

  What you actually seem to be concerned about is the use of
 '''[http://developer.gnome.org/gtk/stable/GtkLabel.html#gtk-label-new-
 with-mnemonic mnemonics]''' in labels. I agree that those can be hard to
 translate since you need to consider the entirety of labels visible on
 screen at any given time, rather than being able to translate them
 individually. For any given activity, it may even be impossible to
 translate them in a way that retains all accelerators, as only the
 characters of each label can be used and no two labels that are visible at
 the same time may have the same mnemonic.


 [...]
 > Pippy is a shining example of poor i18n and improper use of the
 accelerator as a keyboard shortcut, in that the accelerator-loaded strings
 are not continuous with a "hint" string describing how to use the
 accelerator.  This violates the i18n principle of making all relevant
 information appear within a single string. Even in *Spanish* (the most
 common second language of Sugar users and developers) the Pippy toolbar
 accelerators have been improperly localized.

 Yes, Pippy is an example of how not to do it. From the source:

 {{{
         gobutton = ToolButton(label=_("_Run!"))
         gobutton.props.accelerator = _('<alt>r')
 }}}

 It's setting '''both''' a
 [http://developer.gnome.org/gtk/stable/GtkLabel.html#gtk-label-new-with-
 mnemonic mnemonic] and an [http://developer.gnome.org/gtk/stable/gtk-
 Keyboard-Accelerators.html#gtk-Keyboard-Accelerators.description
 accelerator]. That's wrong even without considering i18n. On top of that,
 it's translating both values. I'm not sure whether the accelerator should
 be translated at all (do we want different keyboard shortcuts to be used
 in different languages?), but at the very least there's the problem of
 consistency.

 The solution is easy: Drop the mnemonic from the label. The accelerator
 alone achieves the purpose of providing a keyboard shortcut for the Run
 action. When setting the accelerator, Sugar will automatically cause a
 tooltip to be shown that contains the key combination to use; no
 additional hints required.

 In addition the accelerator probably shouldn't be translated. It's the
 actual key combination that the user can use to access the function, not
 the string in the UI informing the user about the key combination. It
 needs to follow a [http://developer.gnome.org/gtk/stable/gtk-Keyboard-
 Accelerators.html#gtk-accelerator-parse specific syntax]; translating it
 naively would break its functionality (and possibly even the entire
 Activity). GTK already takes care of translating the keyboard combination
 when showing it on screen so it matches the labels on the keyboard.

 It would be a good idea to allow individual users to customise the
 keyboard shortcuts, but that's a problem unrelated to translation.
 Language-specific keyboard shortcuts (accelerators) OTOH are likely to
 create much more confusion than they would be worth (by having the
 keyboard shortcut match the names of the actions in some more or less
 obvious way).

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3698#comment:16>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list