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