From 88fa09755ff31b39b0454f0da58bc41a90263e89 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 10 Feb 2024 06:54:25 +0000 Subject: add initial localisation --- templates/base.html | 2 +- templates/blogpost-panel.html | 5 +++-- templates/contact.html | 21 +++++++++++---------- templates/filtertags.html | 2 +- templates/home.html | 17 ++++++----------- templates/latestposts.html | 7 ++++--- templates/poem-panel.html | 5 +++-- templates/random-poem.html | 5 +++-- 8 files changed, 32 insertions(+), 32 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index c1dbfad..428ce40 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,7 +7,7 @@ - celeste's hard drive + {{ title }} diff --git a/templates/blogpost-panel.html b/templates/blogpost-panel.html index 45117b6..2871407 100644 --- a/templates/blogpost-panel.html +++ b/templates/blogpost-panel.html @@ -1,6 +1,7 @@
-

{{ blogpost.subject().unwrap_or("untitled") }}

-

{{ blogpost.published_at() }} permalink

+

{{ blogpost.subject().unwrap_or(locale.text("untitled").unwrap().as_str()) }}

+

{{ blogpost.published_at() }} {{ + locale.text("permalink").unwrap() }}

{% for tag in blogpost.tags() %}{% let tag = tag.to_string() %}{{ tag }}{% diff --git a/templates/contact.html b/templates/contact.html index 4302e88..d6534fd 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -6,7 +6,7 @@
-

celeste 🌸

+

{{ locale.text("name").unwrap() }}

@@ -15,21 +15,22 @@ {% block content %} diff --git a/templates/filtertags.html b/templates/filtertags.html index 55c802f..4902dd4 100644 --- a/templates/filtertags.html +++ b/templates/filtertags.html @@ -1,5 +1,5 @@
-

filter by tags

+

{{ locale.text("filter-by-tags").unwrap() }}

{% for tag in tags.clone() %}{% let contains_tag = filter_tags.contains(tag) %}
-

celeste 🌸

+

{{ locale.text("name").unwrap() }}

{% if is_live %} @@ -16,7 +16,8 @@ {% endif %} {% if listenbrainz.is_scrobbling %} -
now playing: {{ + {{ locale.text("now-playing").unwrap() + }}: {{ listenbrainz.song.clone().unwrap_or_default() }} - {{ listenbrainz.artist.clone().unwrap_or_default() }} {% endif %} @@ -28,13 +29,7 @@ {% block content %}
-

hallo i am celeste welcome 2 my site 🌟

-

this is where i do the posting

-

i wish u a wonderful day

-
- -

perpetually under construction

- + {{ locale.text("welcome").unwrap()|safe }}
{% endblock content %} @@ -44,10 +39,10 @@
{% include "latestposts.html" %} {% include "random-poem.html" %} -{% endblock aside %} \ No newline at end of file +{% endblock aside %} diff --git a/templates/latestposts.html b/templates/latestposts.html index e2dfa9f..b2ed2c5 100644 --- a/templates/latestposts.html +++ b/templates/latestposts.html @@ -1,10 +1,11 @@
-

latest posts atom newsfeed

+

{{ locale.text("latest-blogposts").unwrap() }} atom newsfeed

{% for blogpost in blogposts %} - diff --git a/templates/poem-panel.html b/templates/poem-panel.html index 3359578..e1fb016 100644 --- a/templates/poem-panel.html +++ b/templates/poem-panel.html @@ -2,9 +2,10 @@ style="top: {{ self::thread_rng().gen_range(-jiggle..=jiggle) }}vw; left: {{ self::thread_rng().gen_range(-4..=4) }}vw" class="panel content poem"> {% if let Some(title) = poem.title %}

{{ title }}

{% endif %} -

{{ poem.created_at.date_naive() }} permalink +

{{ poem.created_at.date_naive() }} {{ + locale.text("permalink").unwrap() }}

{{ poem.content|safe }}
- + \ No newline at end of file diff --git a/templates/random-poem.html b/templates/random-poem.html index bdfbaff..f3531d8 100644 --- a/templates/random-poem.html +++ b/templates/random-poem.html @@ -1,8 +1,9 @@ {% if let Some(poem) = poem %}
{{ blogpost.subject().unwrap_or("untitled") + {{ + blogpost.subject().unwrap_or(locale.text("untitled").unwrap().as_str()) }}