view pyntnclick/i18n.py @ 803:bcc9277a23e6 pyntnclick

Refactor widget positioning API. Remove unused widgets
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 27 Jan 2013 14:52:16 +0200
parents 5ec7905b2365
children beac13c4e982
line wrap: on
line source

# 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')