{{ translations['email']['hello'] }}, {{ person.name }}
{{ translations['email']['thank_you_completing'] }} {{ project.name }}.
{{ translations['email']['results_below'] }}
{% set total_with_temperament = scores.values()|sum %}
{% set total = total_answers if total_answers else total_with_temperament %}
{% set temp_scores_list = [] %}
{% for temp in temps %}
{% set score = scores.get(temp.id, 0) %}
{% set percentage = (score / total_with_temperament * 100)|round(1) if total_with_temperament > 0 else 0 %}
{% set _ = temp_scores_list.append({'temp': temp, 'score': score, 'percentage': percentage}) %}
{% endfor %}
{% set sorted_temps = temp_scores_list|sort(attribute='score', reverse=True) %}
{% set dominant_temp = sorted_temps[0] if sorted_temps else None %}
{{ total }}
{{ translations['email']['responses'] }}
{{ temps|length }}
{{ translations['email']['temperaments'] }}
{% if dominant_temp %}
{{ dominant_temp.percentage|int }}%
{{ translations['email']['dominant'] }}
{% endif %}
{{ translations['email']['temperament_profile'] }}
{% for item in sorted_temps %}
{% set rank = loop.index %}
{{ item.temp.name }}
{% if rank <= 3 %}
{% if rank == 1 %}{{ translations['email']['rank_dominant'] }}
{% elif rank == 2 %}{{ translations['email']['rank_second'] }}
{% elif rank == 3 %}{{ translations['email']['rank_third'] }}
{% endif %}
{% endif %}
{{ item.percentage|int }}%
{{ item.score }} {{ translations['email']['responses'] }}
{{ translations['email']['recommendation_title'] }}
💡 {{ translations['email']['recommendation_title'] }}
{{ recommendation.name }}
{% if recommendation.description %}{{ recommendation.description }}
{% endif %}