diff --git a/src/templates/cluster.html b/src/templates/cluster.html index 2d365d8..779bf4a 100644 --- a/src/templates/cluster.html +++ b/src/templates/cluster.html @@ -24,7 +24,7 @@ {%- elif this.group_key == 'time' -%} {{ attrib | durationCluster(this.xdata, this.alt) }} {%- elif this.group_key == 'difficulty' -%} - {{ localize(this.alt, 'difficulty', attrib) }} + {{ bag('i18n+' + this.alt, 'difficulty', attrib) }} {%- else -%} {{ attrib }} {%- endif -%} diff --git a/src/templates/layout.html b/src/templates/layout.html index 7dcc627..73e8280 100644 --- a/src/templates/layout.html +++ b/src/templates/layout.html @@ -15,10 +15,15 @@ recipe lekture @@ -38,7 +43,9 @@
| Build with Lektor, template by relikd. | {#--#}
- {{ this.rating|rating }}
- {%- if this.difficulty %}
- {{ localize(this.alt, 'difficulty', this.difficulty) }}
- {%- else %}
- {{ localize(this.alt, 'difficulty._unset') }}
- {%- endif %}
+ {{
+ bag('i18n+' + this.alt, 'difficulty', this.difficulty or '_unset') }}
- {{ localize(this.alt, 'duration.label') }}: {{ this.time|duration(this.alt) if this.time else 'β' }}
- {{ localize(this.alt, 'yield.label') }}: {{ this.yield or 'β' }}
+ {{ bag('i18n+' + this.alt, 'duration.label') }}: {{ this.time|duration(this.alt) if this.time else 'β' }}
+ {{ bag('i18n+' + this.alt, 'yield.label') }}: {{ this.yield or 'β' }}
{{ localize(this.alt, 'title.ingredients') }}:+{{ bag('i18n+' + this.alt, 'title.ingredients') }}:
{{ localize(this.alt, 'title.directions') }}:- {% if site.get('settings', alt=this.alt)['replace_temp'] -%} +{{ bag('i18n+' + this.alt, 'title.directions') }}:+ {% if site.get('/settings', alt=this.alt)['replace_temp'] -%} {{ this.directions.html|replace('Β°C', 'β')|replace('Β°F', 'β') }} {% else -%} {{ this.directions }} diff --git a/src/templates/recipes.html b/src/templates/recipes.html index dc1b11c..01931c6 100644 --- a/src/templates/recipes.html +++ b/src/templates/recipes.html @@ -1,9 +1,13 @@ {% extends "layout.html" %} {% from "macros/recipes.html" import render_recipe_list %} {% from "macros/pagination.html" import render_pagination_all %} -{% block title %}{{ localize(this.alt, 'title.recipes') }}{% endblock %} +{% block title %}{{ bag('i18n+' + this.alt, 'title.recipes') }}{% endblock %} {% block body %} -{{ localize(this.alt, 'title.recipes') }}
+ {{
+ bag('i18n+' + this.alt, 'title.recipes')
+ }}
{{ render_recipe_list(this.pagination.items) }}
{{ render_pagination_all(this.pagination) }}
{% endblock %}
\ No newline at end of file
diff --git a/src/templates/root.html b/src/templates/root.html
index ca6a956..fe08a2c 100644
--- a/src/templates/root.html
+++ b/src/templates/root.html
@@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% from "macros/recipes.html" import render_recipe_list %}
{% block body %}
- {{ localize(this.alt, 'title.latest') }}+{{ bag('i18n+' + this.alt, 'title.latest') }}
{{ render_recipe_list(site.query('recipes', this.alt).order_by('-date', 'name'), limit=6) }}
|