diff --git a/peachjam/js/locale/fr/translation.json b/peachjam/js/locale/fr/translation.json
index d8e85afaa..a7f14e281 100644
--- a/peachjam/js/locale/fr/translation.json
+++ b/peachjam/js/locale/fr/translation.json
@@ -65,5 +65,8 @@
"Try searching instead": "Essayez plutôt de faire une recherche",
"What changed?": "Quels sont les changements ?",
"Year": "Année",
- "Years": "Années"
+ "Years": "Années",
+ "Help": "Aide",
+ "You can search for documents by entering a keyword or phrase in the search box. You can also use the Advanced search to search for documents by more specific criteria.": "Vous pouvez rechercher des documents en entrant un mot-clé ou une phrase dans la zone de recherche. Vous pouvez également utiliser la recherche avancée pour rechercher des documents selon des critères plus spécifiques.",
+ "This is Advanced Search. Enter keywords in the fields above for a more fine grained search of documents.": "Ceci est une recherche avancée. Entrez des mots-clés dans les champs ci-dessus pour une recherche plus fine des documents.",
}
diff --git a/peachjam/js/locale/sw/translation.json b/peachjam/js/locale/sw/translation.json
index a86527999..547d9ea38 100644
--- a/peachjam/js/locale/sw/translation.json
+++ b/peachjam/js/locale/sw/translation.json
@@ -65,5 +65,8 @@
"Try searching instead": "Jaribu kutafuta badala yake",
"What changed?": "Nini kimebadilika?",
"Year": "Mwaka",
- "Years": "Miaka"
+ "Years": "Miaka",
+ "Help": "Msaada",
+ "You can search for documents by entering a keyword or phrase in the search box. You can also use the Advanced search to search for documents by more specific criteria.": "Unaweza kutafuta nyaraka kwa kuingiza neno au kifungu cha maneno katika sanduku la utafutaji.Unaweza pia kutumia utafutaji wa kina kutafuta nyaraka kwa vigezo zaidi maalum.",
+ "This is Advanced Search. Enter keywords in the fields above for a more fine grained search of documents.": "Hii ni utafutaji wa kina. Weka maneno katika uga ulio juu kwa utafutaji wa nyaraka kwa undani zaidi."
}
diff --git a/peachjam/js/peachjam.ts b/peachjam/js/peachjam.ts
index 9ab98dafd..621c55361 100644
--- a/peachjam/js/peachjam.ts
+++ b/peachjam/js/peachjam.ts
@@ -143,9 +143,10 @@ class PeachJam {
// @ts-ignore
new window.bootstrap.Popover(el, {
html: true,
- content:
- (el.getAttribute('data-bs-content')
- + "
"),
+ content: `
+ ${el.getAttribute('data-bs-content')}
+
+ `,
container: 'body'
});
});
diff --git a/peachjam/templates/peachjam/_citations.html b/peachjam/templates/peachjam/_citations.html
index e74c894bd..9af681df3 100644
--- a/peachjam/templates/peachjam/_citations.html
+++ b/peachjam/templates/peachjam/_citations.html
@@ -1,6 +1,7 @@
{% load peachjam i18n %}
+ {% include 'peachjam/_help_popover.html' with link='#' btn_text=help_button_text content=citations_help_text %}
{% translate 'Cited documents' %} {{ cited_documents_count }}
diff --git a/peachjam/templates/peachjam/_help_popover.html b/peachjam/templates/peachjam/_help_popover.html
new file mode 100644
index 000000000..525f1f66f
--- /dev/null
+++ b/peachjam/templates/peachjam/_help_popover.html
@@ -0,0 +1,7 @@
+
diff --git a/peachjam/templates/peachjam/_related_documents.html b/peachjam/templates/peachjam/_related_documents.html
index a4714d028..3dd1bffce 100644
--- a/peachjam/templates/peachjam/_related_documents.html
+++ b/peachjam/templates/peachjam/_related_documents.html
@@ -1,12 +1,6 @@
{% load peachjam i18n %}
{% trans "Related documents" %}
-
+{% include 'peachjam/_help_popover.html' with link='https://google.com' btn_text=help_button_text content=related_documents_help_text %}
{% if relationships_as_subject %}
diff --git a/peachjam/views/generic_views.py b/peachjam/views/generic_views.py
index a8fe5862c..cccccf2dc 100644
--- a/peachjam/views/generic_views.py
+++ b/peachjam/views/generic_views.py
@@ -1,6 +1,7 @@
import itertools
from django.shortcuts import get_object_or_404
+from django.utils.translation import gettext_lazy as _
from django.views.generic import DetailView, ListView
from lxml import html
@@ -183,6 +184,14 @@ def get_context_data(self, **kwargs):
+ context["documents_citing_current_doc_count"]
)
context["labels"] = doc.labels.all()
+ context["help_button_text"] = _("Help")
+ context["citations_help_text"] = _(
+ "This is a list citations. On the left is a list of documents that this "
+ "document cites. On the right are documents that cite this one."
+ )
+ context["related_documents_help_text"] = _(
+ "This is a list of documents that are related to this one."
+ )
return context