# 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 json
import sys
import requests
import stampy.plugin.config
import stampy.stampy
from stampy.i18n import _
from stampy.i18n import _L

    logger = logging.getLogger(__name__)
    c = IEXAPI()

    msgdetail = stampy.stampy.getmsgdetail(message)

    texto = msgdetail["text"]
    chat_id = msgdetail["chat_id"]
    message_id = msgdetail["message_id"]
    who_un = msgdetail["who_un"]

    logger.debug(msg=_L("Command: %s by %s" % (texto, who_un)))

    # We might be have been given no command, just stock
    try:
        command = texto.split(' ')[1]
    except:
        command = False

    if not command:
        stock = stampy.plugin.config.gconfig(key="stock", default="RHT", gid=chat_id).split(" ")
    else:
        stock = texto.split(" ")[1::]

    text = "```\n"
    currency = stampy.plugin.config.gconfig(key="currency", default="EUR", gid=chat_id)
    if currency != 'USD':
        rate = get_currency_rate('USD', currency)
    else:
        rate = 1

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


    logger = logging.getLogger(__name__)
    c = IEXAPI()

    msgdetail = stampy.stampy.getmsgdetail(message)

    texto = msgdetail["text"]
    chat_id = msgdetail["chat_id"]
    message_id = msgdetail["message_id"]
    who_un = msgdetail["who_un"]

    logger.debug(msg=_L("Command: %s by %s" % (texto, who_un)))

    # We might be have been given no command, just stock
    try:
        command = texto.split(' ')[1]
    except:
        command = False

    if not command:
        stock = stampy.plugin.config.gconfig(key="stock", default="RHT", gid=chat_id).split(" ")
    else:
        stock = texto.split(" ")[1::]

    text = "```\n"
    currency = stampy.plugin.config.gconfig(key="currency", default="EUR", gid=chat_id)
    if currency != 'USD':
        rate = get_currency_rate('USD', currency)
    else:
        rate = 1

    text += _("USD/%s rate " % currency + str(rate) + "\n")