- remove None in .split() method

- change translatable codepage selection strings
This commit is contained in:
M2j 2010-12-08 09:21:17 +01:00
parent bb571b0df5
commit 62766269f1
3 changed files with 28 additions and 28 deletions

View File

@ -525,7 +525,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
return False
if self.song.verse_order:
order = []
order_names = self.song.verse_order.split(None)
order_names = self.song.verse_order.split()
for item in order_names:
if len(item) == 1:
order.append(item.lower() + u'1')

View File

@ -358,7 +358,7 @@ class SongMediaItem(MediaManagerItem):
verse[1][:30], unicode(verse[1]), verseTag)
else:
#Loop through the verse list and expand the song accordingly.
for order in song.verse_order.upper().split(None):
for order in song.verse_order.upper().split():
if len(order) == 0:
break
for verse in verseList:

View File

@ -201,34 +201,34 @@ class OpenLP1SongImport(SongImport):
guess = u'cp1252'
# Show dialog for encoding selection
encodings = [(u'cp874', translate('SongsPlugin.OpenLP1SongImport',
'CP-874 (Thai)')),
(u'cp932', translate('SongsPlugin.OpenLP1SongImport',
'CP-932 (Japanese)')),
(u'cp936', translate('SongsPlugin.OpenLP1SongImport',
'CP-936 (Simplified Chinese)')),
(u'cp949', translate('SongsPlugin.OpenLP1SongImport',
'CP-949 (Korean)')),
(u'cp950', translate('SongsPlugin.OpenLP1SongImport',
'CP-950 (Traditional Chinese)')),
(u'cp1250', translate('SongsPlugin.OpenLP1SongImport',
'CP-1250 (Central European)')),
(u'cp1251', translate('SongsPlugin.OpenLP1SongImport',
'CP-1251 (Cyrillic)')),
(u'cp1252', translate('SongsPlugin.OpenLP1SongImport',
'CP-1252 (Western European)')),
(u'cp1253', translate('SongsPlugin.OpenLP1SongImport',
'CP-1253 (Greek)')),
(u'cp1254', translate('SongsPlugin.OpenLP1SongImport',
'CP-1254 (Turkish)')),
(u'cp1255', translate('SongsPlugin.OpenLP1SongImport',
'CP-1255 (Hebrew)')),
(u'cp1256', translate('SongsPlugin.OpenLP1SongImport',
'CP-1256 (Arabic)')),
encodings = [(u'cp1256', translate('SongsPlugin.OpenLP1SongImport',
'Arabic (CP-1256)')),
(u'cp1257', translate('SongsPlugin.OpenLP1SongImport',
'CP-1257 (Baltic)')),
'Baltic (CP-1257)')),
(u'cp1250', translate('SongsPlugin.OpenLP1SongImport',
'Central European (CP-1250)')),
(u'cp1251', translate('SongsPlugin.OpenLP1SongImport',
'Cyrillic (CP-1251)')),
(u'cp1253', translate('SongsPlugin.OpenLP1SongImport',
'Greek (CP-1253)')),
(u'cp1255', translate('SongsPlugin.OpenLP1SongImport',
'Hebrew (CP-1255)')),
(u'cp932', translate('SongsPlugin.OpenLP1SongImport',
'Japanese (CP-932)')),
(u'cp949', translate('SongsPlugin.OpenLP1SongImport',
'Korean (CP-949)')),
(u'cp936', translate('SongsPlugin.OpenLP1SongImport',
'Simplified Chinese (CP-936)')),
(u'cp874', translate('SongsPlugin.OpenLP1SongImport',
'Thai (CP-874)')),
(u'cp950', translate('SongsPlugin.OpenLP1SongImport',
'Traditional Chinese (CP-950)')),
(u'cp1254', translate('SongsPlugin.OpenLP1SongImport',
'Turkish (CP-1254)')),
(u'cp1258', translate('SongsPlugin.OpenLP1SongImport',
'CP-1258 (Vietnam)'))]
'Vietnam (CP-1258)')),
(u'cp1252', translate('SongsPlugin.OpenLP1SongImport',
'Western European (CP-1252)'))]
encoding_index = 0
for index in range(len(encodings)):
if guess == encodings[index][0]: