summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-17 11:11:23 -0500
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-17 11:11:23 -0500
commite3b4839c0a0e11f5955d548d630bef0d51846ebd (patch)
tree631b932030ed3b17d3cef93e138455253ca307b6 /pykolab
parent8aea889ec8da68d7caf552732b164a1865142730 (diff)
parentd80a04b456bdfafa64822fe5f310ff0dc332de6e (diff)
downloadpykolab-e3b4839c0a0e11f5955d548d630bef0d51846ebd.tar.gz
Merge branch 'master' of ssh://git.kolabsys.com/git/pykolab
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/translit.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pykolab/translit.py b/pykolab/translit.py
index ac4d2d7..119675f 100644
--- a/pykolab/translit.py
+++ b/pykolab/translit.py
@@ -17,6 +17,11 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+import pykolab
+from pykolab.translate import _
+
+log = pykolab.getLogger('pykolab.translit')
+
locale_translit_map = {
'ru_RU': 'cyrillic'
}
@@ -97,9 +102,11 @@ def transliterate(_input, lang, _output_expected=None):
_output = ''
- for char in _input:
+ for char in _input.decode('utf-8'):
if translit_map[_translit_name].has_key(char):
_output += translit_map[_translit_name][char]
+ elif char in [repr(x) for x in translit_map[_translit_name].keys()]:
+ _output += translit_map[_translit_name][[char in [raw(x) for x in translit_map[_translit_name].keys()]][0]]
else:
_output += char