added a placeholder to show the alternate title of a song

Fixes: https://launchpad.net/bugs/1694430
This commit is contained in:
Johannes Thomas Meyer 2017-06-04 02:42:41 +02:00 committed by Samuel Mehrbrodt
parent 66c9f8eb82
commit 88642395ee
2 changed files with 3 additions and 0 deletions

View File

@ -667,6 +667,7 @@ class SongMediaItem(MediaManagerItem):
# Keep this in sync with the list in songstab.py # Keep this in sync with the list in songstab.py
item.footer_html = pystache.render(footer_template, { item.footer_html = pystache.render(footer_template, {
'title': song.title, 'title': song.title,
'alternate_title': song.alternate_title,
'authors_none_label': translate('OpenLP.Ui', 'Written by'), 'authors_none_label': translate('OpenLP.Ui', 'Written by'),
'authors_none': make_list(authors_none), 'authors_none': make_list(authors_none),
'authors_words_label': AuthorType.Types[AuthorType.Words], 'authors_words_label': AuthorType.Types[AuthorType.Words],

View File

@ -134,7 +134,9 @@ class SongsTab(SettingsTab):
# Keep this in sync with the list in mediaitem.py # Keep this in sync with the list in mediaitem.py
const = '<code>"{}"</code>' const = '<code>"{}"</code>'
placeholders = [ placeholders = [
# placeholder, description, can be empty, is a list
['title', translate('SongsPlugin.SongsTab', 'Song Title'), False, False], ['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], ['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'), True, True],
['authors_words_label', const.format(AuthorType.Types[AuthorType.Words]), False, False], ['authors_words_label', const.format(AuthorType.Types[AuthorType.Words]), False, False],