From 4c2e69ac34f24029696d77c2fb6113e2e6ab6819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asier=20Cardoso=20S=C3=A1nchez?= Date: Sat, 17 Jul 2021 15:00:57 +0200 Subject: [PATCH] feat(translations): Add search placeholder translations --- templates/_includes/_defaults.html | 12 ++++++++++++ templates/base.html | 4 ++-- templates/tags.html | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/templates/_includes/_defaults.html b/templates/_includes/_defaults.html index 95a2bf82..e6a7994b 100644 --- a/templates/_includes/_defaults.html +++ b/templates/_includes/_defaults.html @@ -236,3 +236,15 @@ {% else %} {% set SHARE_LINKS = SHARE_LINKS %} {% endif %} + +{% if not SEARCH_PLACEHOLDER %} +{% set SEARCH_PLACEHOLDER = 'Search' %} +{% else %} +{% set SEARCH_PLACEHOLDER = SEARCH_PLACEHOLDER %} +{% endif %} + +{% if not SEARCH_TAG_PLACEHOLDER %} +{% set SEARCH_TAG_PLACEHOLDER = 'Find a tag' %} +{% else %} +{% set SEARCH_TAG_PLACEHOLDER = SEARCH_TAG_PLACEHOLDER %} +{% endif %} diff --git a/templates/base.html b/templates/base.html index d14a7f95..7b6e017e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -78,11 +78,11 @@
  • {{ p.title }}
  • {% endfor %} {% endif %} - {% from '_includes/_defaults.html' import TAGS_URL, CATEGORIES_URL, ARCHIVES_URL, SEARCH_URL with context %} + {% from '_includes/_defaults.html' import TAGS_URL, CATEGORIES_URL, ARCHIVES_URL, SEARCH_URL, SEARCH_PLACEHOLDER with context %}
  • Categories
  • Tags
  • Archives
  • -
  • +
  • diff --git a/templates/tags.html b/templates/tags.html index df6f72f4..65679cca 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -30,7 +30,7 @@ {% endblock feed_links %} {% block content %} -{% from '_includes/_defaults.html' import TAGS_URL with context %} +{% from '_includes/_defaults.html' import TAGS_URL, SEARCH_TAG_PLACEHOLDER with context %}