# Path: stampy/i18n.py
# def _(string):
#     """
#     Provides translation of string based on current language
#     :param string: String to translate
#     :return: Translated string
#     """
#     language = stampy.language
# 
#     localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale')
#     trad = gettext.translation('stampy', localedir, fallback=True, languages=[language])
#     return trad.ugettext(string)
# 
# Path: stampy/i18n.py
# def _L(string):
#     """
#     Provides translation of string based on current language
#     :param string: String to translate
#     :return: Translated string
#     """
#     loglanguage = stampy.loglanguage
# 
#     localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale')
#     trad = gettext.translation('stampy', localedir, fallback=True, languages=[loglanguage])
#     return trad.ugettext(string)


import logging
import stampy.plugin.config
import stampy.stampy
from stampy.i18n import _
from stampy.i18n import _L
    """
    triggers = ["*"]
    return triggers


def run(message):  # do not edit this line
    """
    Executes plugin
    :param message: message to run against
    :return:
    """

    # Send greetings
    try:
        if 'new_chat_participant' in message['message']:
            welcomeuser(message=message)
    except:
        pass
    return


def help(message):  # do not edit this line
    """
    Returns help for plugin
    :param message: message to process
    :return: help text
    """

    commandtext = ""
    if stampy.stampy.is_owner_or_admin(message):

# Path: stampy/i18n.py
# def _(string):
#     """
#     Provides translation of string based on current language
#     :param string: String to translate
#     :return: Translated string
#     """
#     language = stampy.language
# 
#     localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale')
#     trad = gettext.translation('stampy', localedir, fallback=True, languages=[language])
#     return trad.ugettext(string)
# 
# Path: stampy/i18n.py
# def _L(string):
#     """
#     Provides translation of string based on current language
#     :param string: String to translate
#     :return: Translated string
#     """
#     loglanguage = stampy.loglanguage
# 
#     localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale')
#     trad = gettext.translation('stampy', localedir, fallback=True, languages=[loglanguage])
#     return trad.ugettext(string)


# Path: stampy/plugin/welcome.py
import logging
import stampy.plugin.config
import stampy.stampy
from stampy.i18n import _
from stampy.i18n import _L

    """
    triggers = ["*"]
    return triggers


def run(message):  # do not edit this line
    """
    Executes plugin
    :param message: message to run against
    :return:
    """

    # Send greetings
    try:
        if 'new_chat_participant' in message['message']:
            welcomeuser(message=message)
    except:
        pass
    return


def help(message):  # do not edit this line
    """
    Returns help for plugin
    :param message: message to process
    :return: help text
    """

    commandtext = ""
    if stampy.stampy.is_owner_or_admin(message):

        commandtext = _("As admin or owner define 'welcome' to the greeting text sent to new chat members. You can use $username to put long name in the text\n\n")