KUnitConversion

volume.cpp
1/*
2 * SPDX-FileCopyrightText: 2007-2009 Petri Damstén <damu@iki.fi>
3 * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#include "unit_p.h"
9#include "volume_p.h"
10
11#include <KLocalizedString>
12
13namespace KUnitConversion
14{
15
16UnitCategory Volume::makeCategory()
17{
18 auto c = UnitCategoryPrivate::makeCategory(VolumeCategory, i18n("Volume"), i18n("Volume"));
19 auto d = UnitCategoryPrivate::get(c);
20 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (volume)", "%1 %2");
21
22 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
23 CubicYottameter,
24 1e+72,
25 i18nc("volume unit symbol", "Ym³"),
26 i18nc("unit description in lists", "cubic yottameters"),
27 i18nc("unit synonyms for matching user input", "cubic yottameter;cubic yottameters;Ym³;Ym/-3;Ym^3;Ym3"),
28 symbolString,
29 ki18nc("amount in units (real)", "%1 cubic yottameters"),
30 ki18ncp("amount in units (integer)", "%1 cubic yottameter", "%1 cubic yottameters")));
31
32 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
33 CubicZettameter,
34 1e+63,
35 i18nc("volume unit symbol", "Zm³"),
36 i18nc("unit description in lists", "cubic zettameters"),
37 i18nc("unit synonyms for matching user input", "cubic zettameter;cubic zettameters;Zm³;Zm/-3;Zm^3;Zm3"),
38 symbolString,
39 ki18nc("amount in units (real)", "%1 cubic zettameters"),
40 ki18ncp("amount in units (integer)", "%1 cubic zettameter", "%1 cubic zettameters")));
41
42 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
43 CubicExameter,
44 1e+54,
45 i18nc("volume unit symbol", "Em³"),
46 i18nc("unit description in lists", "cubic exameters"),
47 i18nc("unit synonyms for matching user input", "cubic exameter;cubic exameters;Em³;Em/-3;Em^3;Em3"),
48 symbolString,
49 ki18nc("amount in units (real)", "%1 cubic exameters"),
50 ki18ncp("amount in units (integer)", "%1 cubic exameter", "%1 cubic exameters")));
51
52 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
53 CubicPetameter,
54 1e+45,
55 i18nc("volume unit symbol", "Pm³"),
56 i18nc("unit description in lists", "cubic petameters"),
57 i18nc("unit synonyms for matching user input", "cubic petameter;cubic petameters;Pm³;Pm/-3;Pm^3;Pm3"),
58 symbolString,
59 ki18nc("amount in units (real)", "%1 cubic petameters"),
60 ki18ncp("amount in units (integer)", "%1 cubic petameter", "%1 cubic petameters")));
61
62 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
63 CubicTerameter,
64 1e+36,
65 i18nc("volume unit symbol", "Tm³"),
66 i18nc("unit description in lists", "cubic terameters"),
67 i18nc("unit synonyms for matching user input", "cubic terameter;cubic terameters;Tm³;Tm/-3;Tm^3;Tm3"),
68 symbolString,
69 ki18nc("amount in units (real)", "%1 cubic terameters"),
70 ki18ncp("amount in units (integer)", "%1 cubic terameter", "%1 cubic terameters")));
71
72 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
73 CubicGigameter,
74 1e+27,
75 i18nc("volume unit symbol", "Gm³"),
76 i18nc("unit description in lists", "cubic gigameters"),
77 i18nc("unit synonyms for matching user input", "cubic gigameter;cubic gigameters;Gm³;Gm/-3;Gm^3;Gm3"),
78 symbolString,
79 ki18nc("amount in units (real)", "%1 cubic gigameters"),
80 ki18ncp("amount in units (integer)", "%1 cubic gigameter", "%1 cubic gigameters")));
81
82 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
83 CubicMegameter,
84 1e+18,
85 i18nc("volume unit symbol", "Mm³"),
86 i18nc("unit description in lists", "cubic megameters"),
87 i18nc("unit synonyms for matching user input", "cubic megameter;cubic megameters;Mm³;Mm/-3;Mm^3;Mm3"),
88 symbolString,
89 ki18nc("amount in units (real)", "%1 cubic megameters"),
90 ki18ncp("amount in units (integer)", "%1 cubic megameter", "%1 cubic megameters")));
91
92 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
93 CubicKilometer,
94 1e+09,
95 i18nc("volume unit symbol", "km³"),
96 i18nc("unit description in lists", "cubic kilometers"),
97 i18nc("unit synonyms for matching user input", "cubic kilometer;cubic kilometers;km³;km/-3;km^3;km3"),
98 symbolString,
99 ki18nc("amount in units (real)", "%1 cubic kilometers"),
100 ki18ncp("amount in units (integer)", "%1 cubic kilometer", "%1 cubic kilometers")));
101
102 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
103 CubicHectometer,
104 1e+06,
105 i18nc("volume unit symbol", "hm³"),
106 i18nc("unit description in lists", "cubic hectometers"),
107 i18nc("unit synonyms for matching user input", "cubic hectometer;cubic hectometers;hm³;hm/-3;hm^3;hm3"),
108 symbolString,
109 ki18nc("amount in units (real)", "%1 cubic hectometers"),
110 ki18ncp("amount in units (integer)", "%1 cubic hectometer", "%1 cubic hectometers")));
111
112 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
113 CubicDecameter,
114 1000,
115 i18nc("volume unit symbol", "dam³"),
116 i18nc("unit description in lists", "cubic decameters"),
117 i18nc("unit synonyms for matching user input", "cubic decameter;cubic decameters;dam³;dam/-3;dam^3;dam3"),
118 symbolString,
119 ki18nc("amount in units (real)", "%1 cubic decameters"),
120 ki18ncp("amount in units (integer)", "%1 cubic decameter", "%1 cubic decameters")));
121
122 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
123 CubicMeter,
124 1,
125 i18nc("volume unit symbol", "m³"),
126 i18nc("unit description in lists", "cubic meters"),
127 i18nc("unit synonyms for matching user input", "cubic meter;cubic meters;m³;m/-3;m^3;m3"),
128 symbolString,
129 ki18nc("amount in units (real)", "%1 cubic meters"),
130 ki18ncp("amount in units (integer)", "%1 cubic meter", "%1 cubic meters")));
131
132 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
133 CubicDecimeter,
134 0.001,
135 i18nc("volume unit symbol", "dm³"),
136 i18nc("unit description in lists", "cubic decimeters"),
137 i18nc("unit synonyms for matching user input", "cubic decimeter;cubic decimeters;dm³;dm/-3;dm^3;dm3"),
138 symbolString,
139 ki18nc("amount in units (real)", "%1 cubic decimeters"),
140 ki18ncp("amount in units (integer)", "%1 cubic decimeter", "%1 cubic decimeters")));
141
142 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
143 CubicCentimeter,
144 1e-06,
145 i18nc("volume unit symbol", "cm³"),
146 i18nc("unit description in lists", "cubic centimeters"),
147 i18nc("unit synonyms for matching user input", "cubic centimeter;cubic centimeters;cm³;cm/-3;cm^3;cm3"),
148 symbolString,
149 ki18nc("amount in units (real)", "%1 cubic centimeters"),
150 ki18ncp("amount in units (integer)", "%1 cubic centimeter", "%1 cubic centimeters")));
151
152 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
153 CubicMillimeter,
154 1e-09,
155 i18nc("volume unit symbol", "mm³"),
156 i18nc("unit description in lists", "cubic millimeters"),
157 i18nc("unit synonyms for matching user input", "cubic millimeter;cubic millimeters;mm³;mm/-3;mm^3;mm3"),
158 symbolString,
159 ki18nc("amount in units (real)", "%1 cubic millimeters"),
160 ki18ncp("amount in units (integer)", "%1 cubic millimeter", "%1 cubic millimeters")));
161
162 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
163 CubicMicrometer,
164 1e-18,
165 i18nc("volume unit symbol", "µm³"),
166 i18nc("unit description in lists", "cubic micrometers"),
167 i18nc("unit synonyms for matching user input", "cubic micrometer;cubic micrometers;µm³;um³;µm/-3;µm^3;µm3"),
168 symbolString,
169 ki18nc("amount in units (real)", "%1 cubic micrometers"),
170 ki18ncp("amount in units (integer)", "%1 cubic micrometer", "%1 cubic micrometers")));
171
172 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
173 CubicNanometer,
174 1e-27,
175 i18nc("volume unit symbol", "nm³"),
176 i18nc("unit description in lists", "cubic nanometers"),
177 i18nc("unit synonyms for matching user input", "cubic nanometer;cubic nanometers;nm³;nm/-3;nm^3;nm3"),
178 symbolString,
179 ki18nc("amount in units (real)", "%1 cubic nanometers"),
180 ki18ncp("amount in units (integer)", "%1 cubic nanometer", "%1 cubic nanometers")));
181
182 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
183 CubicPicometer,
184 1e-36,
185 i18nc("volume unit symbol", "pm³"),
186 i18nc("unit description in lists", "cubic picometers"),
187 i18nc("unit synonyms for matching user input", "cubic picometer;cubic picometers;pm³;pm/-3;pm^3;pm3"),
188 symbolString,
189 ki18nc("amount in units (real)", "%1 cubic picometers"),
190 ki18ncp("amount in units (integer)", "%1 cubic picometer", "%1 cubic picometers")));
191
192 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
193 CubicFemtometer,
194 1e-45,
195 i18nc("volume unit symbol", "fm³"),
196 i18nc("unit description in lists", "cubic femtometers"),
197 i18nc("unit synonyms for matching user input", "cubic femtometer;cubic femtometers;fm³;fm/-3;fm^3;fm3"),
198 symbolString,
199 ki18nc("amount in units (real)", "%1 cubic femtometers"),
200 ki18ncp("amount in units (integer)", "%1 cubic femtometer", "%1 cubic femtometers")));
201
202 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
203 CubicAttometer,
204 1e-54,
205 i18nc("volume unit symbol", "am³"),
206 i18nc("unit description in lists", "cubic attometers"),
207 i18nc("unit synonyms for matching user input", "cubic attometer;cubic attometers;am³;am/-3;am^3;am3"),
208 symbolString,
209 ki18nc("amount in units (real)", "%1 cubic attometers"),
210 ki18ncp("amount in units (integer)", "%1 cubic attometer", "%1 cubic attometers")));
211
212 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
213 CubicZeptometer,
214 1e-63,
215 i18nc("volume unit symbol", "zm³"),
216 i18nc("unit description in lists", "cubic zeptometers"),
217 i18nc("unit synonyms for matching user input", "cubic zeptometer;cubic zeptometers;zm³;zm/-3;zm^3;zm3"),
218 symbolString,
219 ki18nc("amount in units (real)", "%1 cubic zeptometers"),
220 ki18ncp("amount in units (integer)", "%1 cubic zeptometer", "%1 cubic zeptometers")));
221
222 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
223 CubicYoctometer,
224 1e-72,
225 i18nc("volume unit symbol", "ym³"),
226 i18nc("unit description in lists", "cubic yoctometers"),
227 i18nc("unit synonyms for matching user input", "cubic yoctometer;cubic yoctometers;ym³;ym/-3;ym^3;ym3"),
228 symbolString,
229 ki18nc("amount in units (real)", "%1 cubic yoctometers"),
230 ki18ncp("amount in units (integer)", "%1 cubic yoctometer", "%1 cubic yoctometers")));
231
232 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
233 Yottaliter,
234 1e+21,
235 i18nc("volume unit symbol", "Yl"),
236 i18nc("unit description in lists", "yottaliters"),
237 i18nc("unit synonyms for matching user input", "yottaliter;yottaliters;Yl"),
238 symbolString,
239 ki18nc("amount in units (real)", "%1 yottaliters"),
240 ki18ncp("amount in units (integer)", "%1 yottaliter", "%1 yottaliters")));
241
242 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
243 Zettaliter,
244 1e+18,
245 i18nc("volume unit symbol", "Zl"),
246 i18nc("unit description in lists", "zettaliters"),
247 i18nc("unit synonyms for matching user input", "zettaliter;zettaliters;Zl"),
248 symbolString,
249 ki18nc("amount in units (real)", "%1 zettaliters"),
250 ki18ncp("amount in units (integer)", "%1 zettaliter", "%1 zettaliters")));
251
252 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
253 Exaliter,
254 1e+15,
255 i18nc("volume unit symbol", "El"),
256 i18nc("unit description in lists", "exaliters"),
257 i18nc("unit synonyms for matching user input", "exaliter;exaliters;El"),
258 symbolString,
259 ki18nc("amount in units (real)", "%1 exaliters"),
260 ki18ncp("amount in units (integer)", "%1 exaliter", "%1 exaliters")));
261
262 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
263 Petaliter,
264 1e+12,
265 i18nc("volume unit symbol", "Pl"),
266 i18nc("unit description in lists", "petaliters"),
267 i18nc("unit synonyms for matching user input", "petaliter;petaliters;Pl"),
268 symbolString,
269 ki18nc("amount in units (real)", "%1 petaliters"),
270 ki18ncp("amount in units (integer)", "%1 petaliter", "%1 petaliters")));
271
272 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
273 Teraliter,
274 1e+09,
275 i18nc("volume unit symbol", "Tl"),
276 i18nc("unit description in lists", "teraliters"),
277 i18nc("unit synonyms for matching user input", "teraliter;teraliters;Tl"),
278 symbolString,
279 ki18nc("amount in units (real)", "%1 teraliters"),
280 ki18ncp("amount in units (integer)", "%1 teraliter", "%1 teraliters")));
281
282 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
283 Gigaliter,
284 1e+06,
285 i18nc("volume unit symbol", "Gl"),
286 i18nc("unit description in lists", "gigaliters"),
287 i18nc("unit synonyms for matching user input", "gigaliter;gigaliters;Gl"),
288 symbolString,
289 ki18nc("amount in units (real)", "%1 gigaliters"),
290 ki18ncp("amount in units (integer)", "%1 gigaliter", "%1 gigaliters")));
291
292 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
293 Megaliter,
294 1000,
295 i18nc("volume unit symbol", "Ml"),
296 i18nc("unit description in lists", "megaliters"),
297 i18nc("unit synonyms for matching user input", "megaliter;megaliters;Ml"),
298 symbolString,
299 ki18nc("amount in units (real)", "%1 megaliters"),
300 ki18ncp("amount in units (integer)", "%1 megaliter", "%1 megaliters")));
301
302 d->addDefaultUnit(UnitPrivate::makeUnit(VolumeCategory,
303 Kiloliter,
304 1,
305 i18nc("volume unit symbol", "kl"),
306 i18nc("unit description in lists", "kiloliters"),
307 i18nc("unit synonyms for matching user input", "kiloliter;kiloliters;kl"),
308 symbolString,
309 ki18nc("amount in units (real)", "%1 kiloliters"),
310 ki18ncp("amount in units (integer)", "%1 kiloliter", "%1 kiloliters")));
311
312 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
313 Hectoliter,
314 0.1,
315 i18nc("volume unit symbol", "hl"),
316 i18nc("unit description in lists", "hectoliters"),
317 i18nc("unit synonyms for matching user input", "hectoliter;hectoliters;hl"),
318 symbolString,
319 ki18nc("amount in units (real)", "%1 hectoliters"),
320 ki18ncp("amount in units (integer)", "%1 hectoliter", "%1 hectoliters")));
321
322 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
323 Decaliter,
324 0.01,
325 i18nc("volume unit symbol", "dal"),
326 i18nc("unit description in lists", "decaliters"),
327 i18nc("unit synonyms for matching user input", "decaliter;decaliters;dal"),
328 symbolString,
329 ki18nc("amount in units (real)", "%1 decaliters"),
330 ki18ncp("amount in units (integer)", "%1 decaliter", "%1 decaliters")));
331
332 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
333 Liter,
334 0.001,
335 i18nc("volume unit symbol", "l"),
336 i18nc("unit description in lists", "liters"),
337 i18nc("unit synonyms for matching user input", "liter;liters;l"),
338 symbolString,
339 ki18nc("amount in units (real)", "%1 liters"),
340 ki18ncp("amount in units (integer)", "%1 liter", "%1 liters")));
341
342 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
343 Deciliter,
344 0.0001,
345 i18nc("volume unit symbol", "dl"),
346 i18nc("unit description in lists", "deciliters"),
347 i18nc("unit synonyms for matching user input", "deciliter;deciliters;dl"),
348 symbolString,
349 ki18nc("amount in units (real)", "%1 deciliters"),
350 ki18ncp("amount in units (integer)", "%1 deciliter", "%1 deciliters")));
351
352 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
353 Centiliter,
354 1e-05,
355 i18nc("volume unit symbol", "cl"),
356 i18nc("unit description in lists", "centiliters"),
357 i18nc("unit synonyms for matching user input", "centiliter;centiliters;cl"),
358 symbolString,
359 ki18nc("amount in units (real)", "%1 centiliters"),
360 ki18ncp("amount in units (integer)", "%1 centiliter", "%1 centiliters")));
361
362 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
363 Milliliter,
364 1e-06,
365 i18nc("volume unit symbol", "ml"),
366 i18nc("unit description in lists", "milliliters"),
367 i18nc("unit synonyms for matching user input", "milliliter;milliliters;ml"),
368 symbolString,
369 ki18nc("amount in units (real)", "%1 milliliters"),
370 ki18ncp("amount in units (integer)", "%1 milliliter", "%1 milliliters")));
371
372 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
373 Microliter,
374 1e-09,
375 i18nc("volume unit symbol", "µl"),
376 i18nc("unit description in lists", "microliters"),
377 i18nc("unit synonyms for matching user input", "microliter;microliters;µl;ul"),
378 symbolString,
379 ki18nc("amount in units (real)", "%1 microliters"),
380 ki18ncp("amount in units (integer)", "%1 microliter", "%1 microliters")));
381
382 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
383 Nanoliter,
384 1e-12,
385 i18nc("volume unit symbol", "nl"),
386 i18nc("unit description in lists", "nanoliters"),
387 i18nc("unit synonyms for matching user input", "nanoliter;nanoliters;nl"),
388 symbolString,
389 ki18nc("amount in units (real)", "%1 nanoliters"),
390 ki18ncp("amount in units (integer)", "%1 nanoliter", "%1 nanoliters")));
391
392 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
393 Picoliter,
394 1e-15,
395 i18nc("volume unit symbol", "pl"),
396 i18nc("unit description in lists", "picoliters"),
397 i18nc("unit synonyms for matching user input", "picoliter;picoliters;pl"),
398 symbolString,
399 ki18nc("amount in units (real)", "%1 picoliters"),
400 ki18ncp("amount in units (integer)", "%1 picoliter", "%1 picoliters")));
401
402 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
403 Femtoliter,
404 1e-18,
405 i18nc("volume unit symbol", "fl"),
406 i18nc("unit description in lists", "femtoliters"),
407 i18nc("unit synonyms for matching user input", "femtoliter;femtoliters;fl"),
408 symbolString,
409 ki18nc("amount in units (real)", "%1 femtoliters"),
410 ki18ncp("amount in units (integer)", "%1 femtoliter", "%1 femtoliters")));
411
412 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
413 Attoliter,
414 1e-21,
415 i18nc("volume unit symbol", "al"),
416 i18nc("unit description in lists", "attoliters"),
417 i18nc("unit synonyms for matching user input", "attoliter;attoliters;al"),
418 symbolString,
419 ki18nc("amount in units (real)", "%1 attoliters"),
420 ki18ncp("amount in units (integer)", "%1 attoliter", "%1 attoliters")));
421
422 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
423 Zeptoliter,
424 1e-24,
425 i18nc("volume unit symbol", "zl"),
426 i18nc("unit description in lists", "zeptoliters"),
427 i18nc("unit synonyms for matching user input", "zeptoliter;zeptoliters;zl"),
428 symbolString,
429 ki18nc("amount in units (real)", "%1 zeptoliters"),
430 ki18ncp("amount in units (integer)", "%1 zeptoliter", "%1 zeptoliters")));
431
432 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
433 Yoctoliter,
434 1e-27,
435 i18nc("volume unit symbol", "yl"),
436 i18nc("unit description in lists", "yoctoliters"),
437 i18nc("unit synonyms for matching user input", "yoctoliter;yoctoliters;yl"),
438 symbolString,
439 ki18nc("amount in units (real)", "%1 yoctoliters"),
440 ki18ncp("amount in units (integer)", "%1 yoctoliter", "%1 yoctoliters")));
441
442 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
443 CubicFoot,
444 0.0283168,
445 i18nc("volume unit symbol", "ft³"),
446 i18nc("unit description in lists", "cubic feet"),
447 i18nc("unit synonyms for matching user input", "cubic foot;cubic feet;ft³;cubic ft;cu foot;cu ft;cu feet;feet³"),
448 symbolString,
449 ki18nc("amount in units (real)", "%1 cubic feet"),
450 ki18ncp("amount in units (integer)", "%1 cubic foot", "%1 cubic feet")));
451
452 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
453 CubicInch,
454 1.63871e-05,
455 i18nc("volume unit symbol", "in³"),
456 i18nc("unit description in lists", "cubic inches"),
457 i18nc("unit synonyms for matching user input", "cubic inch;cubic inches;in³;cubic inch;cubic in;cu inches;cu inch;cu in;inch³"),
458 symbolString,
459 ki18nc("amount in units (real)", "%1 cubic inches"),
460 ki18ncp("amount in units (integer)", "%1 cubic inch", "%1 cubic inches")));
461
462 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
463 CubicMile,
464 4.16818e+09,
465 i18nc("volume unit symbol", "mi³"),
466 i18nc("unit description in lists", "cubic miles"),
467 i18nc("unit synonyms for matching user input", "cubic mile;cubic miles;mi³;cubic mile;cubic mi;cu miles;cu mile;cu mi;mile³"),
468 symbolString,
469 ki18nc("amount in units (real)", "%1 cubic miles"),
470 ki18ncp("amount in units (integer)", "%1 cubic mile", "%1 cubic miles")));
471
472 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
473 FluidOunce,
474 2.95735e-05,
475 i18nc("volume unit symbol", "fl.oz."),
476 i18nc("unit description in lists", "fluid ounces"),
477 i18nc("unit synonyms for matching user input", "fluid ounce;fluid ounces;fl.oz.;oz.fl.;oz. fl.;fl. oz.;fl oz;fluid ounce"),
478 symbolString,
479 ki18nc("amount in units (real)", "%1 fluid ounces"),
480 ki18ncp("amount in units (integer)", "%1 fluid ounce", "%1 fluid ounces")));
481
482 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
483 Cup,
484 0.000236588,
485 i18nc("volume unit symbol", "cp"),
486 i18nc("unit description in lists", "cups"),
487 i18nc("unit synonyms for matching user input", "cup;cups;cp"),
488 symbolString,
489 ki18nc("amount in units (real)", "%1 cups"),
490 ki18ncp("amount in units (integer)", "%1 cup", "%1 cups")));
491
492 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
493 Teaspoon,
494 0.000005, // FDA standard 5ml
495 i18nc("volume unit symbol", "tsp"),
496 i18nc("unit description in lists", "teaspoon"),
497 i18nc("unit synonyms for matching user input", "teaspoon;teaspoons;tsp;tsps"),
498 symbolString,
499 ki18nc("amount in units (real)", "%1 teaspoons"),
500 ki18ncp("amount in units (integer)", "%1 teaspoon", "%1 teaspoons")));
501
502 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
503 Tablespoon,
504 0.000015, // FDA standard 15ml
505 i18nc("volume unit symbol", "tbsp"),
506 i18nc("unit description in lists", "tablespoon"),
507 i18nc("unit synonyms for matching user input", "tablespoon;tablespoons;tbsp;tbsps"),
508 symbolString,
509 ki18nc("amount in units (real)", "%1 tablespoons"),
510 ki18ncp("amount in units (integer)", "%1 tablespoon", "%1 tablespoons")));
511
512 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
513 GallonUS,
514 0.00378541,
515 i18nc("volume unit symbol", "gal"),
516 i18nc("unit description in lists", "gallons (U.S. liquid)"),
517 i18nc("unit synonyms for matching user input", "gallon (U.S. liquid);gallons (U.S. liquid);gal;gallon;gallons"),
518 symbolString,
519 ki18nc("amount in units (real)", "%1 gallons (U.S. liquid)"),
520 ki18ncp("amount in units (integer)", "%1 gallon (U.S. liquid)", "%1 gallons (U.S. liquid)")));
521
522 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
523 GallonImperial,
524 0.00454609,
525 i18nc("volume unit symbol", "imp gal"),
526 i18nc("unit description in lists", "gallons (imperial)"),
527 i18nc("unit synonyms for matching user input",
528 "gallon (imperial);gallons (imperial);imp gal;imp gallon;imp gallons;imperial gal;imperial gallon;imperial gallons"),
529 symbolString,
530 ki18nc("amount in units (real)", "%1 gallons (imperial)"),
531 ki18ncp("amount in units (integer)", "%1 gallon (imperial)", "%1 gallons (imperial)")));
532
533 d->addCommonUnit(UnitPrivate::makeUnit(VolumeCategory,
534 PintImperial,
535 0.000568261,
536 i18nc("volume unit symbol", "pt"),
537 i18nc("unit description in lists", "pints (imperial)"),
538 i18nc("unit synonyms for matching user input", "pint (imperial);pints (imperial);pt;pint;pints;p"),
539 symbolString,
540 ki18nc("amount in units (real)", "%1 pints (imperial)"),
541 ki18ncp("amount in units (integer)", "%1 pint (imperial)", "%1 pints (imperial)")));
542
543 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
544 PintUS,
545 0.000473176,
546 i18nc("volume unit symbol", "US pt"),
547 i18nc("unit description in lists", "pints (U.S. liquid)"),
548 i18nc("unit synonyms for matching user input", "pint (U.S. liquid);pints (U.S. liquid);US pt;US pint;US pints;US p"),
549 symbolString,
550 ki18nc("amount in units (real)", "%1 pints (U.S. liquid)"),
551 ki18ncp("amount in units (integer)", "%1 pint (U.S. liquid)", "%1 pints (U.S. liquid)")));
552
553 d->addUnit(UnitPrivate::makeUnit(VolumeCategory,
554 OilBarrel,
555 0.158987294,
556 i18nc("volume unit symbol", "bbl"),
557 i18nc("unit description in lists", "oil barrels"),
558 i18nc("unit synonyms for matching user input", "oil barrels;oil barrel;bbl"),
559 symbolString,
560 ki18nc("amount in units (real)", "%1 oil barrels"),
561 ki18ncp("amount in units (integer)", "%1 oil barrel", "%1 oil barrels")));
562
563 return c;
564}
565
566} // KUnitConversion namespace
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural)
KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text)
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.