From: Radek Czajka Date: Mon, 7 Aug 2023 11:39:30 +0000 (+0200) Subject: Cutting stuff out. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/a3b153ea6e30da275edf3e34b8d2f8ca1bb436cc?ds=sidebyside;hp=759e23384cc103d4d313d9a5486644d59142fe69 Cutting stuff out. --- diff --git a/src/ajaxable/locale/de/LC_MESSAGES/django.mo b/src/ajaxable/locale/de/LC_MESSAGES/django.mo deleted file mode 100644 index 71cbdf3e9..000000000 Binary files a/src/ajaxable/locale/de/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/de/LC_MESSAGES/django.po b/src/ajaxable/locale/de/LC_MESSAGES/django.po deleted file mode 100644 index c991b5122..000000000 --- a/src/ajaxable/locale/de/LC_MESSAGES/django.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/en/LC_MESSAGES/django.mo b/src/ajaxable/locale/en/LC_MESSAGES/django.mo deleted file mode 100644 index 6c5906d1c..000000000 Binary files a/src/ajaxable/locale/en/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/en/LC_MESSAGES/django.po b/src/ajaxable/locale/en/LC_MESSAGES/django.po deleted file mode 100644 index 191cb4d3c..000000000 --- a/src/ajaxable/locale/en/LC_MESSAGES/django.po +++ /dev/null @@ -1,21 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/es/LC_MESSAGES/django.mo b/src/ajaxable/locale/es/LC_MESSAGES/django.mo deleted file mode 100644 index 71cbdf3e9..000000000 Binary files a/src/ajaxable/locale/es/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/es/LC_MESSAGES/django.po b/src/ajaxable/locale/es/LC_MESSAGES/django.po deleted file mode 100644 index c991b5122..000000000 --- a/src/ajaxable/locale/es/LC_MESSAGES/django.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/fr/LC_MESSAGES/django.mo b/src/ajaxable/locale/fr/LC_MESSAGES/django.mo deleted file mode 100644 index 2c90dd0c8..000000000 Binary files a/src/ajaxable/locale/fr/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/fr/LC_MESSAGES/django.po b/src/ajaxable/locale/fr/LC_MESSAGES/django.po deleted file mode 100644 index 7f5459777..000000000 --- a/src/ajaxable/locale/fr/LC_MESSAGES/django.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/it/LC_MESSAGES/django.mo b/src/ajaxable/locale/it/LC_MESSAGES/django.mo deleted file mode 100644 index 71cbdf3e9..000000000 Binary files a/src/ajaxable/locale/it/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/it/LC_MESSAGES/django.po b/src/ajaxable/locale/it/LC_MESSAGES/django.po deleted file mode 100644 index c991b5122..000000000 --- a/src/ajaxable/locale/it/LC_MESSAGES/django.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/jp/LC_MESSAGES/django.mo b/src/ajaxable/locale/jp/LC_MESSAGES/django.mo deleted file mode 100644 index 6c5906d1c..000000000 Binary files a/src/ajaxable/locale/jp/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/jp/LC_MESSAGES/django.po b/src/ajaxable/locale/jp/LC_MESSAGES/django.po deleted file mode 100644 index 191cb4d3c..000000000 --- a/src/ajaxable/locale/jp/LC_MESSAGES/django.po +++ /dev/null @@ -1,21 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/lt/LC_MESSAGES/django.mo b/src/ajaxable/locale/lt/LC_MESSAGES/django.mo deleted file mode 100644 index 50c618427..000000000 Binary files a/src/ajaxable/locale/lt/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/lt/LC_MESSAGES/django.po b/src/ajaxable/locale/lt/LC_MESSAGES/django.po deleted file mode 100644 index 6b2c60bb9..000000000 --- a/src/ajaxable/locale/lt/LC_MESSAGES/django.po +++ /dev/null @@ -1,23 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"(n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/locale/pl/LC_MESSAGES/django.mo b/src/ajaxable/locale/pl/LC_MESSAGES/django.mo deleted file mode 100644 index 3e13226ce..000000000 Binary files a/src/ajaxable/locale/pl/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/pl/LC_MESSAGES/django.po b/src/ajaxable/locale/pl/LC_MESSAGES/django.po deleted file mode 100644 index adfe9b94c..000000000 --- a/src/ajaxable/locale/pl/LC_MESSAGES/django.po +++ /dev/null @@ -1,22 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2012-01-27 16:36+0100\n" -"Last-Translator: Radek Czajka \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2)\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "Wyślij" diff --git a/src/ajaxable/locale/ru/LC_MESSAGES/django.mo b/src/ajaxable/locale/ru/LC_MESSAGES/django.mo deleted file mode 100644 index 6a77961e2..000000000 Binary files a/src/ajaxable/locale/ru/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/ru/LC_MESSAGES/django.po b/src/ajaxable/locale/ru/LC_MESSAGES/django.po deleted file mode 100644 index 697e31d13..000000000 --- a/src/ajaxable/locale/ru/LC_MESSAGES/django.po +++ /dev/null @@ -1,23 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "Отправить" diff --git a/src/ajaxable/locale/uk/LC_MESSAGES/django.mo b/src/ajaxable/locale/uk/LC_MESSAGES/django.mo deleted file mode 100644 index d2d31a4fd..000000000 Binary files a/src/ajaxable/locale/uk/LC_MESSAGES/django.mo and /dev/null differ diff --git a/src/ajaxable/locale/uk/LC_MESSAGES/django.po b/src/ajaxable/locale/uk/LC_MESSAGES/django.po deleted file mode 100644 index 60461b5fc..000000000 --- a/src/ajaxable/locale/uk/LC_MESSAGES/django.po +++ /dev/null @@ -1,23 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: ajaxable/utils.py:63 -msgid "Send" -msgstr "" diff --git a/src/ajaxable/templates/ajaxable/form.html b/src/ajaxable/templates/ajaxable/form.html index d92b3404e..3ca76a491 100644 --- a/src/ajaxable/templates/ajaxable/form.html +++ b/src/ajaxable/templates/ajaxable/form.html @@ -1,9 +1,7 @@ -{% load i18n %} -

{{ title }}

+ class="cuteform"> {% csrf_token %} {% if honeypot %} {% load honeypot %} diff --git a/src/ajaxable/templates/ajaxable/form_on_page.html b/src/ajaxable/templates/ajaxable/form_on_page.html index de00a47f9..d88cadb85 100644 --- a/src/ajaxable/templates/ajaxable/form_on_page.html +++ b/src/ajaxable/templates/ajaxable/form_on_page.html @@ -1,5 +1,4 @@ {% extends "2022/base_simple.html" %} -{% load i18n %} {% block titleextra %}{{ title }}{% endblock %} diff --git a/src/ajaxable/utils.py b/src/ajaxable/utils.py index 3a1c4558a..4e423ef77 100644 --- a/src/ajaxable/utils.py +++ b/src/ajaxable/utils.py @@ -9,7 +9,6 @@ from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidde from django.shortcuts import render from django.utils.encoding import force_str from django.utils.functional import Promise -from django.utils.translation import gettext_lazy as _ from django.views.decorators.vary import vary_on_headers from honeypot.decorators import verify_honeypot_value from wolnelektury.utils import is_ajax @@ -44,12 +43,6 @@ def require_login(request): return HttpResponseRedirect('/uzytkownicy/zaloguj') # next?=request.build_full_path()) -def placeholdized(form): - for field in form.fields.values(): - field.widget.attrs['placeholder'] = field.label + ('*' if field.required else '') - return form - - class AjaxableFormView: """Subclass this to create an ajaxable view for any form. @@ -57,10 +50,9 @@ class AjaxableFormView: """ form_class = None - placeholdize = False # override to customize form look template = "ajaxable/form.html" - submit = _('Send') + submit = 'Send' action = '' title = '' @@ -136,13 +128,10 @@ class AjaxableFormView: cd = self.context_description(request, obj) if cd: title += ": " + cd - if self.placeholdize: - form = placeholdized(form) context = { self.formname: form, "title": title, "honeypot": self.honeypot, - "placeholdize": self.placeholdize, "submit": self.submit, "action": self.action, "response_data": response_data,