view pyntnclick/i18n.py @ 817:beac13c4e982 pyntnclick

Also warn about out-of-date tool translations if running rect-drawer
author Neil Muller <neil@dip.sun.ac.za>
date Sun, 27 Jan 2013 22:20:40 +0200
parents 5ec7905b2365
children
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_i18n_path(module, path='locale'):
    """Get the locale data from within the module."""
    return resource_filename(module, path)