From 950dc73d2b9a1ab49f1c48fb6a7893715db1b9c8 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 6 Jun 2010 17:25:39 +0100 Subject: [PATCH] try again and fix from last merge --- openlp/plugins/songs/forms/__init__.py | 5 +++-- openlp/plugins/songs/lib/mediaitem.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/songs/forms/__init__.py b/openlp/plugins/songs/forms/__init__.py index 064dbf6c9..45d12fd90 100644 --- a/openlp/plugins/songs/forms/__init__.py +++ b/openlp/plugins/songs/forms/__init__.py @@ -33,11 +33,12 @@ class VerseType(object): Intro = 4 Ending = 5 Other = 6 + verse_string = u'verse' @staticmethod def to_string(verse_type): if verse_type == VerseType.Verse: - return translate('VerseType', 'Verse') + return translate('VerseType', VerseType.verse_string.title()) elif verse_type == VerseType.Chorus: return translate('VerseType', 'Chorus') elif verse_type == VerseType.Bridge: @@ -54,7 +55,7 @@ class VerseType(object): @staticmethod def from_string(verse_type): verse_type = verse_type.lower() - if verse_type == translate('VerseType', 'verse'): + if verse_type == translate('VerseType', VerseType.verse_string): return VerseType.Verse elif verse_type == translate('VerseType', 'chorus'): return VerseType.Chorus diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 4764f4f54..25b8a7d8d 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -198,8 +198,8 @@ class SongMediaItem(MediaManagerItem): self.ListView.clear() for author in searchresults: for song in author.songs: - song_detail = unicode(self.trUtf8('%s (%s)') % \ - (author.display_name, song.title) + song_detail = unicode(self.trUtf8('%s (%s)') % + (author.display_name, song.title)) song_name = QtGui.QListWidgetItem(song_detail) song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id)) self.ListView.addItem(song_name)