Cutting stuff out.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 7 Aug 2023 11:39:30 +0000 (13:39 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 7 Aug 2023 11:39:30 +0000 (13:39 +0200)
23 files changed:
src/ajaxable/locale/de/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/de/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/en/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/en/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/es/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/es/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/fr/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/fr/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/it/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/it/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/jp/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/jp/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/lt/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/lt/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/pl/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/pl/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/ru/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/ru/LC_MESSAGES/django.po [deleted file]
src/ajaxable/locale/uk/LC_MESSAGES/django.mo [deleted file]
src/ajaxable/locale/uk/LC_MESSAGES/django.po [deleted file]
src/ajaxable/templates/ajaxable/form.html
src/ajaxable/templates/ajaxable/form_on_page.html
src/ajaxable/utils.py

diff --git a/src/ajaxable/locale/de/LC_MESSAGES/django.mo b/src/ajaxable/locale/de/LC_MESSAGES/django.mo
deleted file mode 100644 (file)
index 71cbdf3..0000000
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 (file)
index c991b51..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 6c5906d..0000000
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 (file)
index 191cb4d..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 71cbdf3..0000000
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 (file)
index c991b51..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 2c90dd0..0000000
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 (file)
index 7f54597..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 71cbdf3..0000000
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 (file)
index c991b51..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 6c5906d..0000000
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 (file)
index 191cb4d..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 50c6184..0000000
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 (file)
index 6b2c60b..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 3e13226..0000000
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 (file)
index adfe9b9..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index 6a77961..0000000
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 (file)
index 697e31d..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 (file)
index d2d31a4..0000000
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 (file)
index 60461b5..0000000
+++ /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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\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 ""
index d92b340..3ca76a4 100644 (file)
@@ -1,9 +1,7 @@
-{% load i18n %}
-
 <h1>{{ title }}</h1>
 
 <form action="{% if action_url %}{% url action_url %}{% else %}{{ action }}{% endif %}{% if action_query %}?{{ action_query }}{% endif %}" method="post" accept-charset="utf-8"
-      class="cuteform{% if placeholdize %} hidelabels{% endif %}">
+      class="cuteform">
   {% csrf_token %}
   {% if honeypot %}
     {% load honeypot %}
index de00a47..d88cadb 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "2022/base_simple.html" %}
-{% load i18n %}
 
 {% block titleextra %}{{ title }}{% endblock %}
 
index 3a1c455..4e423ef 100644 (file)
@@ -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,