From e5e9e807cabf4e259bd426a08d34624c2d9f36ed Mon Sep 17 00:00:00 2001 From: Ritik Ranjan Date: Sat, 28 Jan 2023 21:11:20 +0530 Subject: [PATCH] Splited stirng into two then fixed pluralization error. --- bookwyrm/templates/import/import.html | 9 ++++++++- bookwyrm/views/imports/import_data.py | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/import/import.html b/bookwyrm/templates/import/import.html index 9d278b28d..06817d302 100644 --- a/bookwyrm/templates/import/import.html +++ b/bookwyrm/templates/import/import.html @@ -17,7 +17,14 @@ {% if site.imports_enabled %} {% if import_size_limit and import_limit_reset %}
-

{% blocktrans %}Currently you are allowed to import {{ import_size_limit }} {{book_noun}} every {{ import_limit_reset }} {{day_noun}}.{% endblocktrans %}

+

+ {% blocktrans count books=import_size_limit%} + Currently you are allowed to import {{ import_size_limit }} {{books}} + {% endblocktrans %} + {% blocktrans count days=import_limit_reset%} + every {{ import_limit_reset }} {{days}}. + {% endblocktrans %} +

{% blocktrans %}You have {{ allowed_imports }} left.{% endblocktrans %}

{% endif %} diff --git a/bookwyrm/views/imports/import_data.py b/bookwyrm/views/imports/import_data.py index d09e0257f..01812e1d5 100644 --- a/bookwyrm/views/imports/import_data.py +++ b/bookwyrm/views/imports/import_data.py @@ -64,9 +64,6 @@ class Import(View): data["import_limit_reset"] = site_settings.import_limit_reset data["allowed_imports"] = site_settings.import_size_limit - imported_books - data["book_noun"] = "books" if site_settings.import_size_limit > 1 else 'book' - data["day_noun"] = "days" if site_settings.import_limit_reset > 1 else 'day' - return TemplateResponse(request, "import/import.html", data) def post(self, request):