diff --git a/templates/event.html b/templates/event.html index 1f8d160..4e71b5e 100644 --- a/templates/event.html +++ b/templates/event.html @@ -1,5 +1,26 @@ {% extends "page.html" %} {% from "macros/breadcrumbs.html" import breadcrumbs %} +{% from "macros/translation.html" import transbag %} + +{% set t_running_sprint = transbag('translate', this.alt, 'running_sprint') %} +{% set t_what_is_a_sprint = transbag('translate', this.alt, 'what_is_a_sprint') %} +{% set t_challenge_coin = transbag('translate', this.alt, 'challenge_coin') %} +{% set t_sprint_description = transbag('translate', this.alt, 'sprint_description') %} +{% set t_sprint_video = transbag('translate', this.alt, 'sprint_pycon_video') %} +{% set t_date = transbag('translate', this.alt, 'date') %} +{% set t_speakers = transbag('translate', this.alt, 'speakers') %} +{% set t_sprinters = transbag('translate', this.alt, 'sprinters') %} +{% set t_and = " " + transbag('translate', this.alt, 'and')|trim + " " %} +{% set t_event_more_info = transbag('translate', this.alt, 'event_more_info') %} +{% set t_website = transbag('translate', this.alt, 'website') %} +{% set t_speaking_before_title = transbag('translate', this.alt, 'speaking_before_title') %} +{% set t_speaking_after_title = transbag('translate', this.alt, 'speaking_after_title')|trim %} +{% set t_keynoting_before_title = transbag('translate', this.alt, 'keynoting_before_title') %} +{% set t_keynoting_after_title = transbag('translate', this.alt, 'keynoting_after_title')|trim %} +{% set t_tutorial_before_title = transbag('translate', this.alt, 'tutorial_before_title') %} +{% set t_tutorial_after_title = transbag('translate', this.alt, 'tutorial_after_title')|trim %} +{% set t_sprint_helping = transbag('translate', this.alt, 'sprint_helping') %} +{% set t_sprint_helping_plural = transbag('translate', this.alt, 'sprint_helping_plural') %} {% block title %}{{ this.title }}{% endblock %} {% block preamble %} @@ -7,36 +28,36 @@

{{ breadcrumbs(this) }}

{{ this.title }}

-

{{ this.date.strftime("%A, %-d %B %Y") }}

+

{{ this.date|datetimeformat("EEEE, MMMM d, YYYY", locale=this.alt)|capitalize }}

{% endblock %} {% block main %} {% if this.event_type == "talk" %} -

{{ this.speaker|join(" and ")}} will be speaking at {{ this.title }}, giving a presentation entitled "{{ this.talk_title }}". +

{{ this.speaker|join(t_and)}} {{ t_speaking_before_title }} {{ this.title }}{{ t_speaking_after_title }} "{{ this.talk_title }}". {% elif this.event_type == "keynote" %} -

{{ this.speaker|join(" and ")}} will be keynoting {{ this.title }}, giving a presentation entitled "{{ this.talk_title }}". +

{{ this.speaker|join(t_and)}} {{ t_keynoting_before_title }} {{ this.title }}{{ t_keynoting_after_title }} "{{ this.talk_title }}". {% elif this.event_type == "tutorial" %} -

{{ this.speaker|join(" and ")}} will be presenting a tutorial at {{ this.title }}, entitled "{{ this.talk_title }}". +

{{ this.speaker|join(t_and)}} {{ t_tutorial_before_title }} {{ this.title }}{{ t_tutorial_after_title }} "{{ this.talk_title }}". {% elif this.event_type == "sprint" %} -

BeeWare will be running a sprint at {{ this.title }}.

-

{{ this.speaker|join(" and ") }} will be at the sprints, and will be more than willing to help First Time Contributors earn their own shiny Challenge Coin. -

For more information, check the {{ this.title }} website

-

What is a Sprint?

-

Code sprints are events held normally after a conference where attendees can use the conference venue to work in small groups on various projects. Learn more about how sprints work with the PyCon US 'What is a sprint?' video

+

{{ t_running_sprint }} {{ this.title }}.

+

{{ this.speaker|join(t_and) }} {% if this.speaker|length > 1 %}{{ t_sprint_helping_plural }}{% else %}{{ t_sprint_helping }}{% endif %} {{ t_challenge_coin }}. +

{{ t_event_more_info }}{{ this.title }} {{ t_website }}

+

{{ t_what_is_a_sprint }}

+

{{ t_sprint_description }} {{ t_sprint_video }}

{% endif %}

{{ this.description }}

{% endblock %} {% block gutter %}
-
Date:
-
{{ this.date.strftime("%-d %B %Y") }}
+
{{ t_date|trim }}:
+
{{ this.date|datetimeformat("MMMM d, YYYY", locale=this.alt)|capitalize }}
{% if this.event_type == "sprint" %} -
Sprinters:
+
{{ t_sprinters|trim }}:
{% elif this.event_type == "talk" %} -
Speakers:
+
{{ t_speakers|trim }}:
{% endif %}
    diff --git a/templates/events.html b/templates/events.html index 8caad3d..9fb7b50 100644 --- a/templates/events.html +++ b/templates/events.html @@ -31,11 +31,11 @@ {% block main %}

    {{ t_upcoming_events }}

    {% for child in this.children.filter(F.upcoming == True) %} -

    {{ child.date.strftime("%-d %B %Y") }} {{ child.title }} {{ child.event_type}}

    +

    {{ child.date|datetimeformat("MMMM d, YYYY", locale=this.alt)|capitalize }} {{ child.title }} {{ child.event_type}}

    {% endfor %}

    {{ t_past_events }}

    {% for child in this.children.filter(F.upcoming == False).order_by('-date') %} -

    {{ child.date.strftime("%-d %B %Y") }} {{ child.title }} {{child.event_type}}

    +

    {{ child.date|datetimeformat("MMMM d, YYYY", locale=this.alt)|capitalize }} {{ child.title }} {{child.event_type}}

    {% endfor %} {% endblock %} {% block gutter %} diff --git a/templates/home.html b/templates/home.html index fcabc24..dace5d2 100644 --- a/templates/home.html +++ b/templates/home.html @@ -12,6 +12,7 @@ {% set t_tutorial = transbag('translate', this.alt, 'tutorial') %} {% set t_come_see_us = transbag('translate', this.alt, 'come_see_us') %} {% set t_sprinting = transbag('translate', this.alt, 'sprinting') %} +{% set t_ad_hoc_sponsor = transbag('translate', this.alt, 'ad_hoc_sponsor') %} {% block title %}{{ this.title }}{% endblock %} {% block preamble %} @@ -64,7 +65,7 @@
diff --git a/templates/layout.html b/templates/layout.html index 630dc93..fd5dc85 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -3,7 +3,7 @@ {% macro menu_item(identifier) %} {% set identifier_url = '/' + identifier %} {% set trans_url = identifier_url|url(alt=this.alt) %} - {% set this_is_child = this.is_child_of(trans_url) %} + {% set this_is_child = this.is_child_of(identifier_url) %} @@ -72,10 +72,12 @@ ga('send', 'pageview');