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_conductivity_p.h"
0009 #include "unit_p.h"
0010 
0011 #include <KLocalizedString>
0012 
0013 namespace KUnitConversion
0014 {
0015 UnitCategory ThermalConductivity::makeCategory()
0016 {
0017     auto c = UnitCategoryPrivate::makeCategory(ThermalConductivityCategory, i18n("Thermal Conductivity"), i18n("Thermal Conductivity"));
0018     auto d = UnitCategoryPrivate::get(c);
0019     KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (thermal conductivity)", "%1 %2");
0020 
0021     d->addDefaultUnit(UnitPrivate::makeUnit(ThermalConductivityCategory,
0022                               WattPerMeterKelvin,
0023                               1,
0024                               i18nc("thermal conductivity unit symbol", "W/m·K"),
0025                               i18nc("unit description in lists", "watt per meter kelvin"),
0026                               i18nc("unit synonyms for matching user input", "watt per meter kelvin;watt per meter-kelvin;W/mK;W/m.K"),
0027                               symbolString,
0028                               ki18nc("amount in units (real)", "%1 watts per meter kelvin"),
0029                               ki18ncp("amount in units (integer)", "%1 watt per meter kelvin", "%1 watts per meter kelvin")));
0030 
0031     d->addCommonUnit(UnitPrivate::makeUnit(ThermalConductivityCategory,
0032                              BtuPerFootHourFahrenheit,
0033                              0.5779,
0034                              i18nc("thermal conductivity unit symbol", "Btu/ft·hr·°F"),
0035                              i18nc("unit description in lists", "btu per foot hour degree Fahrenheit"),
0036                              i18nc("unit synonyms for matching user input",
0037                                    "btu per foot hour degree Fahrenheit;btu per foot hour Fahrenheit;btu per foot-hour-Fahrenheit;Btu/ft-hr-F"),
0038                              symbolString,
0039                              ki18nc("amount in units (real)", "%1 btu per foot hour degree Fahrenheit"),
0040                              ki18ncp("amount in units (integer)", "%1 btu per foot hour degree Fahrenheit", "%1 btu per foot hour degree Fahrenheit")));
0041 
0042     d->addCommonUnit(UnitPrivate::makeUnit(ThermalConductivityCategory,
0043                              BtuPerSquareFootHourFahrenheitPerInch,
0044                              6.9348,
0045                              i18nc("thermal conductivity unit symbol", "Btu/ft²·hr·°F/in"),
0046                              i18nc("unit description in lists", "btu per square foot hour degree Fahrenheit per inch"),
0047                              i18nc("unit synonyms for matching user input",
0048                                    "btu per square foot hour degree Fahrenheit per inch;btu per foot squared hour Fahrenheit per inch;btu per sq "
0049                                    "foot-hour-Fahrenheit per inch;Btu/ft^2-hr-F/in"),
0050                              symbolString,
0051                              ki18nc("amount in units (real)", "%1 btu per square foot hour degree Fahrenheit per inch"),
0052                              ki18ncp("amount in units (integer)",
0053                                      "%1 btu per square foot hour degree Fahrenheit per inch",
0054                                      "%1 btu per square foot hour degree Fahrenheit per inch")));
0055 
0056     return c;
0057 }
0058 
0059 } // KUnitConversion namespace