1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace kalanis\kw_images; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use kalanis\kw_images\Interfaces\IIMTranslations; |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class Translations |
11
|
|
|
* @package kalanis\kw_images |
12
|
|
|
*/ |
13
|
|
|
class Translations implements IIMTranslations |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* @return string |
17
|
|
|
* @codeCoverageIgnore |
18
|
|
|
*/ |
19
|
|
|
public function imGdLibNotPresent(): string |
20
|
|
|
{ |
21
|
|
|
return 'GD2 library is not present!'; |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @return string |
26
|
|
|
* @codeCoverageIgnore |
27
|
|
|
*/ |
28
|
|
|
public function imRotateLibNotPresent(): string |
29
|
|
|
{ |
30
|
|
|
return 'Libraries for rotation is not present!'; |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @return string |
35
|
|
|
* @codeCoverageIgnore |
36
|
|
|
*/ |
37
|
|
|
public function imImageMagicLibNotPresent(): string |
38
|
|
|
{ |
39
|
|
|
return 'ImageMagic not installed or too old!'; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return string |
44
|
|
|
* @codeCoverageIgnore |
45
|
|
|
*/ |
46
|
|
|
public function imCannotCreateFromResource(): string |
47
|
|
|
{ |
48
|
|
|
return 'Cannot create image from resource!'; |
49
|
|
|
} |
50
|
|
|
|
51
|
1 |
|
/** |
52
|
|
|
* @return string |
53
|
1 |
|
* @codeCoverageIgnore |
54
|
|
|
*/ |
55
|
|
|
public function imCannotSaveResource(): string |
56
|
2 |
|
{ |
57
|
|
|
return 'Cannot save image resource!'; |
58
|
2 |
|
} |
59
|
|
|
|
60
|
|
|
public function imUnknownMime(): string |
61
|
1 |
|
{ |
62
|
|
|
return 'Unknown mime class!'; |
63
|
1 |
|
} |
64
|
|
|
|
65
|
|
|
public function imUnknownType(string $type): string |
66
|
2 |
|
{ |
67
|
|
|
return sprintf('Unknown type *%s*', $type); |
68
|
2 |
|
} |
69
|
|
|
|
70
|
|
|
public function imWrongInstance(string $instance): string |
71
|
3 |
|
{ |
72
|
|
|
return sprintf('Wrong instance of *%s*, must be instance of \kalanis\kw_images\Graphics\Format\AFormat', $instance); |
73
|
3 |
|
} |
74
|
|
|
|
75
|
|
|
public function imWrongMime(string $mime): string |
76
|
|
|
{ |
77
|
|
|
return sprintf('Wrong file mime type - got *%s*', $mime); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function imSizesNotSet(): string |
81
|
|
|
{ |
82
|
|
|
return 'Sizes to compare are not set.'; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return string |
87
|
|
|
* @codeCoverageIgnore |
88
|
|
|
*/ |
89
|
|
|
public function imImageCannotResize(): string |
90
|
|
|
{ |
91
|
|
|
return 'Image cannot be resized!'; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return string |
96
|
|
|
* @codeCoverageIgnore |
97
|
|
|
*/ |
98
|
|
|
public function imImageCannotResample(): string |
99
|
|
|
{ |
100
|
|
|
return 'Image cannot be resampled!'; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return string |
105
|
|
|
* @codeCoverageIgnore |
106
|
|
|
*/ |
107
|
|
|
public function imImageCannotOrientate(): string |
108
|
|
|
{ |
109
|
|
|
return 'Image cannot be orientated!'; |
110
|
|
|
} |
111
|
|
|
|
112
|
1 |
|
/** |
113
|
|
|
* @return string |
114
|
1 |
|
* @codeCoverageIgnore |
115
|
|
|
*/ |
116
|
|
|
public function imImageCannotCreateEmpty(): string |
117
|
3 |
|
{ |
118
|
|
|
return 'Cannot create empty image!'; |
119
|
3 |
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
4 |
|
* @return string |
123
|
|
|
* @codeCoverageIgnore |
124
|
4 |
|
*/ |
125
|
|
|
public function imImageCannotGetSize(): string |
126
|
|
|
{ |
127
|
4 |
|
return 'Cannot get image size!'; |
128
|
|
|
} |
129
|
4 |
|
|
130
|
|
|
public function imImageLoadFirst(): string |
131
|
|
|
{ |
132
|
4 |
|
return 'You must load image first!'; |
133
|
|
|
} |
134
|
4 |
|
|
135
|
|
|
public function imDescCannotRemove(): string |
136
|
|
|
{ |
137
|
2 |
|
return 'Cannot remove description!'; |
138
|
|
|
} |
139
|
2 |
|
|
140
|
|
|
public function imDescCannotFind(): string |
141
|
|
|
{ |
142
|
2 |
|
return 'Cannot find that description.'; |
143
|
|
|
} |
144
|
2 |
|
|
145
|
|
|
public function imDescAlreadyExistsHere(): string |
146
|
|
|
{ |
147
|
2 |
|
return 'Description with the same name already exists here.'; |
148
|
|
|
} |
149
|
2 |
|
|
150
|
|
|
public function imDescCannotRemoveOld(): string |
151
|
|
|
{ |
152
|
2 |
|
return 'Cannot remove old description.'; |
153
|
|
|
} |
154
|
2 |
|
|
155
|
|
|
public function imDescCannotCopyBase(): string |
156
|
|
|
{ |
157
|
1 |
|
return 'Cannot copy base description.'; |
158
|
|
|
} |
159
|
1 |
|
|
160
|
|
|
public function imDescCannotMoveBase(): string |
161
|
|
|
{ |
162
|
1 |
|
return 'Cannot move base description.'; |
163
|
|
|
} |
164
|
1 |
|
|
165
|
|
|
public function imDescCannotRenameBase(): string |
166
|
|
|
{ |
167
|
3 |
|
return 'Cannot rename base description.'; |
168
|
|
|
} |
169
|
3 |
|
|
170
|
|
|
public function imDirThumbCannotRemove(): string |
171
|
|
|
{ |
172
|
10 |
|
return 'Cannot remove dir thumb!'; |
173
|
|
|
} |
174
|
10 |
|
|
175
|
|
|
public function imDirThumbCannotRemoveCurrent(): string |
176
|
|
|
{ |
177
|
5 |
|
return 'Cannot remove current thumb!'; |
178
|
|
|
} |
179
|
5 |
|
|
180
|
|
|
public function imImageSizeExists(): string |
181
|
|
|
{ |
182
|
10 |
|
return 'Cannot read file size. Exists?'; |
183
|
|
|
} |
184
|
10 |
|
|
185
|
|
|
public function imImageSizeTooLarge(): string |
186
|
|
|
{ |
187
|
10 |
|
return 'This image is too large to use.'; |
188
|
|
|
} |
189
|
10 |
|
|
190
|
|
|
public function imImageCannotFind(): string |
191
|
|
|
{ |
192
|
4 |
|
return 'Cannot find that image.'; |
193
|
|
|
} |
194
|
4 |
|
|
195
|
|
|
public function imImageCannotRemove(): string |
196
|
|
|
{ |
197
|
4 |
|
return 'Cannot remove image.'; |
198
|
|
|
} |
199
|
4 |
|
|
200
|
|
|
public function imImageAlreadyExistsHere(): string |
201
|
|
|
{ |
202
|
4 |
|
return 'Image with the same name already exists here.'; |
203
|
|
|
} |
204
|
4 |
|
|
205
|
|
|
public function imImageCannotRemoveOld(): string |
206
|
|
|
{ |
207
|
7 |
|
return 'Cannot remove old image.'; |
208
|
|
|
} |
209
|
7 |
|
|
210
|
|
|
public function imImageCannotCopyBase(): string |
211
|
|
|
{ |
212
|
5 |
|
return 'Cannot copy base image.'; |
213
|
|
|
} |
214
|
5 |
|
|
215
|
|
|
public function imImageCannotMoveBase(): string |
216
|
|
|
{ |
217
|
7 |
|
return 'Cannot move base image.'; |
218
|
|
|
} |
219
|
7 |
|
|
220
|
|
|
public function imImageCannotRenameBase(): string |
221
|
|
|
{ |
222
|
7 |
|
return 'Cannot rename base image.'; |
223
|
|
|
} |
224
|
7 |
|
|
225
|
|
|
public function imThumbCannotFind(): string |
226
|
|
|
{ |
227
|
1 |
|
return 'Cannot find that thumb.'; |
228
|
|
|
} |
229
|
1 |
|
|
230
|
|
|
public function imThumbCannotRemove(): string |
231
|
|
|
{ |
232
|
|
|
return 'Cannot remove thumb!'; |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
public function imThumbAlreadyExistsHere(): string |
236
|
|
|
{ |
237
|
|
|
return 'Thumb with the same name already exists here.'; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
public function imThumbCannotRemoveOld(): string |
241
|
|
|
{ |
242
|
|
|
return 'Cannot remove old thumb.'; |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
public function imThumbCannotGetBaseImage(): string |
246
|
|
|
{ |
247
|
|
|
return 'Cannot get base image.'; |
248
|
|
|
} |
249
|
|
|
|
250
|
3 |
|
/** |
251
|
|
|
* @return string |
252
|
3 |
|
* @codeCoverageIgnore failed local volume |
253
|
|
|
*/ |
254
|
|
|
public function imThumbCannotStoreTemporaryImage(): string |
255
|
3 |
|
{ |
256
|
|
|
return 'Cannot store temporary image.'; |
257
|
3 |
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
3 |
|
* @return string |
261
|
|
|
* @codeCoverageIgnore failed local volume |
262
|
3 |
|
*/ |
263
|
|
|
public function imThumbCannotLoadTemporaryImage(): string |
264
|
|
|
{ |
265
|
|
|
return 'Cannot load temporary image.'; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
public function imThumbCannotCopyBase(): string |
269
|
|
|
{ |
270
|
|
|
return 'Cannot copy base thumb.'; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
public function imThumbCannotMoveBase(): string |
274
|
|
|
{ |
275
|
|
|
return 'Cannot move base thumb.'; |
276
|
|
|
} |
277
|
|
|
|
278
|
|
|
public function imThumbCannotRenameBase(): string |
279
|
|
|
{ |
280
|
|
|
return 'Cannot rename base thumb.'; |
281
|
|
|
} |
282
|
|
|
} |
283
|
|
|
|