[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH ocitysmap] pure cosmetics
From: |
David Decotigny |
Subject: |
[Maposmatic-dev] [PATCH ocitysmap] pure cosmetics |
Date: |
Mon, 4 Jan 2010 10:36:11 +0100 |
---
INSTALL | 2 +-
ocitysmap/i18n.py | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/INSTALL b/INSTALL
index 545b047..5bed944 100644
--- a/INSTALL
+++ b/INSTALL
@@ -197,7 +197,7 @@ are using (here respectively Lenny and Intrepid or Jaunty).
python ./generate_xml.py --dbname maposmatic --host 'localhost' \
--user maposmatic --port 5432 \
- --password 'ereiamjh' \
+ --password 'ereiamjh'
11. Installation of OCitySMap
diff --git a/ocitysmap/i18n.py b/ocitysmap/i18n.py
index e830bb1..614097e 100644
--- a/ocitysmap/i18n.py
+++ b/ocitysmap/i18n.py
@@ -206,8 +206,10 @@ language_class_map = {
'it_CH.UTF-8': i18n_it_generic,
}
-def install_translation(language, locale_path):
+def install_translation(locale_name, locale_path):
"""Return a new i18n class instance, depending on the specified
- language name"""
- language_class = language_class_map.get(language, i18n_generic)
- return language_class(language, locale_path)
+ locale name (eg. "fr_FR.UTF-8"). See output of "locale -a" for a
+ list of system-supported locale names. When none matching, default
+ class is i18n_generic"""
+ language_class = language_class_map.get(locale_name, i18n_generic)
+ return language_class(locale_name, locale_path)
--
1.6.3.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Maposmatic-dev] [PATCH ocitysmap] pure cosmetics,
David Decotigny <=