Ticket #3772: spanish_characters_fix.diff

File spanish_characters_fix.diff, 1.9 KB (added by humitos, 12 years ago)

This diff fixes the issue with the Spanish version UnicodeDecodeError

  • lessonscreen.py

    diff --git a/lessonscreen.py b/lessonscreen.py
    index fb38bff..9098dca 100644
    a b class LessonScreen(Gtk.VBox): 
    509509                        shift_finger = FINGERS['RP']
    510510
    511511                    instructions = _('Press and hold the shift key with your %(finger)s, ') % { 'finger': shift_finger }
    512                     instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': letter, 'finger': finger }
     512                    instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': str(letter), 'finger': finger }
    513513       
    514514                elif state == Gdk.ModifierType.MOD5_MASK:
    515515                    instructions = _('Press and hold the altgr key, ')
    516                     instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': letter, 'finger': finger }
     516                    instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': str(letter), 'finger': finger }
    517517       
    518518                elif state == Gdk.ModifierType.SHIFT_MASK | Gdk.ModifierType.MOD5_MASK:
    519519                    instructions = _('Press and hold the altgr and shift keys, ')
    520                     instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': letter, 'finger': finger }
     520                    instructions += _('then press the %(letter)s key with your %(finger)s.') % { 'letter': str(letter), 'finger': finger }
    521521       
    522522                else:
    523                     instructions = _('Press the %(letter)s key with your %(finger)s.') % { 'letter': letter, 'finger': finger }
     523                    instructions = _('Press the %(letter)s key with your %(finger)s.') % { 'letter': str(letter), 'finger': finger }
    524524
    525525                self.lessonbuffer.insert(self.lessonbuffer.get_end_iter(), instructions + '\n\n')
    526526