Skip to content

Commit 1bb65f9

Browse files
committed
Remove legacy code, update language files
1 parent 02e1996 commit 1bb65f9

File tree

37 files changed

+1868
-1934
lines changed

37 files changed

+1868
-1934
lines changed

filer/admin/folderadmin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,6 @@ def resize_images(self, request, files_queryset, folders_queryset):
12881288
"breadcrumbs_action": _("Resize images"),
12891289
"to_resize": to_resize,
12901290
"resize_form": form,
1291-
"cmsplugin_enabled": 'cmsplugin_filer_image' in django_settings.INSTALLED_APPS,
12921291
"files_queryset": files_queryset,
12931292
"folders_queryset": folders_queryset,
12941293
"perms_lacking": perms_needed,

filer/admin/forms.py

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django import forms
2-
from django.conf import settings
32
from django.contrib.admin import widgets
43
from django.contrib.admin.helpers import AdminForm
54
from django.core.exceptions import ValidationError
@@ -58,23 +57,17 @@ def clean_rename_format(self):
5857

5958
class ResizeImagesForm(WithFieldsetMixin, forms.Form):
6059
fieldsets = ((None, {"fields": (
60+
"thumbnail_option",
6161
("width", "height"),
6262
("crop", "upscale"))}),)
6363

64-
if 'cmsplugin_filer_image' in settings.INSTALLED_APPS:
65-
thumbnail_option = models.ForeignKey(
66-
ThumbnailOption,
67-
null=True,
68-
blank=True,
69-
verbose_name=_("thumbnail option"),
70-
on_delete=models.CASCADE,
71-
).formfield()
72-
73-
def get_fieldsets(self):
74-
"""Updates the static fieldset by prepending thumbnail options"""
75-
fieldsets = super().get_fieldsets()
76-
fieldsets[0][1]["fields"] = ("thumbnail_option") + fieldsets[0][1]["fields"]
77-
return fieldsets
64+
thumbnail_option = models.ForeignKey(
65+
ThumbnailOption,
66+
null=True,
67+
blank=True,
68+
verbose_name=_("thumbnail option"),
69+
on_delete=models.CASCADE,
70+
).formfield()
7871

7972
width = models.PositiveIntegerField(_("width"), null=True, blank=True).formfield(widget=widgets.AdminIntegerFieldWidget)
8073
height = models.PositiveIntegerField(_("height"), null=True, blank=True).formfield(widget=widgets.AdminIntegerFieldWidget)
@@ -83,8 +76,5 @@ def get_fieldsets(self):
8376

8477
def clean(self):
8578
if not (self.cleaned_data.get('thumbnail_option') or ((self.cleaned_data.get('width') or 0) + (self.cleaned_data.get('height') or 0))):
86-
if 'cmsplugin_filer_image' in settings.INSTALLED_APPS:
87-
raise ValidationError(_('Thumbnail option or resize parameters must be choosen.'))
88-
else:
89-
raise ValidationError(_('Resize parameters must be choosen.'))
79+
raise ValidationError(_('Thumbnail option or resize parameters must be choosen.'))
9080
return self.cleaned_data

filer/locale/ar/LC_MESSAGES/django.po

Lines changed: 45 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: django Filer\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2023-07-31 22:21+0200\n"
12+
"POT-Creation-Date: 2023-09-20 10:11+0200\n"
1313
"PO-Revision-Date: 2012-07-13 15:50+0000\n"
1414
"Last-Translator: Angelo Dini <[email protected]>\n"
1515
"Language-Team: Arabic (http://app.transifex.com/divio/django-filer/language/"
@@ -33,21 +33,21 @@ msgstr ""
3333
msgid "Can't use this folder, Permission Denied. Please select another folder."
3434
msgstr ""
3535

36-
#: admin/fileadmin.py:47
36+
#: admin/fileadmin.py:49
3737
msgid "Advanced"
3838
msgstr ""
3939

40-
#: admin/fileadmin.py:162
40+
#: admin/fileadmin.py:164
4141
msgid "canonical URL"
4242
msgstr ""
4343

44-
#: admin/folderadmin.py:399 admin/folderadmin.py:570
44+
#: admin/folderadmin.py:411 admin/folderadmin.py:582
4545
msgid ""
4646
"Items must be selected in order to perform actions on them. No items have "
4747
"been changed."
4848
msgstr ""
4949

50-
#: admin/folderadmin.py:422
50+
#: admin/folderadmin.py:434
5151
#, python-format
5252
msgid "%(total_count)s selected"
5353
msgid_plural "All %(total_count)s selected"
@@ -58,175 +58,171 @@ msgstr[3] ""
5858
msgstr[4] ""
5959
msgstr[5] ""
6060

61-
#: admin/folderadmin.py:448
61+
#: admin/folderadmin.py:460
6262
#, python-format
6363
msgid "Directory listing for %(folder_name)s"
6464
msgstr ""
6565

66-
#: admin/folderadmin.py:463
66+
#: admin/folderadmin.py:475
6767
#, python-format
6868
msgid "0 of %(cnt)s selected"
6969
msgstr ""
7070

71-
#: admin/folderadmin.py:600
71+
#: admin/folderadmin.py:612
7272
msgid "No action selected."
7373
msgstr ""
7474

75-
#: admin/folderadmin.py:652
75+
#: admin/folderadmin.py:664
7676
#, python-format
7777
msgid "Successfully moved %(count)d files to clipboard."
7878
msgstr ""
7979

80-
#: admin/folderadmin.py:657
80+
#: admin/folderadmin.py:669
8181
msgid "Move selected files to clipboard"
8282
msgstr ""
8383

84-
#: admin/folderadmin.py:697
84+
#: admin/folderadmin.py:709
8585
#, python-format
8686
msgid "Successfully disabled permissions for %(count)d files."
8787
msgstr ""
8888

89-
#: admin/folderadmin.py:699
89+
#: admin/folderadmin.py:711
9090
#, python-format
9191
msgid "Successfully enabled permissions for %(count)d files."
9292
msgstr ""
9393

94-
#: admin/folderadmin.py:707
94+
#: admin/folderadmin.py:719
9595
msgid "Enable permissions for selected files"
9696
msgstr ""
9797

98-
#: admin/folderadmin.py:713
98+
#: admin/folderadmin.py:725
9999
msgid "Disable permissions for selected files"
100100
msgstr ""
101101

102-
#: admin/folderadmin.py:777
102+
#: admin/folderadmin.py:789
103103
#, python-format
104104
msgid "Successfully deleted %(count)d files and/or folders."
105105
msgstr ""
106106

107-
#: admin/folderadmin.py:782
107+
#: admin/folderadmin.py:794
108108
msgid "Cannot delete files and/or folders"
109109
msgstr ""
110110

111-
#: admin/folderadmin.py:784
111+
#: admin/folderadmin.py:796
112112
msgid "Are you sure?"
113113
msgstr ""
114114

115-
#: admin/folderadmin.py:790
115+
#: admin/folderadmin.py:802
116116
msgid "Delete files and/or folders"
117117
msgstr ""
118118

119-
#: admin/folderadmin.py:811
119+
#: admin/folderadmin.py:823
120120
msgid "Delete selected files and/or folders"
121121
msgstr ""
122122

123-
#: admin/folderadmin.py:918
123+
#: admin/folderadmin.py:930
124124
#, python-format
125125
msgid "Folders with names %s already exist at the selected destination"
126126
msgstr ""
127127

128-
#: admin/folderadmin.py:922
128+
#: admin/folderadmin.py:934
129129
#, python-format
130130
msgid ""
131131
"Successfully moved %(count)d files and/or folders to folder "
132132
"'%(destination)s'."
133133
msgstr ""
134134

135-
#: admin/folderadmin.py:930 admin/folderadmin.py:932
135+
#: admin/folderadmin.py:942 admin/folderadmin.py:944
136136
msgid "Move files and/or folders"
137137
msgstr ""
138138

139-
#: admin/folderadmin.py:947
139+
#: admin/folderadmin.py:959
140140
msgid "Move selected files and/or folders"
141141
msgstr ""
142142

143-
#: admin/folderadmin.py:1004
143+
#: admin/folderadmin.py:1016
144144
#, python-format
145145
msgid "Successfully renamed %(count)d files."
146146
msgstr ""
147147

148-
#: admin/folderadmin.py:1013 admin/folderadmin.py:1015
149-
#: admin/folderadmin.py:1030
148+
#: admin/folderadmin.py:1025 admin/folderadmin.py:1027
149+
#: admin/folderadmin.py:1042
150150
msgid "Rename files"
151151
msgstr ""
152152

153-
#: admin/folderadmin.py:1125
153+
#: admin/folderadmin.py:1137
154154
#, python-format
155155
msgid ""
156156
"Successfully copied %(count)d files and/or folders to folder "
157157
"'%(destination)s'."
158158
msgstr ""
159159

160-
#: admin/folderadmin.py:1143 admin/folderadmin.py:1145
160+
#: admin/folderadmin.py:1155 admin/folderadmin.py:1157
161161
msgid "Copy files and/or folders"
162162
msgstr ""
163163

164-
#: admin/folderadmin.py:1162
164+
#: admin/folderadmin.py:1174
165165
msgid "Copy selected files and/or folders"
166166
msgstr ""
167167

168-
#: admin/folderadmin.py:1267
168+
#: admin/folderadmin.py:1279
169169
#, python-format
170170
msgid "Successfully resized %(count)d images."
171171
msgstr ""
172172

173-
#: admin/folderadmin.py:1274 admin/folderadmin.py:1276
173+
#: admin/folderadmin.py:1286 admin/folderadmin.py:1288
174174
msgid "Resize images"
175175
msgstr ""
176176

177-
#: admin/folderadmin.py:1292
177+
#: admin/folderadmin.py:1303
178178
msgid "Resize selected images"
179179
msgstr ""
180180

181-
#: admin/forms.py:24
181+
#: admin/forms.py:25
182182
msgid "Suffix which will be appended to filenames of copied files."
183183
msgstr ""
184184

185-
#: admin/forms.py:31
185+
#: admin/forms.py:32
186186
#, python-format
187187
msgid ""
188188
"Suffix should be a valid, simple and lowercase filename part, like "
189189
"\"%(valid)s\"."
190190
msgstr ""
191191

192-
#: admin/forms.py:52
192+
#: admin/forms.py:53
193193
#, python-format
194194
msgid "Unknown rename format value key \"%(key)s\"."
195195
msgstr ""
196196

197-
#: admin/forms.py:54
197+
#: admin/forms.py:55
198198
#, python-format
199199
msgid "Invalid rename format: %(error)s."
200200
msgstr ""
201201

202-
#: admin/forms.py:64 models/thumbnailoptionmodels.py:37
202+
#: admin/forms.py:69 models/thumbnailoptionmodels.py:37
203203
msgid "thumbnail option"
204204
msgstr ""
205205

206-
#: admin/forms.py:67 models/thumbnailoptionmodels.py:15
206+
#: admin/forms.py:73 models/thumbnailoptionmodels.py:15
207207
msgid "width"
208208
msgstr ""
209209

210-
#: admin/forms.py:68 models/thumbnailoptionmodels.py:20
210+
#: admin/forms.py:74 models/thumbnailoptionmodels.py:20
211211
msgid "height"
212212
msgstr ""
213213

214-
#: admin/forms.py:69 models/thumbnailoptionmodels.py:25
214+
#: admin/forms.py:75 models/thumbnailoptionmodels.py:25
215215
msgid "crop"
216216
msgstr ""
217217

218-
#: admin/forms.py:70 models/thumbnailoptionmodels.py:30
218+
#: admin/forms.py:76 models/thumbnailoptionmodels.py:30
219219
msgid "upscale"
220220
msgstr ""
221221

222-
#: admin/forms.py:75
222+
#: admin/forms.py:80
223223
msgid "Thumbnail option or resize parameters must be choosen."
224224
msgstr ""
225225

226-
#: admin/forms.py:77
227-
msgid "Resize parameters must be choosen."
228-
msgstr ""
229-
230226
#: admin/imageadmin.py:18 admin/imageadmin.py:105
231227
msgid "Subject location"
232228
msgstr ""
@@ -733,21 +729,17 @@ msgstr ""
733729
msgid "The following images will be resized:"
734730
msgstr ""
735731

736-
#: templates/admin/filer/folder/choose_images_resize_options.html:33
732+
#: templates/admin/filer/folder/choose_images_resize_options.html:32
737733
msgid "Choose an existing thumbnail option or enter resize parameters:"
738734
msgstr ""
739735

740-
#: templates/admin/filer/folder/choose_images_resize_options.html:35
741-
msgid "Choose resize parameters:"
742-
msgstr ""
743-
744-
#: templates/admin/filer/folder/choose_images_resize_options.html:38
736+
#: templates/admin/filer/folder/choose_images_resize_options.html:36
745737
msgid ""
746738
"Warning: Images will be resized in-place and originals will be lost. Maybe "
747739
"first make a copy of them to retain the originals."
748740
msgstr ""
749741

750-
#: templates/admin/filer/folder/choose_images_resize_options.html:41
742+
#: templates/admin/filer/folder/choose_images_resize_options.html:39
751743
msgid "Resize"
752744
msgstr ""
753745

0 commit comments

Comments
 (0)