{# app/templates/platform/sections/_pricing.html #} {# Pricing section partial with multi-language support #} {# Parameters: - pricing: PricingSection object (or dict) - lang: Current language code - default_lang: Fallback language - tiers: List of subscription tiers from DB (passed via context) #} {% macro render_pricing(pricing, lang, default_lang, tiers) %} {% if pricing and pricing.enabled %}
{# Section header #}
{% set title = pricing.title.translations.get(lang) or pricing.title.translations.get(default_lang) or '' %} {% if title %}

{{ title }}

{% endif %} {% if pricing.subtitle and pricing.subtitle.translations %} {% set subtitle = pricing.subtitle.translations.get(lang) or pricing.subtitle.translations.get(default_lang) %} {% if subtitle %}

{{ subtitle }}

{% endif %} {% endif %}
{# Pricing toggle (monthly/annual) #} {% if pricing.use_subscription_tiers and tiers %}
{# Billing toggle #}
{{ _('pricing.monthly') or 'Monthly' }} {{ _('pricing.annual') or 'Annual' }} {{ _('pricing.save_months') or 'Save 2 months!' }}
{# Pricing cards #}
{% for tier in tiers %} {% endfor %}
{% else %} {# Placeholder when no tiers available #}
{{ _('pricing.coming_soon') or 'Pricing plans coming soon' }}
{% endif %}
{% endif %} {% endmacro %}