KUnitConversion

weight_per_area.cpp
1/*
2 * SPDX-FileCopyrightText: 2009 Petri Damstén <damu@iki.fi>
3 * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org>
4 * SPDX-FileCopyrightText: 2023 Nate Graham <nate@kde.org>
5 *
6 * SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8
9#include "weight_per_area_p.h"
10#include "unit.h"
11#include "unit_p.h"
12
13#include <KLocalizedString>
14
15namespace KUnitConversion
16{
17UnitCategory WeightPerArea::makeCategory()
18{
19 auto c = UnitCategoryPrivate::makeCategory(WeightPerAreaCategory, i18n("Weight per Area"), i18n("Weight per Area"));
20 auto d = UnitCategoryPrivate::get(c);
21 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (weight per area)", "%1 %2");
22
23 d->addCommonUnit(UnitPrivate::makeUnit(AreaCategory,
24 GramsPerSquareMeter,
25 1,
26 i18nc("area unit symbol", "g/m²"),
27 i18nc("unit description in lists", "grams per square meter"),
28 i18nc("unit synonyms for matching user input", "gsm;g/m;g/m2;gm2;grams per meter;grams per square meter;grams per meter²"),
29 symbolString,
30 ki18nc("amount in units (real)", "%1 grams per square meter"),
31 ki18ncp("amount in units (integer)", "%1 grams per square meter", "%1 grams per square meter")));
32
33 // source: https://www.ginifab.com/feeds/ozyd2_gm2/
34 d->addCommonUnit(UnitPrivate::makeUnit(AreaCategory,
35 OuncesPerSquareYard,
36 33.906,
37 i18nc("area unit symbol", "oz/yd²"),
38 i18nc("unit description in lists", "ounces per square yard"),
39 i18nc("unit synonyms for matching user input", "ozyd;ozyd2;oz/yd;oz/yd2;ounces per yard;ounces per square yard;ounces per yard²"),
40 symbolString,
41 ki18nc("amount in units (real)", "%1 ounces per square yard"),
42 ki18ncp("amount in units (integer)", "%1 ounces per square yard", "%1 ounces per square yard")));
43
44 return c;
45}
46
47} // 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.