[Bugs] #650 UNSP: Screenshots to use name of current activity as part of its default title

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Tue May 26 19:02:37 EDT 2009


#650: Screenshots to use name of current activity as part of its default title
------------------------------------------+---------------------------------
    Reporter:  garycmartin                |          Owner:  jzGreen    
        Type:  enhancement                |         Status:  accepted   
    Priority:  Unspecified by Maintainer  |      Milestone:  0.86       
   Component:  sugar                      |        Version:  0.84.x     
    Severity:  Minor                      |     Resolution:             
    Keywords:  sugar-love, r?             |   Distribution:  Unspecified
Status_field:  New                        |  
------------------------------------------+---------------------------------

Comment(by bernie):

 +                title = _('Screenshot of %s' % title)

 This should be

                 title = _('Screenshot of %s') % title

 That is, the _(str) should only surround text meant to be translated.

 Also, the dictionary cases initialized with lambdas seems like an overly
 complicated way of handling just 3 strings plus one exception.  The whole
 thing could be compressed, for example, to:

 {{{
   if zoom_level == shell_model.ZOOM_MESH:       title = _('Mesh')
   elif zoom_level == shell_model.ZOOM_GROUP:    title = _('Group')
   elif zoom_level == shell_model.ZOOM_HOME:     title = _('Home')
   elif zoom_level == shell_model.ZOOM_ACTIVITY: title =
 activity.get_title()
   else: title = _('Limbo')
 }}}


 Note, I'm not really qualified to review this code, so don't take my
 comments as authoritative.

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/650#comment:6>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list