# HG changeset patch
# User Yuki KODAMA <[email protected]>
# Date 1243276651 -32400
# Node ID 8fb5e077b93d40608938db3af49e38f6e0e8a470
# Parent  e6bb1df8fa84834e1d81b06a0c5249d701c248b8
i18n: use 'fromutf' instead of it own way

diff --git a/thgutil/i18n.py b/thgutil/i18n.py
--- a/thgutil/i18n.py
+++ b/thgutil/i18n.py
@@ -8,7 +8,7 @@

 import gettext, sys
 from gettext import gettext as _
-import paths
+import paths, hglib

 gettext.bindtextdomain("tortoisehg", paths.get_locale_path())
 gettext.textdomain("tortoisehg")
@@ -22,7 +22,7 @@
     """
     try:
         u = _(message)
-        return u.encode(sys.stdout.encoding, "replace")
+        return hglib.fromutf(u)
     except LookupError:
         return message

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to