forked from openlp/openlp
Improve message when an invalid order was entered
It mentions that the delimiter has to be a space. Fixes: https://launchpad.net/bugs/1094809
This commit is contained in:
parent
53d5cda91a
commit
4894ad6dc2
@ -170,14 +170,17 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
invalid_verses.append(order_names[count])
|
invalid_verses.append(order_names[count])
|
||||||
if invalid_verses:
|
if invalid_verses:
|
||||||
valid = create_separated_list(verse_names)
|
valid = create_separated_list(verse_names)
|
||||||
|
invalid = u', '.join(invalid_verses) if len(invalid_verses) > 1 else invalid_verses[0]
|
||||||
if len(invalid_verses) > 1:
|
if len(invalid_verses) > 1:
|
||||||
critical_error_message_box(message=translate('SongsPlugin.EditSongForm',
|
msg = translate('SongsPlugin.EditSongForm', 'There are no verses corresponding to "%(invalid)s".\
|
||||||
'The verse order is invalid. There are no verses corresponding to %s. Valid entries are %s.') %
|
Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') %{'invalid' : u', '.join(invalid_verses),
|
||||||
(u', '.join(invalid_verses), valid))
|
'valid' : valid}
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(message=translate('SongsPlugin.EditSongForm',
|
msg = translate('SongsPlugin.EditSongForm', 'There is no verse corresponding to "%(invalid)s".\
|
||||||
'The verse order is invalid. There is no verse corresponding to %s. Valid entries are %s.') %
|
Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') %{'invalid' : invalid_verses[0],
|
||||||
(invalid_verses[0], valid))
|
'valid' : valid}
|
||||||
|
critical_error_message_box(title=translate('SongsPlugin.EditSongForm', 'Invalid Verse Order'),
|
||||||
|
message=msg)
|
||||||
return len(invalid_verses) == 0
|
return len(invalid_verses) == 0
|
||||||
|
|
||||||
def _validate_song(self):
|
def _validate_song(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user