From 8498b3e2ae4380f3fbed7a965570331702c862ee Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 10 Feb 2011 18:11:14 +0100 Subject: [PATCH] --- openlp/plugins/songs/songsplugin.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 37f11582a..2bd636097 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -149,12 +149,14 @@ class SongsPlugin(Plugin): counter += 1 # The song does not have any author, add one. if not song.authors: - name = unicode(translate('SongsPlugin', 'Author unknown')) + name = unicode(translate('SongsPlugin', 'Author unknown', + 'Translation must contain a blank character!')) author = self.manager.get_object_filtered(Author, Author.display_name == name) if author is None: - author = Author.populate(first_name=name.rsplit(u' ', 1)[0], - last_name=name.rsplit(u' ', 1)[1], display_name=name) + author = Author.populate( + first_name=name.split(u' ', 1)[:-1], + last_name=name.split(u' ', 1)[-1], display_name=name) song.authors.append(author) if song.title is None: song.title = u''