Skip to content

Commit

Permalink
Copy updates (#699)
Browse files Browse the repository at this point in the history
* fix: update search page copy

To improve readability:
- update the page title and H1 to "Search MoJ data"
- update the details component summary text to "Search tips"
- update the link text within the details component to "More advanced search options"

* Remove comments from translation file

These are not particularly helpful. If we need them for disambiguation,
then it is better to use `pgettext`, which lets us add a context.
  • Loading branch information
MatMoore authored Aug 21, 2024
1 parent 0e83386 commit 0598671
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 104 deletions.
3 changes: 2 additions & 1 deletion home/service/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.conf import settings
from django.core.paginator import Paginator
from django.utils.translation import gettext as _
from django.utils.translation import pgettext
from nltk.stem import PorterStemmer

from home.forms.search import SearchForm
Expand Down Expand Up @@ -168,7 +169,7 @@ def _get_context(self, items_per_page: int) -> dict[str, Any]:
"results": self.results.page_results,
"malformed_result_urns": self.results.malformed_result_urns,
"highlighted_results": self.highlighted_results.page_results,
"h1_value": _("Search"),
"h1_value": pgettext("Page title", "Search MoJ data"),
"page_obj": self.paginator.get_page(self.page),
"page_range": self.paginator.get_elided_page_range( # type: ignore
self.page, on_each_side=2, on_ends=1
Expand Down
Loading

0 comments on commit 0598671

Please sign in to comment.