From 9e621499c65fcb873d2963c7da13be76d6aff825 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 20 Jan 2021 14:08:13 +0100 Subject: [PATCH] Internationalize funding. --- src/funding/admin.py | 6 +- src/funding/locale/de/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/en/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/es/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/fr/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/it/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/lt/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/pl/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/ru/LC_MESSAGES/django.po | 36 ++--- src/funding/locale/uk/LC_MESSAGES/django.po | 36 ++--- .../migrations/0005_auto_20210120_1358.py | 148 ++++++++++++++++++ src/funding/models.py | 4 +- src/funding/translation.py | 20 +++ .../locale/de/LC_MESSAGES/django.po | 2 +- .../locale/en/LC_MESSAGES/django.po | 2 +- .../locale/es/LC_MESSAGES/django.po | 2 +- .../locale/fr/LC_MESSAGES/django.po | 2 +- .../locale/it/LC_MESSAGES/django.po | 2 +- .../locale/lt/LC_MESSAGES/django.po | 2 +- .../locale/pl/LC_MESSAGES/django.mo | Bin 7957 -> 8483 bytes .../locale/pl/LC_MESSAGES/django.po | 36 +++-- .../locale/ru/LC_MESSAGES/django.po | 2 +- .../locale/uk/LC_MESSAGES/django.po | 2 +- .../templates/base/superbase.html | 2 +- 24 files changed, 366 insertions(+), 190 deletions(-) create mode 100644 src/funding/migrations/0005_auto_20210120_1358.py create mode 100644 src/funding/translation.py diff --git a/src/funding/admin.py b/src/funding/admin.py index 244ac6a73..3e981d8a5 100644 --- a/src/funding/admin.py +++ b/src/funding/admin.py @@ -3,18 +3,20 @@ # from django.utils.translation import ugettext_lazy as _ from django.contrib import admin +from modeltranslation.admin import TranslationAdmin from fnpdjango.actions import export_as_csv_action from .models import Offer, Perk, Funding, Spent -class OfferAdmin(admin.ModelAdmin): +class OfferAdmin(TranslationAdmin): model = Offer list_display = ['title', 'author', 'target', 'sum', 'is_win', 'start', 'end'] search_fields = ['title', 'author'] readonly_fields = ('cover_img_tag',) + autocomplete_fields = ['book'] -class PerkAdmin(admin.ModelAdmin): +class PerkAdmin(TranslationAdmin): model = Perk search_fields = ['name', 'long_name'] list_display = ['name', 'long_name', 'price', 'end_date', 'offer'] diff --git a/src/funding/locale/de/LC_MESSAGES/django.po b/src/funding/locale/de/LC_MESSAGES/django.po index 27333d35d..475cf33c4 100644 --- a/src/funding/locale/de/LC_MESSAGES/django.po +++ b/src/funding/locale/de/LC_MESSAGES/django.po @@ -17,19 +17,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -65,59 +65,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/en/LC_MESSAGES/django.po b/src/funding/locale/en/LC_MESSAGES/django.po index 87a9e470b..7ce9bd354 100644 --- a/src/funding/locale/en/LC_MESSAGES/django.po +++ b/src/funding/locale/en/LC_MESSAGES/django.po @@ -16,19 +16,19 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -64,59 +64,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/es/LC_MESSAGES/django.po b/src/funding/locale/es/LC_MESSAGES/django.po index 27333d35d..475cf33c4 100644 --- a/src/funding/locale/es/LC_MESSAGES/django.po +++ b/src/funding/locale/es/LC_MESSAGES/django.po @@ -17,19 +17,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -65,59 +65,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/fr/LC_MESSAGES/django.po b/src/funding/locale/fr/LC_MESSAGES/django.po index eb202fd94..41a23c7bb 100644 --- a/src/funding/locale/fr/LC_MESSAGES/django.po +++ b/src/funding/locale/fr/LC_MESSAGES/django.po @@ -17,19 +17,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -65,59 +65,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/it/LC_MESSAGES/django.po b/src/funding/locale/it/LC_MESSAGES/django.po index 27333d35d..475cf33c4 100644 --- a/src/funding/locale/it/LC_MESSAGES/django.po +++ b/src/funding/locale/it/LC_MESSAGES/django.po @@ -17,19 +17,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -65,59 +65,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/lt/LC_MESSAGES/django.po b/src/funding/locale/lt/LC_MESSAGES/django.po index a651373f9..10a3d20aa 100644 --- a/src/funding/locale/lt/LC_MESSAGES/django.po +++ b/src/funding/locale/lt/LC_MESSAGES/django.po @@ -18,19 +18,19 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -66,59 +66,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/pl/LC_MESSAGES/django.po b/src/funding/locale/pl/LC_MESSAGES/django.po index a5d8389c6..bf3a62e03 100644 --- a/src/funding/locale/pl/LC_MESSAGES/django.po +++ b/src/funding/locale/pl/LC_MESSAGES/django.po @@ -18,19 +18,19 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "płatność doszła do skutku" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "Tak" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "Nie" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "prezenty" @@ -71,59 +71,59 @@ msgstr "Minimalna kwota wpłaty to %(amount)s zł." msgid "This offer is out of date." msgstr "Ta zbiórka jest już nieaktywna." -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "autor" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "tytuł" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "slug" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "opis" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "kwota docelowa" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "początek" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "koniec" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "URL na Redakcji" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "Opublikowana książka." -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "Okładka" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "Ankieta" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "Wysłano powiadomienia przed końcem" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "Wysłano powiadomienia o zakończeniu" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "Podgląd okładki" diff --git a/src/funding/locale/ru/LC_MESSAGES/django.po b/src/funding/locale/ru/LC_MESSAGES/django.po index 89cc9d8cc..e29fcfb7c 100644 --- a/src/funding/locale/ru/LC_MESSAGES/django.po +++ b/src/funding/locale/ru/LC_MESSAGES/django.po @@ -18,19 +18,19 @@ msgstr "" "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" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -66,59 +66,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/locale/uk/LC_MESSAGES/django.po b/src/funding/locale/uk/LC_MESSAGES/django.po index 89cc9d8cc..e29fcfb7c 100644 --- a/src/funding/locale/uk/LC_MESSAGES/django.po +++ b/src/funding/locale/uk/LC_MESSAGES/django.po @@ -18,19 +18,19 @@ msgstr "" "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" -#: funding/admin.py:24 +#: funding/admin.py:27 msgid "payment complete" msgstr "" -#: funding/admin.py:29 funding/admin.py:46 +#: funding/admin.py:32 funding/admin.py:49 msgid "Yes" msgstr "" -#: funding/admin.py:30 funding/admin.py:47 +#: funding/admin.py:33 funding/admin.py:50 msgid "No" msgstr "" -#: funding/admin.py:41 funding/models.py:257 funding/models.py:275 +#: funding/admin.py:44 funding/models.py:257 funding/models.py:275 msgid "perks" msgstr "" @@ -66,59 +66,59 @@ msgstr "" msgid "This offer is out of date." msgstr "" -#: funding/models.py:25 +#: funding/models.py:26 msgid "author" msgstr "" -#: funding/models.py:26 +#: funding/models.py:27 msgid "title" msgstr "" -#: funding/models.py:27 +#: funding/models.py:28 msgid "slug" msgstr "" -#: funding/models.py:28 +#: funding/models.py:29 msgid "description" msgstr "" -#: funding/models.py:29 +#: funding/models.py:30 msgid "target" msgstr "" -#: funding/models.py:30 +#: funding/models.py:31 msgid "start" msgstr "" -#: funding/models.py:31 +#: funding/models.py:32 msgid "end" msgstr "" -#: funding/models.py:32 +#: funding/models.py:33 msgid "redakcja URL" msgstr "" -#: funding/models.py:33 +#: funding/models.py:34 msgid "Published book." msgstr "" -#: funding/models.py:34 +#: funding/models.py:35 msgid "Cover" msgstr "" -#: funding/models.py:35 +#: funding/models.py:36 msgid "Poll" msgstr "" -#: funding/models.py:37 +#: funding/models.py:38 msgid "Near-end notifications sent" msgstr "" -#: funding/models.py:38 +#: funding/models.py:39 msgid "End notifications sent" msgstr "" -#: funding/models.py:42 +#: funding/models.py:43 msgid "Cover preview" msgstr "" diff --git a/src/funding/migrations/0005_auto_20210120_1358.py b/src/funding/migrations/0005_auto_20210120_1358.py new file mode 100644 index 000000000..9f9ece168 --- /dev/null +++ b/src/funding/migrations/0005_auto_20210120_1358.py @@ -0,0 +1,148 @@ +# Generated by Django 2.2.16 on 2021-01-20 12:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('funding', '0004_auto_20190729_1450'), + ] + + operations = [ + migrations.AddField( + model_name='offer', + name='description_de', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_en', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_es', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_fr', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_it', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_lt', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_pl', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_ru', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='offer', + name='description_uk', + field=models.TextField(blank=True, null=True, verbose_name='description'), + ), + migrations.AddField( + model_name='perk', + name='long_name_de', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_en', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_es', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_fr', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_it', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_lt', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_pl', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_ru', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='long_name_uk', + field=models.CharField(max_length=255, null=True, verbose_name='long name'), + ), + migrations.AddField( + model_name='perk', + name='name_de', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_en', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_es', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_fr', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_it', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_lt', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_pl', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_ru', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + migrations.AddField( + model_name='perk', + name='name_uk', + field=models.CharField(max_length=255, null=True, verbose_name='name'), + ), + ] diff --git a/src/funding/models.py b/src/funding/models.py index 79385a20d..9907cd017 100644 --- a/src/funding/models.py +++ b/src/funding/models.py @@ -10,6 +10,7 @@ from django.db import models from django.dispatch import receiver from django.template.loader import render_to_string from django.urls import reverse +from django.utils.html import mark_safe from django.utils.timezone import utc from django.utils.translation import ugettext_lazy as _, override import getpaid @@ -38,9 +39,8 @@ class Offer(models.Model): notified_end = models.DateTimeField(_('End notifications sent'), blank=True, null=True) def cover_img_tag(self): - return '' % self.cover.url + return mark_safe('' % self.cover.url) cover_img_tag.short_description = _('Cover preview') - cover_img_tag.allow_tags = True class Meta: verbose_name = _('offer') diff --git a/src/funding/translation.py b/src/funding/translation.py new file mode 100644 index 000000000..f8d6c0f4f --- /dev/null +++ b/src/funding/translation.py @@ -0,0 +1,20 @@ +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# + +from modeltranslation.translator import translator, TranslationOptions +from . import models + + +class OfferTranslationOptions(TranslationOptions): + fields = ('description',) + + +translator.register(models.Offer, OfferTranslationOptions) + + +class PerkTranslationOptions(TranslationOptions): + fields = ('name', 'long_name') + + +translator.register(models.Perk, PerkTranslationOptions) diff --git a/src/wolnelektury/locale/de/LC_MESSAGES/django.po b/src/wolnelektury/locale/de/LC_MESSAGES/django.po index 07cf97e11..e59c2167f 100644 --- a/src/wolnelektury/locale/de/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/de/LC_MESSAGES/django.po @@ -168,7 +168,7 @@ msgid "Register" msgstr "Registrieren" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/en/LC_MESSAGES/django.po b/src/wolnelektury/locale/en/LC_MESSAGES/django.po index aef2bb6e3..9256ca6d9 100644 --- a/src/wolnelektury/locale/en/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/en/LC_MESSAGES/django.po @@ -166,7 +166,7 @@ msgid "Register" msgstr "Register" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/es/LC_MESSAGES/django.po b/src/wolnelektury/locale/es/LC_MESSAGES/django.po index 5d054b502..08f5b0184 100644 --- a/src/wolnelektury/locale/es/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/es/LC_MESSAGES/django.po @@ -165,7 +165,7 @@ msgid "Register" msgstr "Registrarse" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/fr/LC_MESSAGES/django.po b/src/wolnelektury/locale/fr/LC_MESSAGES/django.po index 53d8e6bc5..09eeb7dd1 100644 --- a/src/wolnelektury/locale/fr/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/fr/LC_MESSAGES/django.po @@ -167,7 +167,7 @@ msgid "Register" msgstr "Inscrivez-vous" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/it/LC_MESSAGES/django.po b/src/wolnelektury/locale/it/LC_MESSAGES/django.po index 9b4ad7066..32034f0f2 100644 --- a/src/wolnelektury/locale/it/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/it/LC_MESSAGES/django.po @@ -167,7 +167,7 @@ msgid "Register" msgstr "Registrati" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/lt/LC_MESSAGES/django.po b/src/wolnelektury/locale/lt/LC_MESSAGES/django.po index c58248e9c..72a761831 100644 --- a/src/wolnelektury/locale/lt/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/lt/LC_MESSAGES/django.po @@ -173,7 +173,7 @@ msgid "Register" msgstr "Registruotis " #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/pl/LC_MESSAGES/django.mo b/src/wolnelektury/locale/pl/LC_MESSAGES/django.mo index 5179fff4b35edb728189ccb0d6b5f3a7f8a0b745..97a72582bde74bd720b346bce96c5e7634eac077 100644 GIT binary patch delta 2284 zcmZwHdu$X%9KiA4T}y$sS1m>8QwOlN2rVr|z*4IqML-M4LxVApwOz{6>+R+Cu4jvS ziT+_ADkcjds6mY}h6JO@B`At9XpcnWBNB~7g~SIW2*KAM1WeTL?`|6tUt$U4%TH9=xNsr3Q6CYhrac$+fgY^H zUep(E#bVr!`r;uZY4R{?26m!mW_Qp&i2B^?LHh{m1aer#`0`cI;XLY!f5%$9611oC zR!wmoPQeajuCfAkpbe-K9SC#-)5u3MeCd0iLG8Z}bpnSlqboQ{Wd)9*Zbcb)^?^#% zl~$vsz5y+4LgpsB@Os>jy0=I03490FVK@7<68GRscnWokMo6b-Qsb#E^O9WSF!RF|LQ5SHPi_yx=Ph}^HePUL%T*RXGNl|NB47O5#rv=RA82VcxV zdQrD{OAYzgm8Q9%13ZQ&aTjVzA7meNru}#W4x#pc8k=!%aQ{7=M*9SkL^+L`>WkQf zQdf9?GwSmlLAx^(RC-V!Scf`rKXzdh^=Ek~@C52ae?+n@mr&2bUx8(G*8A0{TQUoE zVok_gq#H?=Y(||(#tkkEqrUJd)QP-+x{^0h&&2!4M{<1WgFm3A_WVf+j?VGsMb3ZKV4`ujgig?o}Rg&FU~F4`}n9+oqxhw~TIm0bzikr{=F zOh?XQezMC^)2xTMlhF6*BsG&HDu3AF-@^EEH?fG&+3I0q!TA*FzKxfuRP;|~DZzMh z3(-j2Md(4)qT8pLTuihQTILcQ4QbH^WnF>%LbRIEly(OfZ$(Y*O+*`U8=)!HvXam& z^b%_bElUXfxs4Z1>v&lhRBlGy)@8(OVl|=J)I9HLpw1?8?$?bk?#RnPNlg)0*SP9!$54owNNxIy(&4`;yn8xOK!X0+{ z?ZnoYHDu5BjMdlYregVCQFp+J(Y>^>*>jS1(4*BXrI*>}#H^_Cl6HKqiAQaVH}<(h z)RMMIZnw=gHyU-*PHf@;)x=O|_EJS%IMUwI*4{F|&9rxPE?AVER_TPo9i@J#YGL;1 zl-3E=Bi?9g&`Db{$2OyuMa6UZva@HWe;qDbAHx2xh_)vfW;J3JB;Uy z9q^0l=at`Yd-25R$PN>;JiopEWXSkM4GS_GtwGt8J2sNGyiqgg#*)_mEWF=kNZzLd zI#&LjCT;$^_SM#)Yg{jBC1Z{mOt^!rKH++!V+TxnByQ&(k2yQ?3r delta 1786 zcmYk+OH5Q(9LMoL<1h#o#1RWvMi2`E3Y{5IT0|5C>nozsng-J<3qocyP3ohIiW5zJ zB{eRtj~HB-Xh_qAi5cA(G)iN%4XLmAT0pc56Jlu71vO1W>i2i&EIgV2`P?)2%sJ=& z&$)B4{d8+;EF3&-lnq1~u_s{Giz7iQ%C3;vAJ~Jhv&=ej%*JUi$~BvfbMnlJu@(!k z4Y_5Tu@bv+8ulX}J4iKzKVr67%GS*=<6~V^Rk#D0%MRjvJcb(ZXDr04$j9zDAL7Tf zM_oJcf!TE01*i#&ku_T-&cr&@_{|t)ert0#zQq!5976qI0B7Mv)PUDeNx6v{_!ra@ z|BlMUsB8a?>Tmg(`?;uzOHlo4Q1@Ff#QfID#a!H|FR%}l(jroG~1yf4xb}o8w7t+^;aUMRv&G;9t#Z`=Y0gt0n zUdMjuNxHBRzeJ690yV)|)K;BG_4^5xxhr^=vousl{`PI1 zOd6DlTU1)ubL6-78nsn#QBPDz!{2LsM7t7|p-I%lQ&^6n(oFwqtf5_BO8(VhJ6|xT z?L;2d_MuXJ7#HF>)C9Lt6OOp{W9JyE|2S&mDQv-P_Em3HyK^UMoc*XRI-24_dwbS- z$#uAbTF?;kvBy+%@K4kNf*)ntGf)G~M=c2cv zVjVY5;7NRjI(&UpTF4P>K@YX}4^W5f6>7n6T>F32#JOxVN6I>h&j=MQSViM~PU!G9 z6D#!oYtT;#6=gzCv5aUVR2F6MYm(rX1=Q8V5<-(|i&R!-@J~Ny*-w2Ft|ivEdqQVK zWj*uz2aLtrDx#gxJFmY^Wrdf*FP~7yiPePulvH$ZRq8TWJ?b^o$tDSY(HY__`v0U$ zQJGVzAe6lX;ior>`k#Kk)VhZDt-)PaIhUgjp3cMuLT8|rSWI*fIy2gTl^7B6CPKwt ze@?ZxIH$?mR8++E*BJ7iP7kLibN&gW|I6zSc;Dy$J1dd2t%<&5MIu?TcXuM$*X*4t zsPgXR#=Oab;q=PF(m;N+J{qr&#Vcab=IGLNZ#a=PE#A\n" "Language-Team: \n" "Language: pl\n" @@ -17,7 +17,7 @@ msgstr "" "X-Translated-Using: django-rosetta 0.5.6\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.3\n" #: wolnelektury/templates/404.html:4 msgid "Page does not exist" @@ -33,7 +33,7 @@ msgid "" "correct address or go to " msgstr "" "Przepraszamy, ale ta strona nie istnieje. Sprawdź czy podałeś dobry adres, " -"lub przejdź do" +"lub przejdź do " #: wolnelektury/templates/404.html:12 msgid "main page" @@ -115,7 +115,17 @@ msgid "Logout" msgstr "Wyloguj" #: wolnelektury/templates/base/superbase.html:60 -#, python-format +#, fuzzy, python-format +#| msgid "" +#| "\n" +#| " %(c)s free reading you have right to\n" +#| " " +#| msgid_plural "" +#| "\n" +#| " %(c)s free readings you have right to\n" +#| " " msgid "" "\n" " %(c)s free reading you have strony logowania." #: wolnelektury/templates/socialaccount/signup.html:6 -#, fuzzy -#| msgid "Sign in" msgid "Signup" msgstr "Zaloguj się" #: wolnelektury/templates/socialaccount/signup.html:9 #: wolnelektury/templates/socialaccount/signup.html:25 -#, fuzzy -#| msgid "Sign in" msgid "Sign Up" msgstr "Zaloguj się" @@ -429,6 +433,8 @@ msgid "" "You are about to use your %(provider_name)s account to login to\n" "%(site_name)s. As a final step, please complete the following form:" msgstr "" +"Używasz konta %(provider_name)s do zalogowania się w \n" +"%(site_name)s. Jako ostatni krok, proszę wypełnij formularz:" #: wolnelektury/templates/user.html:5 wolnelektury/templates/user.html:9 msgid "User" @@ -452,11 +458,11 @@ msgstr "Wiadomość wysłana automatycznie. Prosimy nie odpowiadać." #: wolnelektury/utils.py:205 msgid "Yes" -msgstr "" +msgstr "Tak" #: wolnelektury/utils.py:206 msgid "No" -msgstr "" +msgstr "Nie" #: wolnelektury/views.py:86 wolnelektury/views.py:107 #, python-format diff --git a/src/wolnelektury/locale/ru/LC_MESSAGES/django.po b/src/wolnelektury/locale/ru/LC_MESSAGES/django.po index 204e07875..c794939fc 100644 --- a/src/wolnelektury/locale/ru/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/ru/LC_MESSAGES/django.po @@ -174,7 +174,7 @@ msgid "Register" msgstr "Зарегистроваться" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/locale/uk/LC_MESSAGES/django.po b/src/wolnelektury/locale/uk/LC_MESSAGES/django.po index 461a9f29d..be5fc298c 100644 --- a/src/wolnelektury/locale/uk/LC_MESSAGES/django.po +++ b/src/wolnelektury/locale/uk/LC_MESSAGES/django.po @@ -171,7 +171,7 @@ msgid "Register" msgstr "Зареєструватися" #: wolnelektury/templates/base/superbase.html:112 -msgid "Wesprzyj nas" +msgid "Support us" msgstr "" #: wolnelektury/templates/base/superbase.html:115 diff --git a/src/wolnelektury/templates/base/superbase.html b/src/wolnelektury/templates/base/superbase.html index b47f3a368..e079a8ec8 100644 --- a/src/wolnelektury/templates/base/superbase.html +++ b/src/wolnelektury/templates/base/superbase.html @@ -109,7 +109,7 @@