# 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 datetime
import logging
import dateutil.parser
import feedparser
import requests
import stampy.plugin.alias
import stampy.plugin.config
import stampy.plugin.karma
import stampy.plugin.stats
import stampy.stampy
from urlparse import urlparse
from lxml import html
from prettytable import from_db_cursor
from stampy.i18n import _
from stampy.i18n import _L
    :return: List of comic triggers
    """

    logger = logging.getLogger(__name__)
    sql = "SELECT distinct name FROM comic;"
    cur = stampy.stampy.dbsql(sql)
    data = cur.fetchall()
    value = []
    for row in data:
        # Fill valid values
        value.append(row[0])

    logger.debug(msg=_L("getcomics: %s") % value)

    return value


def listcomics():
    """
    Lists the comic strips defined
    :return: table with comics stored
    """

    logger = logging.getLogger(__name__)

    sql = "select name,lastchecked, type,url  from comic ORDER BY name ASC;"
    cur = stampy.stampy.dbsql(sql)

    try:
        # Get value from SQL query

# 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/comic.py
import datetime
import logging
import dateutil.parser
import feedparser
import requests
import stampy.plugin.alias
import stampy.plugin.config
import stampy.plugin.karma
import stampy.plugin.stats
import stampy.stampy
from urlparse import urlparse
from lxml import html
from prettytable import from_db_cursor
from stampy.i18n import _
from stampy.i18n import _L

    :return: List of comic triggers
    """

    logger = logging.getLogger(__name__)
    sql = "SELECT distinct name FROM comic;"
    cur = stampy.stampy.dbsql(sql)
    data = cur.fetchall()
    value = []
    for row in data:
        # Fill valid values
        value.append(row[0])

    logger.debug(msg=_L("getcomics: %s") % value)

    return value


def listcomics():
    """
    Lists the comic strips defined
    :return: table with comics stored
    """

    logger = logging.getLogger(__name__)

    sql = "select name,lastchecked, type,url  from comic ORDER BY name ASC;"
    cur = stampy.stampy.dbsql(sql)

    try:
        # Get value from SQL query

        text = _("Defined comic strips:\n")