Andreas Preikschat has proposed merging lp:~googol-hush/openlp/OpenLyrics into lp:openlp.
Requested reviews: OpenLP Core (openlp-core) For more details, see: https://code.launchpad.net/~googol-hush/openlp/OpenLyrics/+merge/53894 Hello fixed adding "Verse" instead of "v" to the database. -- https://code.launchpad.net/~googol-hush/openlp/OpenLyrics/+merge/53894 Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/OpenLyrics into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/xml.py' --- openlp/plugins/songs/lib/xml.py 2011-03-15 18:24:13 +0000 +++ openlp/plugins/songs/lib/xml.py 2011-03-17 20:02:31 +0000 @@ -89,8 +89,8 @@ Add a verse to the ``<lyrics>`` tag. ``type`` - A string denoting the type of verse. Possible values are *Verse*, - *Chorus*, *Bridge*, *Pre-Chorus*, *Intro*, *Ending* and *Other*. + A string denoting the type of verse. Possible values are *v*, + *c*, *b*, *p*, *i*, *e* and *o*. Any other type is **not** allowed, this also includes translated types. @@ -128,8 +128,8 @@ The returned list has the following format:: - [[{'lang': 'en', 'type': 'Verse', 'label': '1'}, u"English verse"], - [{'lang': 'en', 'type': 'Chorus', 'label': '1'}, u"English chorus"]] + [[{'lang': 'en', 'type': 'v', 'label': '1'}, u"English verse"], + [{'lang': 'en', 'type': 'c', 'label': '1'}, u"English chorus"]] """ self.song_xml = None if xml[:5] == u'<?xml': @@ -451,9 +451,7 @@ if text: text += u'\n' text += u'\n'.join([unicode(line) for line in lines.line]) - verse_name = self._get(verse, u'name') - verse_type_index = VerseType.from_tag(verse_name[0]) - verse_type = VerseType.Names[verse_type_index] + verse_name = self._get(verse, u'name').lower() verse_number = re.compile(u'[a-zA-Z]*').sub(u'', verse_name) # OpenLyrics allows e. g. "c", but we need "c1". However, this does # not correct the verse order. @@ -462,7 +460,7 @@ lang = None if self._get(verse, u'lang'): lang = self._get(verse, u'lang') - sxml.add_verse_to_lyrics(verse_type, verse_number, text, lang) + sxml.add_verse_to_lyrics(verse_name[0], verse_number, text, lang) song.lyrics = unicode(sxml.extract_xml(), u'utf-8') # Process verse order if hasattr(properties, u'verseOrder'):
_______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp