From 0f3d86f0d1d158ee8d03e0c4564bd0b8c1704c94 Mon Sep 17 00:00:00 2001 From: Johannes Thomas Meyer Date: Sun, 4 Jun 2017 02:53:33 +0200 Subject: [PATCH] added a placeholder to show the topics of a song - and included the empty-description for lists always --- openlp/plugins/songs/lib/mediaitem.py | 3 ++- openlp/plugins/songs/lib/songstab.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 34493dbe2..d6345a04e 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -681,7 +681,8 @@ class SongMediaItem(MediaManagerItem): 'copyright': song.copyright, 'songbook_entries': make_list(songbooks), 'ccli_license': Settings().value('core/ccli number'), - 'ccli_license_label': translate('SongsPlugin.MediaItem', 'CCLI License') + 'ccli_license_label': translate('SongsPlugin.MediaItem', 'CCLI License'), + 'topics': make_list([topic.name for topic in song.topics]) }) return authors_all diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index ce07eb618..b7ae4799e 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -138,19 +138,20 @@ class SongsTab(SettingsTab): ['title', translate('SongsPlugin.SongsTab', 'Song Title'), False, False], ['alternate_title', translate('SongsPlugin.SongsTab', 'Alternate Title'), False, False], ['written_by', const.format(translate('SongsPlugin.SongsTab', 'Written By')), True, False], - ['authors_none', translate('SongsPlugin.SongsTab', 'Authors when type is not set'), True, True], + ['authors_none', translate('SongsPlugin.SongsTab', 'Authors when type is not set'), False, True], ['authors_words_label', const.format(AuthorType.Types[AuthorType.Words]), False, False], - ['authors_words', translate('SongsPlugin.SongsTab', 'Authors (Type Words)'), True, True], + ['authors_words', translate('SongsPlugin.SongsTab', 'Authors (Type Words)'), False, True], ['authors_music_label', const.format(AuthorType.Types[AuthorType.Music]), False, False], - ['authors_music', translate('SongsPlugin.SongsTab', 'Authors (Type Music)'), True, True], + ['authors_music', translate('SongsPlugin.SongsTab', 'Authors (Type Music)'), False, True], ['authors_words_music_label', const.format(AuthorType.Types[AuthorType.WordsAndMusic]), False, False], - ['authors_words_music', translate('SongsPlugin.SongsTab', 'Authors (Type Words and Music)'), True, True], + ['authors_words_music', translate('SongsPlugin.SongsTab', 'Authors (Type Words and Music)'), False, True], ['authors_translation_label', const.format(AuthorType.Types[AuthorType.Translation]), False, False], - ['authors_translation', translate('SongsPlugin.SongsTab', 'Authors (Type Translation)'), True, True], + ['authors_translation', translate('SongsPlugin.SongsTab', 'Authors (Type Translation)'), False, True], ['copyright', translate('SongsPlugin.SongsTab', 'Copyright information'), True, False], - ['songbook_entries', translate('SongsPlugin.SongsTab', 'Songbook Entries'), True, True], + ['songbook_entries', translate('SongsPlugin.SongsTab', 'Songbook Entries'), False, True], ['ccli_license', translate('SongsPlugin.SongsTab', 'CCLI License'), True, False], ['ccli_license_label', const.format(translate('SongsPlugin.SongsTab', 'CCLI License')), False, False], + ['topics', translate('SongsPlugin.SongsTab', 'Topics'), False, True], ] placeholder_info = '\n\n'\ @@ -164,7 +165,7 @@ class SongsTab(SettingsTab): placeholder_info += '\n
¹ {}'.format(translate('SongsPlugin.SongsTab', 'can be empty')) placeholder_info += '\n
² {}:
{{#first}} True {}
{{entry}} {}
' \ '{{#last}} True {}
'\ - .format(translate('SongsPlugin.SongsTab', 'list of entries'), + .format(translate('SongsPlugin.SongsTab', 'list of entries, can be empty'), translate('SongsPlugin.SongsTab', 'for first element of list'), translate('SongsPlugin.SongsTab', 'iterates over all entries'), translate('SongsPlugin.SongsTab', 'for last element'))
{ph}{desc}