Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
Fix search result messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiphoseer committed Aug 15, 2017
1 parent 9c461e9 commit 96580da
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 82 deletions.
107 changes: 59 additions & 48 deletions pyBuchaktion/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pyBuchaktion\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-15 15:30+0200\n"
"PO-Revision-Date: 2017-08-15 15:30+0100\n"
"POT-Creation-Date: 2017-08-15 17:47+0200\n"
"PO-Revision-Date: 2017-08-15 17:50+0100\n"
"Last-Translator: Daniel Schweighöfer <[email protected]>\n"
"Language-Team: UA Buchaktion <[email protected]>\n"
"Language: de\n"
Expand All @@ -34,7 +34,7 @@ msgstr "Titel"
msgid "author"
msgstr "Autor"

#: admin.py:132 forms.py:69 forms.py:76 mail.py:80
#: admin.py:132 forms.py:78 forms.py:85 mail.py:80
#: templates/pyBuchaktion/tags/dlist_book.html:7
#: templates/pyBuchaktion/tags/grid_books_header.html:7
#: templates/pyBuchaktion/tags/table_book.html:7
Expand Down Expand Up @@ -205,63 +205,63 @@ msgstr "Buch bestellen"
msgid "Order #%s"
msgstr "Bestellung #%s"

#: forms.py:27
#: forms.py:32
msgid "This book is not available for ordering"
msgstr "Dieses Buch kann nicht bestellt werden"

#: forms.py:35 messages.py:9
#: forms.py:40 messages.py:9
msgid "Book ordering is not active for the current date"
msgstr "Buchbestellungen sind für das aktuelle Datum nicht aktiviert."

#: forms.py:43
#: forms.py:48
msgid "You may not order any more books in this timeframe."
msgstr "Sie können in diesem Zeitrahmen keine Bücher mehr bestellen."

#: forms.py:61
#: forms.py:70
msgid "This book is already proposed for this module"
msgstr "Dieses Buch ist für dieses Modul bereits vorgeschlagen"

#: forms.py:67 mail.py:77 templates/pyBuchaktion/tags/table_orders.html:6
#: forms.py:76 mail.py:77 templates/pyBuchaktion/tags/table_orders.html:6
msgid "Title"
msgstr "Titel"

#: forms.py:68 mail.py:78 templates/pyBuchaktion/tags/dlist_book.html:3
#: forms.py:77 mail.py:78 templates/pyBuchaktion/tags/dlist_book.html:3
#: templates/pyBuchaktion/tags/grid_books_header.html:4
#: templates/pyBuchaktion/tags/table_book.html:5
#: templates/pyBuchaktion/tags/table_books.html:6
#: templates/pyBuchaktion/tags/table_orders.html:7
msgid "Author"
msgstr "Autor"

#: forms.py:70 templates/pyBuchaktion/tags/dlist_book.html:5
#: forms.py:79 templates/pyBuchaktion/tags/dlist_book.html:5
#: templates/pyBuchaktion/tags/grid_books_header.html:10
#: templates/pyBuchaktion/tags/table_book.html:6
#: templates/pyBuchaktion/tags/table_books.html:8
msgid "Publisher"
msgstr "Verlag"

#: forms.py:90
#: forms.py:99
msgid "Not a valid ISBN-13"
msgstr "Keine gültige ISBN-13"

#: forms.py:95
#: forms.py:104
msgid "Book proposal is not active for the current date."
msgstr "Buchvorschläge sind für das aktuelle Datum nicht aktiviert."

#: forms.py:103
#: forms.py:112
msgid "You may not order or propose any more books in this timeframe."
msgstr ""
"Sie können in diesem Zeitrahmen keine Bücher mehr bestellen oder vorschlagen."

#: forms.py:109
#: forms.py:118
msgid "Name"
msgstr "Name"

#: forms.py:119
#: forms.py:129
msgid "The preferred language for notification emails"
msgstr "Bevorzugte Sprache für Hinweis-Nachrichten"

#: forms.py:120
#: forms.py:130
msgid "The e-mail address to recieve status updates"
msgstr "E-Mail um Hinweise über Statusänderungen zu empfangen"

Expand Down Expand Up @@ -356,7 +356,7 @@ msgstr ""
"Vorschlag angenommen wurde. Die Bestellung kann jederzeit wieder "
"zurückgezogen werden."

#: messages.py:14
#: messages.py:12
msgid ""
"This order is associated with a proposed book. Until the book is confirmed, "
"it will not be proceeded with. In any case, this order expresses your "
Expand All @@ -367,15 +367,15 @@ msgstr ""
"drückt die Bestellung Interesse an dem Buch aus, was die Wahrscheinlichkeit "
"erhöht, dass es bestätigt wird."

#: messages.py:17
#: messages.py:13
#, python-brace-format
msgid ""
"This order is marked to be ordered from our book retailer on <b>{date}<b/>."
msgstr ""
"Diese Bestellung ist für den <b>{date}</b> zur Weitergabe an unseren Händler "
"vorgemerkt."

#: messages.py:18
#: messages.py:14
#, python-brace-format
msgid ""
"Below, you find the list of your orders. The current order timeframe is from "
Expand All @@ -386,57 +386,79 @@ msgstr ""
"ist vom <b>{start_date}</b> bis zum <b>{end_date}</b>. Du hast momentan "
"<b>{budget_spent} von {budget_max}</b> erlaubte Bestellungen aufgegeben."

#: messages.py:21
#: messages.py:15
msgid "No orders found!"
msgstr "Keine Bestellungen gefunden!"

#: messages.py:22
#: messages.py:16
msgid "You have not ordered any books!"
msgstr "Du hast keine Bücher bestellt!"

#: messages.py:23
#: messages.py:17
msgid ""
"It seems that this module does not have much literature associated with it."
msgstr ""
"Es scheint so, als ob zu diesem Modul kaum Buchvorschläge vorhanden sind."

#: messages.py:24
#: messages.py:18
msgid "This book has been rejected, and may not be ordered"
msgstr "Dieses Buch wurde abgelehnt, und kann nicht bestellt werden"

#: messages.py:25
#: messages.py:19
msgid "This book has been proposed, but has yet to be confirmed by our team."
msgstr ""
"Dieses Buch wurde vorgeschlagen, muss aber erst von unserem Team bestätigt "
"werden."

#: messages.py:26
#: messages.py:20
msgid ""
"This book has been marked obsolete, a new version is available. It may not "
"be ordered"
msgstr ""
"Dieses Buch ist als veraltet gekennzeichnet, eine neuere Version ist "
"verfügbar. Es kann nicht bestellt werden."

#: messages.py:27
#: messages.py:21
msgid "You have not ordered this book"
msgstr "Du hast dieses Buch nicht bestellt"

#: messages.py:28
#: messages.py:22
msgid ""
"Orders for proposed books will be proceeded with once the book is confirmed."
msgstr ""
"Bestellungen für vorgeschlagene Bücher werden bearbeitet sobald das Buch "
"bestätigt ist."

#: messages.py:29
#: messages.py:23
msgid "At the moment, no orders may be posted!"
msgstr "Momentan dürfen keine Bestellungen aufgegeben werden!"

#: messages.py:30
#: messages.py:24
msgid "Your library ID number"
msgstr "Deine Büchereinummer"

#: messages.py:25
#, python-brace-format
msgid ""
"The book you are searching for may already have been proposed, rejected or "
"marked as obsolete. Check the <a href=\"{full_list}\">full list</a> to see "
"if any of these apply, otherwise you may <a href=\"{propose}\">propose</a> "
"the book to us."
msgstr ""
"Das gesuchte Buch wurde möglicherweise bereits vorgeschlagen, abgelehnt oder "
"als veraltet gekennzeichnet. Prüfe die <a href=\"{full_list}\">komplette "
"Liste</a> um zu sehen ob das zutrifft, ansonsten kannst du uns das Buch <a "
"href=\"{propose}\">vorschlagen</a>."

#: messages.py:26
#, python-brace-format
msgid ""
"You may propose the book to us <a href=\"{propose}\">here</a>, or contact us "
"via E-Mail at <a href=\"mailto:{email}\">{email}</a>"
msgstr ""
"Du kannst uns das Buch <a href=\"{propose}\">hier</a> vorschlagen, oder per "
"E-Mail an <a href=\"mailto:{email}\">{email}</a> kontaktieren"

#: mixins.py:18
msgid ""
"This feature is only available for students at the department of computer "
Expand Down Expand Up @@ -794,29 +816,11 @@ msgstr "Bestellung absenden"
msgid "Propose a book"
msgstr "Buchvorschlag"

#: templates/pyBuchaktion/books/active_list.html:5
#: templates/pyBuchaktion/books/active_list.html:7
#: templates/pyBuchaktion/books/all_list.html:7
msgid "Sorry, no books matching this query were found!"
msgstr "Entschuldige, keine passenden Bücher wurden gefunden!"

#: templates/pyBuchaktion/books/active_list.html:6
msgid ""
"The book you are searching for may have already been proposed, rejected or "
"marked as obsolete. That means that this book cannot be ordered right now, "
"but you can check the full list to find out and possibly propose the book to "
"us."
msgstr ""
"Das gesuchte Buch wurde bereits vorgeschlagen, abgelehnt oder als "
"veraltetgekennzeichnet. Damit kann dieses Buch nicht bestellt werden"

#: templates/pyBuchaktion/books/active_list.html:7
msgid "Full list"
msgstr "Vollständige Liste"

#: templates/pyBuchaktion/books/all_list.html:11
msgid "If you want to propose this book to us, you can send an email to"
msgstr "Wenn du dieses Buch vorschlagen möchtest, schreib uns eine E-Mail an"

#: templates/pyBuchaktion/books/base.html:4
msgid "Search for modules"
msgstr "Suche nach Modulen"
Expand Down Expand Up @@ -933,6 +937,13 @@ msgstr "Die Bestellung war erfolgreich, das Buch ist angekommen."
msgid "No %(verbose_name)s found matching the query"
msgstr "Kein(e) %(verbose_name)s zu dieser Suche gefunden"

#~ msgid "Full list"
#~ msgstr "Vollständige Liste"

#~ msgid "If you want to propose this book to us, you can send an email to"
#~ msgstr ""
#~ "Wenn du dieses Buch vorschlagen möchtest, schreib uns eine E-Mail an"

#~ msgid ""
#~ "The library id number assigned by the ULB, required for if you want the "
#~ "book to be reserved for you"
Expand Down
44 changes: 20 additions & 24 deletions pyBuchaktion/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@
from .models import DisplayMessage

MESSAGES = {
'modulecategories_list_intro': _("This list contains all modules for which books are available for ordering through this system."),
'book_order_active': _("If you order now, the order will be posted to our merchant by <b>{date}</b>."),
'book_order_inactive': _("Book ordering is not active for the current date"),
'book_order_intro': "",
'book_propose_intro': _("You may use this form to propose a book to us. This "
"will automatically generate an order for that book, helping us keep track on how many people "
"would like to see the book available.\n\nYou may cancel this order at any time."),
'proposal_order_intro': _("This order is associated with a proposed book. "
"Until the book is confirmed, it will not be proceeded with. In any case, this order "
"expresses your interest in this book, which improves the chance that it will get confirmed."),
'order_marked_date': _("This order is marked to be ordered from our book retailer on <b>{date}<b/>."),
'account_orders_active': _("Below, you find the list of your orders. The current order timeframe is "
"from <b>{start_date}</b> to <b>{end_date}</b>. You currently have <b>{budget_spent} "
"of {budget_max}</b> available orders posted."),
'orders_none_found': _("No orders found!"),
'account_no_orders': _("You have not ordered any books!"),
'module_not_much_literature': _("It seems that this module does not have much literature associated with it."),
'book_state_RJ': _("This book has been rejected, and may not be ordered"),
'book_state_PP': _("This book has been proposed, but has yet to be confirmed by our team."),
'book_state_OL': _("This book has been marked obsolete, a new version is available. It may not be ordered"),
'book_not_ordered': _("You have not ordered this book"),
'order_proposed_book': _("Orders for proposed books will be proceeded with once the book is confirmed."),
'account_orders_inactive': _("At the moment, no orders may be posted!"),
'library_id_help': _("Your library ID number"),
'modulecategories_list_intro': _("This list contains all modules for which books are available for ordering through this system."),
'book_order_active': _("If you order now, the order will be posted to our merchant by <b>{date}</b>."),
'book_order_inactive': _("Book ordering is not active for the current date"),
'book_order_intro': "",
'book_propose_intro': _("You may use this form to propose a book to us. This will automatically generate an order for that book, helping us keep track on how many people would like to see the book available.\n\nYou may cancel this order at any time."),
'proposal_order_intro': _("This order is associated with a proposed book. Until the book is confirmed, it will not be proceeded with. In any case, this order expresses your interest in this book, which improves the chance that it will get confirmed."),
'order_marked_date': _("This order is marked to be ordered from our book retailer on <b>{date}<b/>."),
'account_orders_active': _("Below, you find the list of your orders. The current order timeframe is from <b>{start_date}</b> to <b>{end_date}</b>. You currently have <b>{budget_spent} of {budget_max}</b> available orders posted."),
'orders_none_found': _("No orders found!"),
'account_no_orders': _("You have not ordered any books!"),
'module_not_much_literature': _("It seems that this module does not have much literature associated with it."),
'book_state_RJ': _("This book has been rejected, and may not be ordered"),
'book_state_PP': _("This book has been proposed, but has yet to be confirmed by our team."),
'book_state_OL': _("This book has been marked obsolete, a new version is available. It may not be ordered"),
'book_not_ordered': _("You have not ordered this book"),
'order_proposed_book': _("Orders for proposed books will be proceeded with once the book is confirmed."),
'account_orders_inactive': _("At the moment, no orders may be posted!"),
'library_id_help': _("Your library ID number"),
'book_not_found': _('The book you are searching for may already have been proposed, rejected or marked as obsolete. Check the <a href="{full_list}">full list</a> to see if any of these apply, otherwise you may <a href="{propose}">propose</a> the book to us.'),
'book_not_found_all': _('You may propose the book to us <a href="{propose}">here</a>, or contact us via E-Mail at <a href="mailto:{email}">{email}</a>')
}

def get_message(key):
Expand Down
21 changes: 16 additions & 5 deletions pyBuchaktion/templates/pyBuchaktion/books/active_list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{% extends "pyBuchaktion/books/base.html" %}{% load i18n view_tools %}
{% extends "pyBuchaktion/books/base.html" %}{% load i18n view_tools buchaktion_tags %}

{% block noresults %}
<div class="alert alert-danger">
{% trans "Sorry, no books matching this query were found!" %}<br/>
{% trans "The book you are searching for may have already been proposed, rejected or marked as obsolete. That means that this book cannot be ordered right now, but you can check the full list to find out and possibly propose the book to us." %}
<a href="{% url "pyBuchaktion:books_all" %}{{ form|form_as_dict|urlencode }}">{% trans "Full list" %}</a>
<div class="panel panel-danger">
<div class="panel-heading">
<h4 class="panel-title">
{% trans "Sorry, no books matching this query were found!" %}
</h4>
</div>
<div class="panel-body">
{% url "pyBuchaktion:books_all" as full_list %}
{% url "pyBuchaktion:book_propose" as propose %}
{% with form|form_as_dict|urlencode as query %}
{% with full_list|add:query as full_list_query %}
{% message "book_not_found" full_list=full_list_query propose=propose %}
{% endwith %}
{% endwith %}
</div>
</div>
{% endblock noresults %}
8 changes: 3 additions & 5 deletions pyBuchaktion/templates/pyBuchaktion/books/all_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "pyBuchaktion/books/base.html" %}{% load i18n %}
{% extends "pyBuchaktion/books/base.html" %}{% load i18n buchaktion_tags %}

{% block noresults %}
<div class="panel panel-danger">
Expand All @@ -8,10 +8,8 @@ <h4 class="panel-title">
</h4>
</div>
<div class="panel-body">
{% trans "If you want to propose this book to us, you can send an email to" %}
<a href="mailto:[email protected]">
[email protected]
</a>
{% url "pyBuchaktion:book_propose" as propose %}
{% message "book_not_found_all" propose=propose email="[email protected]" %}
</div>
</div>
{% endblock noresults %}

0 comments on commit 96580da

Please sign in to comment.