# 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 time
import dateutil.parser
import feedparser
import stampy.plugin.alias
import stampy.plugin.config
import stampy.plugin.karma
import stampy.plugin.stats
import stampy.stampy
import re
from prettytable import from_db_cursor
from stampy.i18n import _
from stampy.i18n import _L
            chat_id = gid

        try:
            # Parse date or if in error, use past
            datelast = stampy.stampy.utize(dateutil.parser.parse(lastchecked))

        except:
            datelast = stampy.stampy.utize(datetime.datetime(year=1981, month=1, day=24))

        try:
            # Parse date or if in error, use past
            datelastitem = stampy.stampy.utize(dateutil.parser.parse(lastitem))

        except:
            datelastitem = stampy.stampy.utize(datetime.datetime(year=1981, month=1, day=24))

        # Get time since last check on the feed (epoch)
        datelastts = time.mktime(datelast.timetuple())
        timediff = int((dateforts - datelastts) / 60)

        # Check if interval is defined or set default
        interval = int(interval)

        if interval == 0:
            interval = 1440

        # If more time has passed since last check than the interval for
        # checks, run the check

        if timediff < interval:

# 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/feed.py
import datetime
import logging
import time
import dateutil.parser
import feedparser
import stampy.plugin.alias
import stampy.plugin.config
import stampy.plugin.karma
import stampy.plugin.stats
import stampy.stampy
import re
from prettytable import from_db_cursor
from stampy.i18n import _
from stampy.i18n import _L

            chat_id = gid

        try:
            # Parse date or if in error, use past
            datelast = stampy.stampy.utize(dateutil.parser.parse(lastchecked))

        except:
            datelast = stampy.stampy.utize(datetime.datetime(year=1981, month=1, day=24))

        try:
            # Parse date or if in error, use past
            datelastitem = stampy.stampy.utize(dateutil.parser.parse(lastitem))

        except:
            datelastitem = stampy.stampy.utize(datetime.datetime(year=1981, month=1, day=24))

        # Get time since last check on the feed (epoch)
        datelastts = time.mktime(datelast.timetuple())
        timediff = int((dateforts - datelastts) / 60)

        # Check if interval is defined or set default
        interval = int(interval)

        if interval == 0:
            interval = 1440

        # If more time has passed since last check than the interval for
        # checks, run the check

        if timediff < interval:

            logger.debug(msg=_L("Skipping feed %s because last run was %s mins ago (%s required)") % (name, timediff, interval))