diff --git a/openlp/plugins/songs/lib/songimport.py b/openlp/plugins/songs/lib/songimport.py index b56b54b58..7f0e622bd 100644 --- a/openlp/plugins/songs/lib/songimport.py +++ b/openlp/plugins/songs/lib/songimport.py @@ -31,6 +31,7 @@ from PyQt4 import QtCore from openlp.core.lib import Receiver, translate from openlp.plugins.songs.lib import VerseType from openlp.plugins.songs.lib.db import Song, Author, Topic, Book, MediaFile +from openlp.plugins.songs.lib.ui import SongStrings from openlp.plugins.songs.lib.xml import SongXML log = logging.getLogger(__name__) @@ -260,7 +261,7 @@ class SongImport(QtCore.QObject): All fields have been set to this song. Write the song to disk. """ if not self.authors: - self.authors.append(u'Author Unknown') + self.authors.append(SongStrings.AuthorUnknownUnT) log.info(u'commiting song %s to database', self.title) song = Song() song.title = self.title diff --git a/openlp/plugins/songs/lib/ui.py b/openlp/plugins/songs/lib/ui.py index d712b9922..3871c80b0 100644 --- a/openlp/plugins/songs/lib/ui.py +++ b/openlp/plugins/songs/lib/ui.py @@ -36,7 +36,8 @@ class SongStrings(object): # These strings should need a good reason to be retranslated elsewhere. Author = translate('OpenLP.Ui', 'Author', 'Singular') Authors = translate('OpenLP.Ui', 'Authors', 'Plural') - AuthorUnknown = translate('OpenLP.Ui', 'Author Unknown') + AuthorUnknown = translate('OpenLP.Ui', 'Author Unknown') # Used in the UI. + AuthorUnknownUnT = u'Author Unknown' # Used to populate the database. SongBook = translate('OpenLP.Ui', 'Song Book', 'Singular') SongBooks = translate('OpenLP.Ui', 'Song Books', 'Plural') Topic = translate('OpenLP.Ui', 'Topic', 'Singular') diff --git a/openlp/plugins/songs/lib/xml.py b/openlp/plugins/songs/lib/xml.py index 73c65f7c8..64fefdad2 100644 --- a/openlp/plugins/songs/lib/xml.py +++ b/openlp/plugins/songs/lib/xml.py @@ -69,6 +69,7 @@ from lxml import etree, objectify from openlp.core.lib import translate from openlp.plugins.songs.lib import VerseType from openlp.plugins.songs.lib.db import Author, Book, Song, Topic +from openlp.plugins.songs.lib.ui import SongStrings log = logging.getLogger(__name__) @@ -377,7 +378,7 @@ class OpenLyrics(object): except AttributeError: pass if not authors: - authors.append(u'Author Unknown') + authors.append(SongStrings.AuthorUnknownUnT) for display_name in authors: author = self.manager.get_object_filtered(Author, Author.display_name == display_name)