# 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
#!/usr/bin/env python
# encoding: utf-8
#
# Description: Plugin for processing sudo commands
# Author: Pablo Iranzo Gomez (Pablo.Iranzo@gmail.com)




def init():
    """
    Initializes module
    :return: List of triggers for plugin
    """

    # Cleanup leftovers from failed execution
    stampy.plugin.config.deleteconfig(key='overridegid', gid='0')
    stampy.plugin.config.deleteconfig(key='sudo', gid='0')

    triggers = ["^/sudo"]
    return triggers


def run(message):  # do not edit this line
    """
    Executes plugin
    :param message: message to run against
    :return:
    """
    logger = logging.getLogger(__name__)

# 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/sudo.py
import logging
import stampy.plugin.config
import stampy.stampy
from stampy.i18n import _
from stampy.i18n import _L

#!/usr/bin/env python
# encoding: utf-8
#
# Description: Plugin for processing sudo commands
# Author: Pablo Iranzo Gomez (Pablo.Iranzo@gmail.com)




def init():
    """
    Initializes module
    :return: List of triggers for plugin
    """

    # Cleanup leftovers from failed execution
    stampy.plugin.config.deleteconfig(key='overridegid', gid='0')
    stampy.plugin.config.deleteconfig(key='sudo', gid='0')

    triggers = ["^/sudo"]
    return triggers


def run(message):  # do not edit this line
    """
    Executes plugin
    :param message: message to run against
    :return:
    """
    logger = logging.getLogger(__name__)

    logger.debug(msg=_L("Processing plugin: Code: %s") % __file__)