← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/bug1067247 into lp:openlp

 

phill has proposed merging lp:~phill-ridout/openlp/bug1067247 into lp:openlp.

Requested reviews:
  Raoul Snyman (raoul-snyman)
Related bugs:
  Bug #1067247 in OpenLP: "Traceback when importing OpenLyrics file"
  https://bugs.launchpad.net/openlp/+bug/1067247

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug1067247/+merge/130426

Fixed bug1067247
In the process uncovered a bug with transliteration, so fixed that also.
Correct a couple mistakes
-- 
https://code.launchpad.net/~phill-ridout/openlp/bug1067247/+merge/130426
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2012-09-25 20:15:56 +0000
+++ openlp/plugins/songs/lib/xml.py	2012-10-18 20:26:25 +0000
@@ -763,18 +763,19 @@
             if not verse_number:
                 verse_number = u'1'
             lang = verse.get(u'lang')
+            translit = verse.get(u'translit')
             # In OpenLP 1.9.6 we used v1a, v1b ... to represent visual slide
             # breaks. In OpenLyrics 0.7 an attribute has been added.
             if song_xml.get(u'modifiedIn') in (u'1.9.6', u'OpenLP 1.9.6') and \
                 song_xml.get(u'version') == u'0.7' and \
-                (verse_tag, verse_number, lang) in verses:
-                verses[(verse_tag, verse_number, lang, None)] += u'\n[---]\n' + text
+                (verse_tag, verse_number, lang, translit) in verses:
+                verses[(verse_tag, verse_number, lang, translit, None)] += u'\n[---]\n' + text
             # Merge v1a, v1b, .... to v1.
-            elif (verse_tag, verse_number, lang, verse_part) in verses:
-                verses[(verse_tag, verse_number, lang)] += u'\n' + text
+            elif (verse_tag, verse_number, lang, translit, verse_part) in verses:
+                verses[(verse_tag, verse_number, lang, translit, verse_part)] += u'\n' + text
             else:
-                verses[(verse_tag, verse_number, lang, verse_part)] = text
-                verse_def_list.append((verse_tag, verse_number, lang, verse_part))
+                verses[(verse_tag, verse_number, lang, translit, verse_part)] = text
+                verse_def_list.append((verse_tag, verse_number, lang, translit, verse_part))
         # We have to use a list to keep the order, as dicts are not sorted.
         for verse in verse_def_list:
             sxml.add_verse_to_lyrics(


Follow ups