Skip to content

Commit

Permalink
#7: Localize submission blocks and reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
ctgraham committed Jan 31, 2025
1 parent 1229cf7 commit dcefd90
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Binary file modified locale/en/LC_MESSAGES/django.mo
Binary file not shown.
10 changes: 10 additions & 0 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,39 @@ msgid ""
"request. Reason: Required information about the physical container of this "
"item is not available."
msgstr ""
"This item may not be available for request, but an attempt will be made to include it in your "
"request. Reason: Required information about the physical container of this "
"item is not available."

#: process_request/routines.py:113
msgid ""
"This item is currently unavailable for request. It will not be included in "
"request. Reason: {}"
msgstr ""
"This item may be unavailable, but it will be included in your "
"request. Reason: {}"

#: process_request/routines.py:116
msgid ""
"This item is already available online. It will not be included in request."
msgstr ""
"This item is already available online, but it will be included in your request."

#: process_request/routines.py:118
msgid ""
"This item may be currently unavailable for request. It will be included in "
"request. Reason: {}"
msgstr ""
"This item may be restricted. We will follow up with you if needed for your "
"request. Reason: {}"

#: process_request/routines.py:134 process_request/routines.py:156
msgid ""
"This item is currently unavailable for request. It will not be included in "
"request. Reason: This item cannot be found."
msgstr ""
"This item may unavailable, but we will try to include it in your "
"request. Reason: This item cannot be found."

#: process_request/routines.py:179
msgid "My List from DIMES"
Expand Down
2 changes: 1 addition & 1 deletion process_request/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .models import ReadingRoomCache

CONFIDENCE_RATIO = 97 # Minimum confidence ratio to match against.
OPEN_TEXT = ["Open for research", "Open for scholarly research"]
OPEN_TEXT = ["Open for research", "Open for scholarly research", "No restrictions"]
CLOSED_TEXT = ["Restricted"]


Expand Down
3 changes: 0 additions & 3 deletions process_request/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,10 @@ def is_submittable(self, item):
submit = True
reason = None
if not any(value for value in item["preferred_instance"].values()):
submit = False
reason = _("This item is currently unavailable for request. It will not be included in request. Reason: Required information about the physical container of this item is not available.")
elif item["restrictions"] == "closed":
submit = False
reason = _("This item is currently unavailable for request. It will not be included in request. Reason: {}").format(item.get("restrictions_text"))
elif item["preferred_instance"]["format"].lower() == "digital_object":
submit = False
reason = _("This item is already available online. It will not be included in request.")
elif item["restrictions"] == "conditional":
reason = _("This item may be currently unavailable for request. It will be included in request. Reason: {}").format(item.get("restrictions_text"))
Expand Down

0 comments on commit dcefd90

Please sign in to comment.