Review: Needs Fixing

Try this for a fix and BTW what is going on with invalid.             


             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:
-                msg = translate('SongsPlugin.EditSongForm', 'There are no 
verses corresponding to "%(invalid)s".\
-Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') 
%{'invalid' : u', '.join(invalid_verses),
-                                                                               
 'valid' : valid}
+                msg = translate('SongsPlugin.EditSongForm', 'There are no 
verses corresponding to "%(invalid)s". '
+                    'Valid entries are %(valid)s.\nPlease enter the verses 
seperated by spaces.') \
+                      % {'invalid' : u', '.join(invalid_verses), 'valid': 
valid}
             else:
-                msg = translate('SongsPlugin.EditSongForm', 'There is no verse 
corresponding to "%(invalid)s".\
-Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') 
%{'invalid' : invalid_verses[0],
-                                                                               
 'valid' : valid}
+                msg = translate('SongsPlugin.EditSongForm', 'There is no verse 
corresponding to "%(invalid)s". Valid '
+                    'entries are %(valid)s.\nPlease enter the verses seperated 
by spaces.') \
+                    % {'invalid' : invalid_verses[0], 'valid': valid}
             
critical_error_message_box(title=translate('SongsPlugin.EditSongForm', 'Invalid 
Verse Order'),
                                        message=msg)
         return len(invalid_verses) == 0

-- 
https://code.launchpad.net/~sam92/openlp/bug-1094809/+merge/175894
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to