forked from openlp/openlp
Verse Translations part 1
This commit is contained in:
parent
8da2167ebe
commit
9d4cb86a6e
@ -25,6 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.plugins.songs.lib import TagNames
|
||||
|
||||
class Ui_EditVerseDialog(object):
|
||||
def setupUi(self, EditVerseDialog):
|
||||
@ -92,8 +93,8 @@ class Ui_EditVerseDialog(object):
|
||||
def retranslateUi(self, EditVerseDialog):
|
||||
EditVerseDialog.setWindowTitle(translate('EditVerseForm', 'Edit Verse'))
|
||||
self.VerseTypeLabel.setText(translate('EditVerseForm', 'Verse Type:'))
|
||||
self.VerseTypeComboBox.setItemText(0, translate('EditVerseForm', 'Verse'))
|
||||
self.VerseTypeComboBox.setItemText(1, translate('EditVerseForm', 'Chorus'))
|
||||
self.VerseTypeComboBox.setItemText(0, TagNames.verse)
|
||||
self.VerseTypeComboBox.setItemText(1, TagNames.chorus)
|
||||
self.VerseTypeComboBox.setItemText(2, translate('EditVerseForm', 'Bridge'))
|
||||
self.VerseTypeComboBox.setItemText(3, translate('EditVerseForm', 'Pre-Chorus'))
|
||||
self.VerseTypeComboBox.setItemText(4, translate('EditVerseForm', 'Intro'))
|
||||
|
@ -29,6 +29,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from editversedialog import Ui_EditVerseDialog
|
||||
from openlp.plugins.songs.lib import TagNames
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -44,9 +45,9 @@ class VerseType(object):
|
||||
@staticmethod
|
||||
def to_string(verse_type):
|
||||
if verse_type == VerseType.Verse:
|
||||
return u'Verse'
|
||||
return TagNames.verse
|
||||
elif verse_type == VerseType.Chorus:
|
||||
return u'Chorus'
|
||||
return TagNames.chorus
|
||||
elif verse_type == VerseType.Bridge:
|
||||
return u'Bridge'
|
||||
elif verse_type == VerseType.PreChorus:
|
||||
@ -61,9 +62,9 @@ class VerseType(object):
|
||||
@staticmethod
|
||||
def from_string(verse_type):
|
||||
verse_type = verse_type.lower()
|
||||
if verse_type == u'verse':
|
||||
if verse_type == TagNames.lower_verse:
|
||||
return VerseType.Verse
|
||||
elif verse_type == u'chorus':
|
||||
elif verse_type == TagNames.lower_chorus:
|
||||
return VerseType.Chorus
|
||||
elif verse_type == u'bridge':
|
||||
return VerseType.Bridge
|
||||
|
@ -23,9 +23,22 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class TagNames(object):
|
||||
verse = translate('TagNames','Verse')
|
||||
chorus = translate('TagNames','Chorus')
|
||||
lower_verse = translate('TagNames','verse')
|
||||
lower_chorus = translate('TagNames','chorus')
|
||||
|
||||
|
||||
from manager import SongManager
|
||||
from songstab import SongsTab
|
||||
from mediaitem import SongMediaItem
|
||||
from sofimport import SofImport
|
||||
from oooimport import OooImport
|
||||
from songimport import SongImport
|
||||
from openlp.core.lib import translate
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user