From 691f0b03406cb7f7e6245b3392719cfe7dbec3b3 Mon Sep 17 00:00:00 2001 From: mst Date: Fri, 28 Feb 2025 07:22:03 +0300 Subject: [PATCH] more babel stuff --- templates/index.html | 6 +-- templates/snippets/admin/emojiRow.html | 4 +- templates/snippets/admin/packRow.html | 4 +- .../snippets/layout/description/normal.html | 2 +- .../layout/description/retrospring.html | 2 +- .../snippets/layout/homepage/normal.html | 8 ++-- .../snippets/layout/homepage/retrospring.html | 6 +-- templates/snippets/layout/question_card.html | 40 +++++++++---------- templates/snippets/q-card-text.html | 4 +- templates/view_question.html | 16 ++++---- 10 files changed, 46 insertions(+), 46 deletions(-) diff --git a/templates/index.html b/templates/index.html index 450050e..f965016 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,5 @@ {% extends 'base.html' %} -{% block title %}Home{% endblock %} +{% block title %}{{ _('Home') }}{% endblock %} {% set homeLink = 'active' %} {% block additionalHeadItems %} @@ -92,14 +92,14 @@ let buttonCharsText = toggleButton.querySelector('.cw-btn-chars'); collapseElement.addEventListener('show.bs.collapse', function () { - buttonText.textContent = 'Hide content'; + buttonText.textContent = "{{ _('Hide content') }}"; buttonCharsText.classList.add('d-none'); cwText.classList.remove('text-center'); cwText.classList.remove('fw-bold'); }); collapseElement.addEventListener('hide.bs.collapse', function () { - buttonText.textContent = 'Show content'; + buttonText.textContent = "{{ _('Show content') }}"; buttonCharsText.classList.remove('d-none'); cwText.classList.add('text-center'); cwText.classList.add('fw-bold'); diff --git a/templates/snippets/admin/emojiRow.html b/templates/snippets/admin/emojiRow.html index 718c5db..1227b4a 100644 --- a/templates/snippets/admin/emojiRow.html +++ b/templates/snippets/admin/emojiRow.html @@ -1,10 +1,10 @@ - {{ emoji.name.capitalize() }} + {{ emoji.name }} {{ emoji.relative_path }}
- +
diff --git a/templates/snippets/admin/packRow.html b/templates/snippets/admin/packRow.html index cdfcc7f..1343181 100644 --- a/templates/snippets/admin/packRow.html +++ b/templates/snippets/admin/packRow.html @@ -1,6 +1,6 @@ - {{ pack.name }} + {{ pack.name }} {% if json_pack %} {{ pack.website }} {{ formatRelativeTime(pack.exportedAt) }} @@ -8,7 +8,7 @@ {{ pack.relative_path }}
- +
diff --git a/templates/snippets/layout/description/normal.html b/templates/snippets/layout/description/normal.html index e182432..2899b22 100644 --- a/templates/snippets/layout/description/normal.html +++ b/templates/snippets/layout/description/normal.html @@ -11,7 +11,7 @@

diff --git a/templates/snippets/layout/description/retrospring.html b/templates/snippets/layout/description/retrospring.html index 3a0b86a..47e7552 100644 --- a/templates/snippets/layout/description/retrospring.html +++ b/templates/snippets/layout/description/retrospring.html @@ -14,7 +14,7 @@

diff --git a/templates/snippets/layout/homepage/normal.html b/templates/snippets/layout/homepage/normal.html index d40c85d..ff7c1ad 100644 --- a/templates/snippets/layout/homepage/normal.html +++ b/templates/snippets/layout/homepage/normal.html @@ -64,22 +64,22 @@ #}
{% else %}
-

New questions cannot be asked right now.

+

{{ _('New questions cannot be asked right now.') }}

{% endif %}
{% if combined %}
{% if cfg.showQuestionCount == true %} -

{{ len(combined) }} question(s)

+

{{ totalQuestionCount }} {{ _('question(s)') }}

{% endif %}
diff --git a/templates/snippets/layout/homepage/retrospring.html b/templates/snippets/layout/homepage/retrospring.html index c0cd9c2..a475c0b 100644 --- a/templates/snippets/layout/homepage/retrospring.html +++ b/templates/snippets/layout/homepage/retrospring.html @@ -64,8 +64,8 @@ #}
@@ -73,7 +73,7 @@
{% else %} -

New questions cannot be asked right now.

+

{{ _('New questions cannot be asked right now.') }}

{% endif %} {% include 'snippets/layout/questions_list.html' %} diff --git a/templates/snippets/layout/question_card.html b/templates/snippets/layout/question_card.html index 71bf8b0..a4662da 100644 --- a/templates/snippets/layout/question_card.html +++ b/templates/snippets/layout/question_card.html @@ -64,16 +64,16 @@ - Share on Fediverse + {{ _('Share on Fediverse') }} -
  • Share on Twitter
  • +
  • {{ _('Share on Twitter') }}
  • - Share on Bluesky + {{ _('Share on Bluesky') }}
  • @@ -81,24 +81,24 @@ - Share on Tumblr + {{ _('Share on Tumblr') }}
  • -
  • +
  • {% else %} {{ question.content | render_markdown }} diff --git a/templates/view_question.html b/templates/view_question.html index 02256a7..45ca855 100644 --- a/templates/view_question.html +++ b/templates/view_question.html @@ -15,18 +15,18 @@ @@ -75,14 +75,14 @@ let buttonCharsText = toggleButton.querySelector('.cw-btn-chars'); collapseElement.addEventListener('show.bs.collapse', function () { - buttonText.textContent = 'Hide content'; + buttonText.textContent = "{{ _('Hide content') }}"; buttonCharsText.classList.add('d-none'); cwText.classList.remove('text-center'); cwText.classList.remove('fw-bold'); }); collapseElement.addEventListener('hide.bs.collapse', function () { - buttonText.textContent = 'Show content'; + buttonText.textContent = "{{ _('Show content') }}"; buttonCharsText.classList.remove('d-none'); cwText.classList.add('text-center'); cwText.classList.add('fw-bold'); @@ -93,7 +93,7 @@ function copy(questionId) { navigator.clipboard.writeText("{{ cfg.instance.fullBaseUrl }}/q/" + questionId + "/"); Toastify({ - text: "Successfully copied link to clipboard!", + text: "{{ _('Successfully copied link to clipboard!') }}", duration: 3000, gravity: "top", position: "right", @@ -105,7 +105,7 @@ function copyFull(text) { navigator.clipboard.writeText(text); Toastify({ - text: "Successfully copied text to clipboard!", + text: "{{ _('Successfully copied text to clipboard!') }}", duration: 3000, gravity: "top", position: "right",