11#include <KLocalizedString>
13namespace KUnitConversion
15UnitCategory Density::makeCategory()
17 auto c = UnitCategoryPrivate::makeCategory(DensityCategory,
i18n(
"Density"),
i18n(
"Density"));
18 auto d = UnitCategoryPrivate::get(c);
21 d->addDefaultUnit(UnitPrivate::makeUnit(DensityCategory,
22 KilogramsPerCubicMeter,
24 i18nc(
"density unit symbol",
"kg/m³"),
25 i18nc(
"unit description in lists",
"kilograms per cubic meter"),
26 i18nc(
"unit synonyms for matching user input",
"kilogram per cubic meter;kilograms per cubic meter;kg/m³"),
28 ki18nc(
"amount in units (real)",
"%1 kilograms per cubic meter"),
29 ki18ncp(
"amount in units (integer)",
"%1 kilogram per cubic meter",
"%1 kilograms per cubic meter")));
32 d->addCommonUnit(UnitPrivate::makeUnit(DensityCategory,
35 i18nc(
"density unit symbol",
"kg/l"),
36 i18nc(
"unit description in lists",
"kilograms per liter"),
37 i18nc(
"unit synonyms for matching user input",
"kilogram per liter;kilograms per liter;kg/l"),
39 ki18nc(
"amount in units (real)",
"%1 kilograms per liter"),
40 ki18ncp(
"amount in units (integer)",
"%1 kilogram per liter",
"%1 kilograms per liter")));
42 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
45 i18nc(
"density unit symbol",
"g/l"),
46 i18nc(
"unit description in lists",
"grams per liter"),
47 i18nc(
"unit synonyms for matching user input",
"gram per liter;grams per liter;g/l"),
49 ki18nc(
"amount in units (real)",
"%1 grams per liter"),
50 ki18ncp(
"amount in units (integer)",
"%1 gram per liter",
"%1 grams per liter")));
52 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
55 i18nc(
"density unit symbol",
"g/ml"),
56 i18nc(
"unit description in lists",
"grams per milliliter"),
57 i18nc(
"unit synonyms for matching user input",
"gram per milliliter;grams per milliliter;g/ml"),
59 ki18nc(
"amount in units (real)",
"%1 grams per milliliter"),
60 ki18ncp(
"amount in units (integer)",
"%1 gram per milliliter",
"%1 grams per milliliter")));
63 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
66 i18nc(
"density unit symbol",
"oz/in³"),
67 i18nc(
"unit description in lists",
"ounces per cubic inch"),
68 i18nc(
"unit synonyms for matching user input",
"ounce per cubic inch;ounces per cubic inch;oz/in³"),
70 ki18nc(
"amount in units (real)",
"%1 ounces per cubic inch"),
71 ki18ncp(
"amount in units (integer)",
"%1 ounce per cubic inch",
"%1 ounces per cubic inch")));
73 d->addCommonUnit(UnitPrivate::makeUnit(DensityCategory,
76 i18nc(
"density unit symbol",
"oz/ft³"),
77 i18nc(
"unit description in lists",
"ounces per cubic foot"),
78 i18nc(
"unit synonyms for matching user input",
"ounce per cubic foot;ounces per cubic foot;oz/ft³"),
80 ki18nc(
"amount in units (real)",
"%1 ounces per cubic foot"),
81 ki18ncp(
"amount in units (integer)",
"%1 ounce per cubic foot",
"%1 ounces per cubic foot")));
83 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
86 i18nc(
"density unit symbol",
"lb/in³"),
87 i18nc(
"unit description in lists",
"pounds per cubic inch"),
88 i18nc(
"unit synonyms for matching user input",
"pound per cubic inch;pounds per cubic inch;lb/in³"),
90 ki18nc(
"amount in units (real)",
"%1 pounds per cubic inch"),
91 ki18ncp(
"amount in units (integer)",
"%1 pound per cubic inch",
"%1 pounds per cubic inch")));
93 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
96 i18nc(
"density unit symbol",
"lb/ft³"),
97 i18nc(
"unit description in lists",
"pounds per cubic foot"),
98 i18nc(
"unit synonyms for matching user input",
"pound per cubic foot;pounds per cubic foot;lb/ft³"),
100 ki18nc(
"amount in units (real)",
"%1 pounds per cubic foot"),
101 ki18ncp(
"amount in units (integer)",
"%1 pound per cubic foot",
"%1 pounds per cubic foot")));
103 d->addUnit(UnitPrivate::makeUnit(DensityCategory,
106 i18nc(
"density unit symbol",
"lb/yd³"),
107 i18nc(
"unit description in lists",
"pounds per cubic yard"),
108 i18nc(
"unit synonyms for matching user input",
"pound per cubic yard;pounds per cubic yard;lb/yd³"),
110 ki18nc(
"amount in units (real)",
"%1 pounds per cubic yard"),
111 ki18ncp(
"amount in units (integer)",
"%1 pound per cubic yard",
"%1 pounds per cubic yard")));
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.