When a map is made in bounding box mode, the list of available countries
is quite long and without any specific order. We now sort countries in
alphabetical order.
---
 www/settings.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/www/settings.py b/www/settings.py
index 716f275..292b721 100644
--- a/www/settings.py
+++ b/www/settings.py
@@ -154,9 +154,11 @@ MAP_LANGUAGES = [("fr_BE.UTF-8", u"Royaume de Belgique (FR)"),
                  ("ca_FR.UTF-8", u"França (CA)"),
                  ("pt_BR.UTF-8", u"Brasil (PT)"),
                  ("da_DK.UTF-8", u"Danmark (DA)"),
-                 ("hr_HR.UTF-8", u"Republika Hrvatska"),
-                 # "C" must be the last entry
-                 ("C", _(u"No localization"))]
+                 ("hr_HR.UTF-8", u"Republika Hrvatska")]
+
+MAP_LANGUAGES.sort(lambda x, y: cmp(x[1], y[1]))
+# "C" must be the last entry
+MAP_LANGUAGES.append(("C", _(u"No localization")))
 
 # Logging
 LOG = logging.getLogger(os.environ.get("MAPOSMATIC_LOG_TARGET",

Reply via email to