From b3d11140c1dd9ff9dc3ec899c2fb9b07bb252d42 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Mon, 4 Jan 2016 21:47:44 +0100 Subject: [PATCH] Correct sorted normalization --- patacrep/content/sorted.py | 5 ++--- test/test_songbook/content.tex.control | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/patacrep/content/sorted.py b/patacrep/content/sorted.py index 9f9fded9..c14cc732 100755 --- a/patacrep/content/sorted.py +++ b/patacrep/content/sorted.py @@ -4,7 +4,6 @@ This plugin provides keyword 'sorted', used to include a sorted list of songs to a songbook. """ -import locale import logging import unidecode @@ -23,9 +22,9 @@ def normalize_string(string): Normalized means: - no surrounding spaces; - lower case; - - passed through locale.strxfrm(). + - passed through unidecode.unidecode(). """ - return locale.strxfrm(unidecode.unidecode(string.lower().strip())) + return unidecode.unidecode(string.lower().strip()) def normalize_field(field): """Return a normalized field, it being a string or a list of strings.""" diff --git a/test/test_songbook/content.tex.control b/test/test_songbook/content.tex.control index 9dfa5b64..02606184 100644 --- a/test/test_songbook/content.tex.control +++ b/test/test_songbook/content.tex.control @@ -91,11 +91,6 @@ guitar, \section{Test of section} \begin{songs}{titleidx,authidx} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./song.tsg - -\import{@TEST_FOLDER@/content_datadir/songs/}{song.tsg} - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% songs/./song.csg @@ -115,6 +110,11 @@ guitar, \endsong +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% songs/./song.tsg + +\import{@TEST_FOLDER@/content_datadir/songs/}{song.tsg} + \end{songs} \songsection{Test of song section}