forked from openlp/openlp
Bug 687638: use locale aware comparison for song list.
This commit is contained in:
parent
0836306f1b
commit
7b608a948a
@ -27,7 +27,6 @@
|
||||
###############################################################################
|
||||
|
||||
import logging
|
||||
import locale
|
||||
import re
|
||||
import os
|
||||
import shutil
|
||||
@ -40,7 +39,7 @@ from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
|
||||
check_directory_exists
|
||||
from openlp.core.lib.ui import UiStrings, create_widget_action
|
||||
from openlp.core.lib.settings import Settings
|
||||
from openlp.core.utils import AppLocation
|
||||
from openlp.core.utils import AppLocation, locale_compare
|
||||
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \
|
||||
SongImportForm, SongExportForm
|
||||
from openlp.plugins.songs.lib import OpenLyrics, SongXML, VerseType, \
|
||||
@ -263,7 +262,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
# Sort the songs by its title considering language specific characters.
|
||||
# lower() is needed for windows!
|
||||
searchresults.sort(
|
||||
cmp=locale.strcoll, key=lambda song: song.title.lower())
|
||||
cmp=locale_compare, key=lambda song: song.title)
|
||||
for song in searchresults:
|
||||
# Do not display temporary songs
|
||||
if song.temporary:
|
||||
|
Loading…
Reference in New Issue
Block a user