File indexing completed on 2024-04-21 03:58:31

0001 /*
0002  *   SPDX-FileCopyrightText: 2010 Petri Damstén <damu@iki.fi>
0003  *   SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org>
0004  *
0005  *   SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 #include "thermal_generation_p.h"
0009 #include "unit_p.h"
0010 
0011 #include <KLocalizedString>
0012 
0013 namespace KUnitConversion
0014 {
0015 UnitCategory ThermalGeneration::makeCategory()
0016 {
0017     auto c = UnitCategoryPrivate::makeCategory(ThermalGenerationCategory, i18n("Thermal Generation"), i18n("Thermal Generation"));
0018     auto d = UnitCategoryPrivate::get(c);
0019     KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (thermal generation)", "%1 %2");
0020 
0021     d->addDefaultUnit(UnitPrivate::makeUnit(ThermalGenerationCategory,
0022                               WattPerCubicMeter,
0023                               1,
0024                               i18nc("thermal generation unit symbol", "W/m³"),
0025                               i18nc("unit description in lists", "watt per cubic meter"),
0026                               i18nc("unit synonyms for matching user input", "watt per cubic meter;W/m3;W/m^3"),
0027                               symbolString,
0028                               ki18nc("amount in units (real)", "%1 watts per cubic meter"),
0029                               ki18ncp("amount in units (integer)", "%1 watt per cubic meter", "%1 watts per cubic meter")));
0030 
0031     d->addCommonUnit(UnitPrivate::makeUnit(ThermalGenerationCategory,
0032                              BtuPerHourPerCubicFoot,
0033                              0.09662,
0034                              i18nc("thermal generation unit symbol", "Btu/hr/ft³"),
0035                              i18nc("unit description in lists", "btu per hour per cubic foot"),
0036                              i18nc("unit synonyms for matching user input", "btu per hour per cubic foot;Btu/hr/ft3;Btu/hr/ft^3;Btu/ft^3/hr;Btu/ft3/hr"),
0037                              symbolString,
0038                              ki18nc("amount in units (real)", "%1 btu per hour per cubic foot"),
0039                              ki18ncp("amount in units (integer)", "%1 btu per hour per cubic foot", "%1 btu per hour per cubic foot")));
0040 
0041     return c;
0042 }
0043 
0044 } // KUnitConversion namespace