1/*
2 * SPDX-FileCopyrightText: 2018 João Netto <joaonetto901@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#include "permeability_p.h"
8#include "unit_p.h"
9
10#include <KLocalizedString>
11
12namespace KUnitConversion
13{
14UnitCategory Permeability::makeCategory()
15{
16 auto c = UnitCategoryPrivate::makeCategory(id: PermeabilityCategory, i18n("Permeability"), i18n("Permeability"));
17 auto d = UnitCategoryPrivate::get(category: c);
18 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (permeability)", "%1 %2");
19
20 d->addDefaultUnit(unit: UnitPrivate::makeUnit(categoryId: PermeabilityCategory,
21 id: Darcy,
22 multiplier: 1,
23 i18nc("volume unit symbol", "Darcy"),
24 i18nc("unit description in lists", "Darcy"),
25 i18nc("unit synonyms for matching user input", "Darcy;Darcys;Dar;Darc"),
26 symbolString,
27 ki18nc("amount in units (real)", "%1 Darcy"),
28 ki18ncp("amount in units (integer)", "%1 Darcy", "%1 Darcys")));
29
30 d->addCommonUnit(unit: UnitPrivate::makeUnit(categoryId: PermeabilityCategory,
31 id: MiliDarcy,
32 multiplier: 0.001,
33 i18nc("volume unit symbol", "mDarcy"),
34 i18nc("unit description in lists", "Milli-Darcy"),
35 i18nc("unit synonyms for matching user input", "Milli-Darcy;MilliDarcy;MilliDar;mDarcy;mDar;mDarc"),
36 symbolString,
37 ki18nc("amount in units (real)", "%1 Milli-Darcy"),
38 ki18ncp("amount in units (integer)", "%1 Milli-Darcy", "%1 Milli-Darcys")));
39
40 d->addCommonUnit(unit: UnitPrivate::makeUnit(categoryId: PermeabilityCategory,
41 id: PermeabilitySquareMicrometer,
42 multiplier: 0.9869233,
43 i18nc("volume unit symbol", "µm²"),
44 i18nc("unit description in lists", "squaremicrometers"),
45 i18nc("unit synonyms for matching user input", "Permeability;Pµm²;PSquare µm;squaremicrometers;Pµm^2"),
46 symbolString,
47 ki18nc("amount in units (real)", "%1 micrometers²"),
48 ki18ncp("amount in units (integer)", "%1 micrometer²", "%1 micrometers²")));
49
50 return c;
51}
52
53} // KUnitConversion namespace
54

source code of kunitconversion/src/permeability.cpp