From 9079d0cac0156139952446f0fdc8b37b94c10756 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 15 Oct 2024 15:39:14 +0200 Subject: [refactor] translation engines: common interface --- searx/templates/simple/answerers/translate.html | 38 +++++++++++++++++++++++++ searx/templates/simple/results.html | 22 ++++++++------ 2 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 searx/templates/simple/answerers/translate.html (limited to 'searx/templates') diff --git a/searx/templates/simple/answerers/translate.html b/searx/templates/simple/answerers/translate.html new file mode 100644 index 000000000..a1c38eecf --- /dev/null +++ b/searx/templates/simple/answerers/translate.html @@ -0,0 +1,38 @@ +
+{% for translation in translations %} + {% if loop.index > 1 %} +
+ {% endif %} +

{{ translation.text }}

+ {% if translation.transliteration %} + translation.transliteration + {% endif %} {% if translation.definitions %} +
+
{{ _('Definitions') }}
+
    + {% for definition in translation.definitions %} +
  • {{ definition }}
  • + {% endfor %} +
      +
+ {% endif %} {% if translation.examples %} +
+
{{ _('Examples') }}
+
    + {% for example in translation.examples %} +
  • {{ example }}
  • + {% endfor %} +
+
+ {% endif %} {% if translation.synonyms %} +
+
{{ _('Synonyms') }}
+
    + {% for synonym in translation.synonyms %} +
  • {{ synonym }}
  • + {% endfor %} +
+
+ {% endif %} +{% endfor %} +
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index e2d4217d5..047c49dbd 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -23,14 +23,20 @@ -- cgit v1.2.3