forked from openlp/openlp
Fix quotes
This commit is contained in:
parent
0130e7fc09
commit
2531e56910
@ -1392,8 +1392,8 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
Clear the preview bar.
|
||||
"""
|
||||
self.preview_widget.clear_list()
|
||||
self.toolbar.set_widget_visible("editSong", False)
|
||||
self.toolbar.set_widget_visible("clear", False)
|
||||
self.toolbar.set_widget_visible('editSong', False)
|
||||
self.toolbar.set_widget_visible('"clear', False)
|
||||
|
||||
def on_preview_add_to_service(self):
|
||||
"""
|
||||
|
@ -578,13 +578,13 @@ class SongMediaItem(MediaManagerItem):
|
||||
service_item.edit_id = item_id
|
||||
verse_list = SongXML().get_verses(song.lyrics)
|
||||
if Settings().value('songs/add songbook slide') and song.songbook_entries:
|
||||
first_slide = "\n"
|
||||
first_slide = '\n'
|
||||
for songbook_entry in song.songbook_entries:
|
||||
first_slide = first_slide + "{book}/{num}/{pub}\n\n".format(book=songbook_entry.songbook.name,
|
||||
first_slide = first_slide + '{book}/{num}/{pub}\n\n'.format(book=songbook_entry.songbook.name,
|
||||
num=songbook_entry.entry,
|
||||
pub=songbook_entry.songbook.publisher)
|
||||
|
||||
service_item.add_from_text(first_slide, "O1")
|
||||
service_item.add_from_text(first_slide, 'O1')
|
||||
# no verse list or only 1 space (in error)
|
||||
verse_tags_translated = False
|
||||
if VerseType.from_translated_string(str(verse_list[0][0]['type'])) is not None:
|
||||
@ -631,7 +631,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
if song.media_files:
|
||||
service_item.add_capability(ItemCapabilities.HasBackgroundAudio)
|
||||
service_item.background_audio = [m.file_path for m in song.media_files]
|
||||
item.metadata.append("<em>{label}:</em> {media}".
|
||||
item.metadata.append('<em>{label}:</em> {media}'.
|
||||
format(label=translate('SongsPlugin.MediaItem', 'Media'),
|
||||
media=service_item.background_audio))
|
||||
return True
|
||||
@ -697,22 +697,22 @@ class SongMediaItem(MediaManagerItem):
|
||||
if Settings().value('core/ccli number'):
|
||||
item.raw_footer.append(translate('SongsPlugin.MediaItem',
|
||||
'CCLI License: ') + Settings().value('core/ccli number'))
|
||||
item.metadata.append("<em>{label}:</em> {title}".format(label=translate('SongsPlugin.MediaItem', 'Title'),
|
||||
item.metadata.append('<em>{label}:</em> {title}'.format(label=translate('SongsPlugin.MediaItem', 'Title'),
|
||||
title=song.title))
|
||||
if song.alternate_title:
|
||||
item.metadata.append("<em>{label}:</em> {title}".
|
||||
item.metadata.append('<em>{label}:</em> {title}'.
|
||||
format(label=translate('SongsPlugin.MediaItem', 'Alt Title'),
|
||||
title=song.alternate_title))
|
||||
if song.songbook_entries:
|
||||
for songbook_entry in song.songbook_entries:
|
||||
item.metadata.append("<em>{label}:</em> {book}/{num}/{pub}".
|
||||
item.metadata.append('<em>{label}:</em> {book}/{num}/{pub}'.
|
||||
format(label=translate('SongsPlugin.MediaItem', 'Songbook'),
|
||||
book=songbook_entry.songbook.name,
|
||||
num=songbook_entry.entry,
|
||||
pub=songbook_entry.songbook.publisher))
|
||||
if song.topics:
|
||||
for topics in song.topics:
|
||||
item.metadata.append("<em>{label}:</em> {topic}".
|
||||
item.metadata.append('<em>{label}:</em> {topic}'.
|
||||
format(label=translate('SongsPlugin.MediaItem', 'Topic'), topic=topics.name))
|
||||
return authors_all
|
||||
|
||||
|
@ -60,7 +60,7 @@ class TestController(TestCase):
|
||||
# GIVEN: A mocked service with a dummy service item
|
||||
self.mocked_live_controller.service_item = MagicMock()
|
||||
# WHEN: I trigger the method
|
||||
controller_direction(None, "live", "next")
|
||||
controller_direction(None, 'live', 'next')
|
||||
# THEN: The correct method is called
|
||||
self.mocked_live_controller.slidecontroller_live_next.emit.assert_called_once_with()
|
||||
|
||||
@ -71,6 +71,6 @@ class TestController(TestCase):
|
||||
# GIVEN: A mocked service with a dummy service item
|
||||
self.mocked_live_controller.service_item = MagicMock()
|
||||
# WHEN: I trigger the method
|
||||
controller_direction(None, "live", "previous")
|
||||
controller_direction(None, 'live', 'previous')
|
||||
# THEN: The correct method is called
|
||||
self.mocked_live_controller.slidecontroller_live_previous.emit.assert_called_once_with()
|
||||
|
@ -431,16 +431,16 @@ class TestMediaItem(TestCase, TestMixin):
|
||||
# GIVEN: A Song and a Service Item
|
||||
song = Song()
|
||||
song.title = 'My Song'
|
||||
song.alternate_title = ""
|
||||
song.alternate_title = ''
|
||||
song.copyright = 'My copyright'
|
||||
song.authors_songs = []
|
||||
song.songbook_entries = []
|
||||
song.ccli_number = ''
|
||||
song.topics = None
|
||||
book1 = MagicMock()
|
||||
book1.name = "My songbook"
|
||||
book1.name = 'My songbook'
|
||||
book2 = MagicMock()
|
||||
book2.name = "Thy songbook"
|
||||
book2.name = 'Thy songbook'
|
||||
song.songbookentries = []
|
||||
song.add_songbook_entry(book1, '12')
|
||||
song.add_songbook_entry(book2, '502A')
|
||||
|
Loading…
Reference in New Issue
Block a user