{% endmacro %}
{% macro market_tile(app, link=False, src=None, classes=None, data_attrs=None, tray=True, description=False) %}
{% set tag = 'a' if link and app.slug else 'div' %}
{% set classes = classes or [] %}
<{{ tag }} class="product mkt-tile {{ classes|join(' ') }}"
{% if link %} href="{{ app.url or url('app', [app.slug])|urlparams(src=src) }}"{% endif %}
{{ data_attrs|make_data_attrs }}
data-slug="{{ app.slug }}"
data-id="{{ app.id }}"
{% if link %}itemscope itemtype="http://schema.org/SoftwareApplication"{% endif %}>
{% if not imgAlreadyDeferred(app.icons['64']) %}
{# Defer image loading. #}
{% else %}
{% endif %}
{{ app.name|translate(app) }}
{% if app.author %}
{# TODO: When we get user profiles, update this to be a proper Person itemprop #}
{{ app.author }}
{% endif %}
{% if app.content_ratings.rating %}
{% if app.content_ratings.body != 'generic' %}
{# L10n: the IARC rating body/system followed by a name/description of the rating (e.g. "ESRB: Everyone" or "PEGI: For ages 3+"). #}
{{ _('{rating_body}: {rating}',
rating_body=iarc_names.bodies[app.content_ratings.body],
rating=iarc_names.ratings[app.content_ratings.body][app.content_ratings.rating]) }}
{% else %}
{# Don't show "Generic:" as the body since that doesn't mean much. #}
{{ iarc_names.ratings[app.content_ratings.body][app.content_ratings.rating] }}
{% endif %}
{% endif %}
{{ app.price_locale if app.payment_required else _('Free') }}