diff --git a/openlp/plugins/songs/forms/__init__.py b/openlp/plugins/songs/forms/__init__.py index 41d91582b..064dbf6c9 100644 --- a/openlp/plugins/songs/forms/__init__.py +++ b/openlp/plugins/songs/forms/__init__.py @@ -43,13 +43,13 @@ class VerseType(object): elif verse_type == VerseType.Bridge: return translate('VerseType', 'Bridge') elif verse_type == VerseType.PreChorus: - return u'Pre-Chorus' + return translate('VerseType', 'Pre-Chorus') elif verse_type == VerseType.Intro: - return u'Intro' + return translate('VerseType', 'Intro') elif verse_type == VerseType.Ending: - return u'Ending' + return translate('VerseType', 'Ending') elif verse_type == VerseType.Other: - return u'Other' + return translate('VerseType', 'Other') @staticmethod def from_string(verse_type): @@ -60,13 +60,13 @@ class VerseType(object): return VerseType.Chorus elif verse_type == translate('VerseType', 'bridge'): return VerseType.Bridge - elif verse_type == u'pre-chorus': + elif verse_type == translate('VerseType', 'pre-chorus'): return VerseType.PreChorus - elif verse_type == u'intro': + elif verse_type == translate('VerseType', 'intro'): return VerseType.Intro - elif verse_type == u'ending': + elif verse_type == translate('VerseType', 'ending'): return VerseType.Ending - elif verse_type == u'other': + elif verse_type == translate('VerseType', 'other'): return VerseType.Other from authorsform import AuthorsForm diff --git a/openlp/plugins/songs/forms/editversedialog.py b/openlp/plugins/songs/forms/editversedialog.py index 42f1f1cac..dd62348db 100644 --- a/openlp/plugins/songs/forms/editversedialog.py +++ b/openlp/plugins/songs/forms/editversedialog.py @@ -97,10 +97,9 @@ class Ui_EditVerseDialog(object): self.VerseTypeComboBox.setItemText(0, VerseType.to_string(VerseType.Verse)) self.VerseTypeComboBox.setItemText(1, VerseType.to_string(VerseType.Chorus)) self.VerseTypeComboBox.setItemText(2, VerseType.to_string(VerseType.Bridge)) - self.VerseTypeComboBox.setItemText(3, translate('EditVerseForm', 'Pre-Chorus')) - self.VerseTypeComboBox.setItemText(4, translate('EditVerseForm', 'Intro')) - self.VerseTypeComboBox.setItemText(5, translate('EditVerseForm', 'Ending')) - self.VerseTypeComboBox.setItemText(6, translate('EditVerseForm', 'Other')) + self.VerseTypeComboBox.setItemText(3, VerseType.to_string(VerseType.PreChorus)) + self.VerseTypeComboBox.setItemText(4, VerseType.to_string(VerseType.Intro)) + self.VerseTypeComboBox.setItemText(5, VerseType.to_string(VerseType.Ending)) + self.VerseTypeComboBox.setItemText(6, VerseType.to_string(VerseType.Other)) self.InsertButton.setText(translate('EditVerseForm', 'Insert')) - diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 4e57c2497..92122305a 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -75,13 +75,13 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): elif verse_type == VerseType.Bridge: self.insertVerse(VerseType.to_string(VerseType.Bridge)) elif verse_type == VerseType.PreChorus: - self.insertVerse('Pre-Chorus') + self.insertVerse(VerseType.to_string(VerseType.PreChorus)) elif verse_type == VerseType.Intro: - self.insertVerse('Intro') + self.insertVerse(VerseType.to_string(VerseType.Intro)) elif verse_type == VerseType.Ending: - self.insertVerse('Ending') + self.insertVerse(VerseType.to_string(VerseType.Ending)) elif verse_type == VerseType.Other: - self.insertVerse('Other') + self.insertVerse(VerseType.to_string(VerseType.Other)) def onCursorPositionChanged(self): position = self.VerseTextEdit.textCursor().position() @@ -106,7 +106,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): self.VerseTypeComboBox.setCurrentIndex(VerseType.from_string(verse_type)) self.VerseNumberBox.setValue(verse_number) - def setVerse(self, text, single=False, tag=u'Verse:1'): + def setVerse(self, text, single=False, tag=u'%s:1' % VerseType.to_string(VerseType.Verse)): if single: verse_type, verse_number = tag.split(u':') self.VerseTypeComboBox.setCurrentIndex(VerseType.from_string(verse_type)) @@ -114,7 +114,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): self.InsertButton.setVisible(False) else: if not text: - text = u'---[Verse:1]---\n' + text = u'---[%s:1]---\n' % VerseType.to_string(VerseType.Verse) self.VerseTypeComboBox.setCurrentIndex(0) self.VerseNumberBox.setValue(1) self.InsertButton.setVisible(True)