From: Radek Czajka Date: Mon, 30 May 2022 09:29:21 +0000 (+0200) Subject: fixes X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/a4f5747875aa0fb598e69d2200ef431c2fb7f1e9?hp=e5c5ed9e0ce0a61414aadd6e4fdbbdd37058289c fixes --- diff --git a/src/cover/forms.py b/src/cover/forms.py index 550e4a5f..ee82a5af 100644 --- a/src/cover/forms.py +++ b/src/cover/forms.py @@ -102,7 +102,7 @@ class ReadonlyImageEditForm(ImageEditForm): class ImportForm(forms.Form): - source_url = forms.URLField(label=_('WikiCommons, MNW or Flickr URL')) + source_url = forms.URLField(label=_('WikiCommons, MNW, Flickr, RawPixel URL')) def clean_source_url(self): url = self.cleaned_data['source_url'] diff --git a/src/cover/locale/pl/LC_MESSAGES/django.mo b/src/cover/locale/pl/LC_MESSAGES/django.mo index 756253c1..319ea257 100644 Binary files a/src/cover/locale/pl/LC_MESSAGES/django.mo and b/src/cover/locale/pl/LC_MESSAGES/django.mo differ diff --git a/src/cover/locale/pl/LC_MESSAGES/django.po b/src/cover/locale/pl/LC_MESSAGES/django.po index 5418ccf5..cec2844a 100644 --- a/src/cover/locale/pl/LC_MESSAGES/django.po +++ b/src/cover/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-02-25 14:10+0100\n" +"PO-Revision-Date: 2022-05-30 11:26+0200\n" "Last-Translator: Radek Czajka \n" "Language-Team: \n" "Language: pl\n" @@ -18,57 +18,61 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 3.0\n" -#: cover/forms.py:34 cover/forms.py:44 +#: cover/forms.py:39 cover/forms.py:49 #, python-format msgid "Image already in repository." msgstr "Obraz jest już w repozytorium." -#: cover/forms.py:53 +#: cover/forms.py:63 msgid "No image specified" msgstr "Nie wskazano obrazu" -#: cover/forms.py:61 cover/forms.py:78 +#: cover/forms.py:71 cover/forms.py:88 #, python-format msgid "Image too small: %sx%s, minimal dimensions %sx%s" msgstr "Obraz za mały: %sx%s, minimalny rozmiar %sx%s" -#: cover/forms.py:95 -msgid "WikiCommons, MNW or Flickr URL" -msgstr "URL z WikiCommons, MNW albo Flickra" +#: cover/forms.py:105 +msgid "WikiCommons, MNW, Flickr, RawPixel URL" +msgstr "URL z WikiCommons, MNW, Flickra, RawPixel" -#: cover/models.py:23 +#: cover/models.py:25 msgid "title" msgstr "tytuł" -#: cover/models.py:24 +#: cover/models.py:26 msgid "author" msgstr "autor" -#: cover/models.py:25 +#: cover/models.py:27 msgid "license name" msgstr "nazwa licencji" -#: cover/models.py:26 +#: cover/models.py:28 msgid "license URL" msgstr "URL licencji" -#: cover/models.py:27 +#: cover/models.py:29 msgid "source URL" msgstr "URL źródła" -#: cover/models.py:28 +#: cover/models.py:30 msgid "image download URL" msgstr "URL pliku do pobrania" -#: cover/models.py:30 +#: cover/models.py:34 msgid "file" msgstr "plik" -#: cover/models.py:33 +#: cover/models.py:40 +msgid "file for use" +msgstr "plik do użycia" + +#: cover/models.py:48 msgid "cover image" msgstr "obrazek na okładkę" -#: cover/models.py:34 +#: cover/models.py:49 msgid "cover images" msgstr "obrazki na okładki" @@ -79,27 +83,23 @@ msgid "Add image" msgstr "Dodaj obrazek" #: cover/templates/cover/add_image.html:19 -msgid "Load from WikiCommons, MNW, Flickr" -msgstr "Pobierz z WikiCommons, MNW albo Flickra" +msgid "Load from WikiCommons, MNW, Flickr, RawPixel" +msgstr "Pobierz z WikiCommons, MNW, Flickra, RawPixel" #: cover/templates/cover/image_detail.html:6 #: cover/templates/cover/image_detail.html:9 msgid "Cover image" msgstr "Obrazek na okładkę" -#: cover/templates/cover/image_detail.html:25 -msgid "source" -msgstr "źródło" - -#: cover/templates/cover/image_detail.html:36 +#: cover/templates/cover/image_detail.html:30 msgid "Change" msgstr "Zmień" -#: cover/templates/cover/image_detail.html:42 +#: cover/templates/cover/image_detail.html:36 msgid "Used in:" msgstr "Użyte w:" -#: cover/templates/cover/image_detail.html:50 +#: cover/templates/cover/image_detail.html:44 msgid "None" msgstr "Brak" @@ -112,6 +112,9 @@ msgstr "Obrazki na okładki" msgid "Add new" msgstr "Dodaj nowy" +#~ msgid "source" +#~ msgstr "źródło" + #, fuzzy, python-format #~| msgid "Image already in repository." #~ msgid "Image already in repository" diff --git a/src/cover/migrations/0005_alter_image_download_url.py b/src/cover/migrations/0005_alter_image_download_url.py new file mode 100644 index 00000000..f32ae151 --- /dev/null +++ b/src/cover/migrations/0005_alter_image_download_url.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2022-05-30 11:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cover', '0004_populate_use_file'), + ] + + operations = [ + migrations.AlterField( + model_name='image', + name='download_url', + field=models.URLField(blank=True, max_length=4096, null=True, unique=True, verbose_name='image download URL'), + ), + ] diff --git a/src/cover/models.py b/src/cover/models.py index 45b5ff9e..33c5e738 100644 --- a/src/cover/models.py +++ b/src/cover/models.py @@ -27,7 +27,7 @@ class Image(models.Model): license_name = models.CharField(max_length=255, verbose_name=_('license name')) license_url = models.URLField(max_length=255, blank=True, verbose_name=_('license URL')) source_url = models.URLField(verbose_name=_('source URL'), null=True, blank=True) - download_url = models.URLField(unique=True, verbose_name=_('image download URL'), null=True, blank=True) + download_url = models.URLField(max_length=4096, unique=True, verbose_name=_('image download URL'), null=True, blank=True) file = models.ImageField( upload_to='cover/image', storage=OverwriteStorage(), diff --git a/src/cover/templates/cover/add_image.html b/src/cover/templates/cover/add_image.html index 092933e8..8cf5d86b 100644 --- a/src/cover/templates/cover/add_image.html +++ b/src/cover/templates/cover/add_image.html @@ -16,7 +16,7 @@ {% bootstrap_form ff %} {% buttons %} - + {% endbuttons %}
diff --git a/src/cover/templates/cover/image_detail.html b/src/cover/templates/cover/image_detail.html index ca273ed4..4b8f73f7 100644 --- a/src/cover/templates/cover/image_detail.html +++ b/src/cover/templates/cover/image_detail.html @@ -17,8 +17,6 @@ {% if object.license_url %}{% endif %} {{ object.license_name }} {% if object.license_url %}{% endif %} - -
{% trans "source" %}: {{ object.download_url }}