from . import skeleton
from WebStats.plugin import _
content = """
%s
"""
def get(useSkeleton, channels):
output = content
if len(channels) == 0:
output %= _('Stats available for no channels')
elif len(channels) == 1:
output %= _('Stats available for a channel:')
elif len(channels):
output %= _('Stats available for channels:')
output += ''
for channel in channels:
output += '- %s
'%\
(channel[1:].replace('#', ' '), # Strip the leading #
_('View the stats for the %s channel') % channel,
channel)
output += '
'
if useSkeleton:
output = ''.join([skeleton.start, output, skeleton.end])
return output