import gettext
import locale

import stillCenter.constants as constants


def setup_gettext():
    locale.bindtextdomain(constants.GETTEXT_DOMAIN, constants.LOCALE_DIR)
    locale.textdomain(constants.GETTEXT_DOMAIN)
    gettext.bindtextdomain(constants.GETTEXT_DOMAIN, constants.LOCALE_DIR)
    gettext.textdomain(constants.GETTEXT_DOMAIN)


def _(message: str) -> str:
    return gettext.gettext(message)
