KUnitConversion

permeability.cpp
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(PermeabilityCategory, i18n("Permeability"), i18n("Permeability"));
17 auto d = UnitCategoryPrivate::get(c);
18 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (permeability)", "%1 %2");
19
20 d->addDefaultUnit(UnitPrivate::makeUnit(PermeabilityCategory,
21 Darcy,
22 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(UnitPrivate::makeUnit(PermeabilityCategory,
31 MiliDarcy,
32 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(UnitPrivate::makeUnit(PermeabilityCategory,
41 PermeabilitySquareMicrometer,
42 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
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 Fri Dec 13 2024 11:53:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.