Sort available countries in alphabetical order

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.
stable
David MENTRE 2010-02-09 21:13:06 +01:00 zatwierdzone przez Maxime Petazzoni
rodzic 52c538a5fa
commit 8255775d6b
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -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",