You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
array('{0} There are no apples|{1} There is one apple', 2),
174
+
array('{1} There is one apple|]1,Inf] There are %count% apples', 0),
175
+
array('{1} There is one apple|]2,Inf] There are %count% apples', 2),
176
+
array('{0} There are no apples|There is one apple', 2),
177
+
);
178
+
}
179
+
180
+
publicfunctiongetChooseTests()
181
+
{
182
+
returnarray(
183
+
array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0),
184
+
array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0),
185
+
array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0),
186
+
187
+
array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1),
188
+
189
+
array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10),
190
+
array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10),
191
+
array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10),
192
+
193
+
array('There are 0 apples', 'There is one apple|There are %count% apples', 0),
194
+
array('There is one apple', 'There is one apple|There are %count% apples', 1),
195
+
array('There are 10 apples', 'There is one apple|There are %count% apples', 10),
196
+
197
+
array('There are 0 apples', 'one: There is one apple|more: There are %count% apples', 0),
198
+
array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1),
199
+
array('There are 10 apples', 'one: There is one apple|more: There are %count% apples', 10),
200
+
201
+
array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0),
202
+
array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1),
203
+
array('There are 10 apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10),
204
+
205
+
array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0),
206
+
array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1),
207
+
208
+
// Indexed only tests which are Gettext PoFile* compatible strings.
209
+
array('There are 0 apples', 'There is one apple|There are %count% apples', 0),
210
+
array('There is one apple', 'There is one apple|There are %count% apples', 1),
211
+
array('There are 2 apples', 'There is one apple|There are %count% apples', 2),
212
+
213
+
// Tests for float numbers
214
+
array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7),
215
+
array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1),
216
+
array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7),
217
+
array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0),
218
+
array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0),
219
+
array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0),
220
+
221
+
// Test texts with new-lines
222
+
// with double-quotes and \n in id & double-quotes and actual newlines in text
223
+
array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a
224
+
new-line in it. Selector = 0.|{1}This is a text with a
225
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
226
+
new-line in it. Selector > 1.', 0),
227
+
// with double-quotes and \n in id and single-quotes and actual newlines in text
228
+
array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a
229
+
new-line in it. Selector = 0.|{1}This is a text with a
230
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
231
+
new-line in it. Selector > 1.', 1),
232
+
array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a
233
+
new-line in it. Selector = 0.|{1}This is a text with a
234
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
235
+
new-line in it. Selector > 1.', 5),
236
+
// with double-quotes and id split accros lines
237
+
array('This is a text with a
238
+
new-line in it. Selector = 1.', '{0}This is a text with a
239
+
new-line in it. Selector = 0.|{1}This is a text with a
240
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
241
+
new-line in it. Selector > 1.', 1),
242
+
// with single-quotes and id split accros lines
243
+
array('This is a text with a
244
+
new-line in it. Selector > 1.', '{0}This is a text with a
245
+
new-line in it. Selector = 0.|{1}This is a text with a
246
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
247
+
new-line in it. Selector > 1.', 5),
248
+
// with single-quotes and \n in text
249
+
array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0),
250
+
// with double-quotes and id split accros lines
251
+
array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1),
252
+
// esacape pipe
253
+
array('This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0),
254
+
// Empty plural set (2 plural forms) from a .PO file
255
+
array('', '|', 1),
256
+
// Empty plural set (3 plural forms) from a .PO file
0 commit comments