forked from openlp/openlp
Improve Author Unknown strings
This commit is contained in:
parent
ffd4d41760
commit
d129085d87
@ -31,6 +31,7 @@ from PyQt4 import QtCore
|
|||||||
from openlp.core.lib import Receiver, translate
|
from openlp.core.lib import Receiver, translate
|
||||||
from openlp.plugins.songs.lib import VerseType
|
from openlp.plugins.songs.lib import VerseType
|
||||||
from openlp.plugins.songs.lib.db import Song, Author, Topic, Book, MediaFile
|
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
|
from openlp.plugins.songs.lib.xml import SongXML
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
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.
|
All fields have been set to this song. Write the song to disk.
|
||||||
"""
|
"""
|
||||||
if not self.authors:
|
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)
|
log.info(u'commiting song %s to database', self.title)
|
||||||
song = Song()
|
song = Song()
|
||||||
song.title = self.title
|
song.title = self.title
|
||||||
|
@ -36,7 +36,8 @@ class SongStrings(object):
|
|||||||
# These strings should need a good reason to be retranslated elsewhere.
|
# These strings should need a good reason to be retranslated elsewhere.
|
||||||
Author = translate('OpenLP.Ui', 'Author', 'Singular')
|
Author = translate('OpenLP.Ui', 'Author', 'Singular')
|
||||||
Authors = translate('OpenLP.Ui', 'Authors', 'Plural')
|
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')
|
SongBook = translate('OpenLP.Ui', 'Song Book', 'Singular')
|
||||||
SongBooks = translate('OpenLP.Ui', 'Song Books', 'Plural')
|
SongBooks = translate('OpenLP.Ui', 'Song Books', 'Plural')
|
||||||
Topic = translate('OpenLP.Ui', 'Topic', 'Singular')
|
Topic = translate('OpenLP.Ui', 'Topic', 'Singular')
|
||||||
|
@ -69,6 +69,7 @@ from lxml import etree, objectify
|
|||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.plugins.songs.lib import VerseType
|
from openlp.plugins.songs.lib import VerseType
|
||||||
from openlp.plugins.songs.lib.db import Author, Book, Song, Topic
|
from openlp.plugins.songs.lib.db import Author, Book, Song, Topic
|
||||||
|
from openlp.plugins.songs.lib.ui import SongStrings
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -377,7 +378,7 @@ class OpenLyrics(object):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
if not authors:
|
if not authors:
|
||||||
authors.append(u'Author Unknown')
|
authors.append(SongStrings.AuthorUnknownUnT)
|
||||||
for display_name in authors:
|
for display_name in authors:
|
||||||
author = self.manager.get_object_filtered(Author,
|
author = self.manager.get_object_filtered(Author,
|
||||||
Author.display_name == display_name)
|
Author.display_name == display_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user