1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace kalanis\UploadPerPartes\Uploader; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use kalanis\UploadPerPartes\Interfaces\IUppTranslations; |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class Translations |
11
|
|
|
* @package kalanis\UploadPerPartes |
12
|
|
|
* Return translated quotes from backend |
13
|
|
|
* - necessary due many translation systems through web |
14
|
|
|
* For work extends this class and pass extension into your project |
15
|
|
|
*/ |
16
|
|
|
class Translations implements IUppTranslations |
17
|
|
|
{ |
18
|
1 |
|
public function uppBadResponse(string $responseType): string |
19
|
|
|
{ |
20
|
1 |
|
return 'Selected bad response type.'; |
21
|
|
|
} |
22
|
|
|
|
23
|
1 |
|
public function uppTargetNotSet(): string |
24
|
|
|
{ |
25
|
1 |
|
return 'The target is not set.'; |
26
|
|
|
} |
27
|
|
|
|
28
|
1 |
|
public function uppTargetIsWrong(string $url): string |
29
|
|
|
{ |
30
|
1 |
|
return sprintf('The target is set in a wrong way. Cannot determine it. *%s*', $url); |
31
|
|
|
} |
32
|
|
|
|
33
|
2 |
|
public function uppChecksumVariantIsWrong(string $variant): string |
34
|
|
|
{ |
35
|
2 |
|
return sprintf('The checksum is set in a wrong way. Cannot determine it. *%s*', $variant); |
36
|
|
|
} |
37
|
|
|
|
38
|
2 |
|
public function uppDecoderVariantIsWrong(string $variant): string |
39
|
|
|
{ |
40
|
2 |
|
return sprintf('The decoder is set in a wrong way. Cannot determine it. *%s*', $variant); |
41
|
|
|
} |
42
|
|
|
|
43
|
8 |
|
public function uppIncomingDataCannotDecode(): string |
44
|
|
|
{ |
45
|
8 |
|
return 'Cannot decode incoming data!'; |
46
|
|
|
} |
47
|
|
|
|
48
|
1 |
|
public function uppSentNameIsEmpty(): string |
49
|
|
|
{ |
50
|
1 |
|
return 'Sent file name is empty.'; |
51
|
|
|
} |
52
|
|
|
|
53
|
3 |
|
public function uppChecksumIsEmpty(): string |
54
|
|
|
{ |
55
|
3 |
|
return 'There is no data for checksum on storage.'; |
56
|
|
|
} |
57
|
|
|
|
58
|
1 |
|
public function uppDataEncoderVariantNotSet(): string |
59
|
|
|
{ |
60
|
1 |
|
return 'The driving data encoder variant is not set!'; |
61
|
|
|
} |
62
|
|
|
|
63
|
2 |
|
public function uppDataEncoderVariantIsWrong(string $variant): string |
64
|
|
|
{ |
65
|
2 |
|
return sprintf('The driving data encoder is set in a wrong way. Cannot determine it. *%s*', $variant); |
66
|
|
|
} |
67
|
|
|
|
68
|
1 |
|
public function uppDataModifierVariantNotSet(): string |
69
|
|
|
{ |
70
|
1 |
|
return 'The driving data modifier variant is not set!'; |
71
|
|
|
} |
72
|
|
|
|
73
|
2 |
|
public function uppDataModifierVariantIsWrong(string $variant): string |
74
|
|
|
{ |
75
|
2 |
|
return sprintf('The driving data modifier is set in a wrong way. Cannot determine it. *%s*', $variant); |
76
|
|
|
} |
77
|
|
|
|
78
|
1 |
|
public function uppKeyEncoderVariantNotSet(): string |
79
|
|
|
{ |
80
|
1 |
|
return 'The driving data key encoder variant is not set!'; |
81
|
|
|
} |
82
|
|
|
|
83
|
5 |
|
public function uppKeyEncoderVariantIsWrong(string $className): string |
84
|
|
|
{ |
85
|
5 |
|
return sprintf('The driving data key encoder variant is set in a wrong way. Cannot determine it. *%s*', $className); |
86
|
|
|
} |
87
|
|
|
|
88
|
1 |
|
public function uppKeyModifierVariantNotSet(): string |
89
|
|
|
{ |
90
|
1 |
|
return 'The driving data key modifier variant is not set!'; |
91
|
|
|
} |
92
|
|
|
|
93
|
2 |
|
public function uppKeyModifierVariantIsWrong(string $className): string |
94
|
|
|
{ |
95
|
2 |
|
return sprintf('The driving data key modifier variant is set in a wrong way. Cannot determine it. *%s*', $className); |
96
|
|
|
} |
97
|
|
|
|
98
|
1 |
|
public function uppDriveFileStorageNotSet(): string |
99
|
|
|
{ |
100
|
1 |
|
return 'The driving file storage is not set correctly!'; |
101
|
|
|
} |
102
|
|
|
|
103
|
1 |
|
public function uppDriveFileCannotRead(string $key): string |
104
|
|
|
{ |
105
|
1 |
|
return sprintf('Cannot read *%s* driving file from its storage.', $key); |
106
|
|
|
} |
107
|
|
|
|
108
|
3 |
|
public function uppDriveFileCannotWrite(string $key): string |
109
|
|
|
{ |
110
|
3 |
|
return sprintf('Cannot write *%s* driving file into its storage.', $key); |
111
|
|
|
} |
112
|
|
|
|
113
|
1 |
|
public function uppDriveFileAlreadyExists(string $driveFile): string |
114
|
|
|
{ |
115
|
1 |
|
return sprintf('The driving file *%s* already exists in storage.', $driveFile); |
116
|
|
|
} |
117
|
|
|
|
118
|
1 |
|
public function uppTempEncoderVariantNotSet(): string |
119
|
|
|
{ |
120
|
1 |
|
return 'The temporary storage encoder variant is not set!'; |
121
|
|
|
} |
122
|
|
|
|
123
|
2 |
|
public function uppTempEncoderVariantIsWrong(string $variant): string |
124
|
|
|
{ |
125
|
2 |
|
return sprintf('The temporary storage encoder variant is set in a wrong way. Cannot determine it. *%s*', $variant); |
126
|
|
|
} |
127
|
|
|
|
128
|
1 |
|
public function uppTempStorageNotSet(): string |
129
|
|
|
{ |
130
|
1 |
|
return 'The temporary storage is not set correctly!'; |
131
|
|
|
} |
132
|
|
|
|
133
|
1 |
|
public function uppFinalEncoderVariantNotSet(): string |
134
|
|
|
{ |
135
|
1 |
|
return 'The final storage encoder variant is not set!'; |
136
|
|
|
} |
137
|
|
|
|
138
|
2 |
|
public function uppFinalEncoderVariantIsWrong(string $variant): string |
139
|
|
|
{ |
140
|
2 |
|
return sprintf('The final storage encoder variant is set in a wrong way. Cannot determine it. *%s*', $variant); |
141
|
|
|
} |
142
|
|
|
|
143
|
1 |
|
public function uppFinalStorageNotSet(): string |
144
|
|
|
{ |
145
|
1 |
|
return 'The final storage is not set correctly!'; |
146
|
|
|
} |
147
|
|
|
|
148
|
2 |
|
public function uppCannotReadFile(string $location): string |
149
|
|
|
{ |
150
|
2 |
|
return sprintf('Cannot read file *%s*', $location); |
151
|
|
|
} |
152
|
|
|
|
153
|
6 |
|
public function uppCannotWriteFile(string $location): string |
154
|
|
|
{ |
155
|
6 |
|
return sprintf('Cannot write file *%s*', $location); |
156
|
|
|
} |
157
|
|
|
|
158
|
2 |
|
public function uppDriveFileCannotRemove(string $key): string |
159
|
|
|
{ |
160
|
2 |
|
return sprintf('Cannot remove drive file for upload *%s*', $key); |
161
|
|
|
} |
162
|
|
|
|
163
|
2 |
|
public function uppCannotRemoveData(string $location): string |
164
|
|
|
{ |
165
|
2 |
|
return sprintf('Cannot remove drive file for upload *%s*', $location); |
166
|
|
|
} |
167
|
|
|
|
168
|
1 |
|
public function uppCannotTruncateFile(string $location): string |
169
|
|
|
{ |
170
|
1 |
|
return sprintf('Cannot truncate file *%s*', $location); |
171
|
|
|
} |
172
|
|
|
|
173
|
1 |
|
public function uppSegmentOutOfBounds(int $segment): string |
174
|
|
|
{ |
175
|
1 |
|
return sprintf('Segment *%d* is out-of-bounds.', $segment); |
176
|
|
|
} |
177
|
|
|
} |
178
|
|
|
|