diff pyntnclick/i18n.py @ 802:5ec7905b2365 pyntnclick

Don't use resource module to find module locale data
author Neil Muller <neil@dip.sun.ac.za>
date Sun, 27 Jan 2013 14:50:33 +0200
parents 43b49f1de828
children beac13c4e982
line wrap: on
line diff
--- a/pyntnclick/i18n.py	Sun Jan 27 14:47:58 2013 +0200
+++ b/pyntnclick/i18n.py	Sun Jan 27 14:50:33 2013 +0200
@@ -1,7 +1,13 @@
 # internationalization
 
 from gettext import gettext
+from pkg_resources import resource_filename
 
 
 def _(s):
     return unicode(gettext(s), "utf-8")
+
+
+def get_module_locale(module):
+    """Get the locale data from within the module."""
+    return resource_filename(module, 'locale')