# Path: resources/lib/constants.py
# ADDON = xbmcaddon.Addon(id=ADDON_ID)
# 
# PY2 = python_version == 2


import re
import xbmc
from resources.lib.constants import ADDON, PY2
    CONTEXT_ADD_TO_LIBRARY = 30128
    CONTEXT_ADD_TO_LIBRARY_WITH_SUB = 30129
    CONTEXT_REMOVE_FROM_SUB = 30130
    CONTEXT_DEL_PREF_LANG = 30132
    CONTEXT_ADD_PREF_LANG = 30133

    EMPTY_HISTORY_H1 = 30117
    EMPTY_HISTORY_L1 = 30118


    @staticmethod
    def interpolate(id):
        return '${}'.format(id)

    @staticmethod
    def txt(id):
        return get_localized_string(id)


def get_localized_string(string_id):
    if PY2:
        return ADDON.getLocalizedString(string_id).encode('utf-8')
    return ADDON.getLocalizedString(string_id)


def get_language_code():
    return xbmc.getLanguage(xbmc.ISO_639_1)


def translate(text):

# Path: resources/lib/constants.py
# ADDON = xbmcaddon.Addon(id=ADDON_ID)
# 
# PY2 = python_version == 2


# Path: resources/lib/language.py
import re
import xbmc
from resources.lib.constants import ADDON, PY2

    CONTEXT_ADD_TO_LIBRARY = 30128
    CONTEXT_ADD_TO_LIBRARY_WITH_SUB = 30129
    CONTEXT_REMOVE_FROM_SUB = 30130
    CONTEXT_DEL_PREF_LANG = 30132
    CONTEXT_ADD_PREF_LANG = 30133

    EMPTY_HISTORY_H1 = 30117
    EMPTY_HISTORY_L1 = 30118


    @staticmethod
    def interpolate(id):
        return '${}'.format(id)

    @staticmethod
    def txt(id):
        return get_localized_string(id)


def get_localized_string(string_id):
    if PY2:
        return ADDON.getLocalizedString(string_id).encode('utf-8')
    return ADDON.getLocalizedString(string_id)


def get_language_code():
    return xbmc.getLanguage(xbmc.ISO_639_1)


def translate(text):

    if PY2: