1 | /* |
2 | * SPDX-FileCopyrightText: 2010 Petri Damstén <damu@iki.fi> |
3 | * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org> |
4 | * |
5 | * SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #include "thermal_conductivity_p.h" |
9 | #include "unit_p.h" |
10 | |
11 | #include <KLocalizedString> |
12 | |
13 | namespace KUnitConversion |
14 | { |
15 | UnitCategory ThermalConductivity::makeCategory() |
16 | { |
17 | auto c = UnitCategoryPrivate::makeCategory(id: ThermalConductivityCategory, i18n("Thermal Conductivity" ), i18n("Thermal Conductivity" )); |
18 | auto d = UnitCategoryPrivate::get(category: c); |
19 | KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (thermal conductivity)" , "%1 %2" ); |
20 | |
21 | d->addDefaultUnit(unit: UnitPrivate::makeUnit(categoryId: ThermalConductivityCategory, |
22 | id: WattPerMeterKelvin, |
23 | multiplier: 1, |
24 | i18nc("thermal conductivity unit symbol" , "W/m·K" ), |
25 | i18nc("unit description in lists" , "watt per meter kelvin" ), |
26 | i18nc("unit synonyms for matching user input" , "watt per meter kelvin;watt per meter-kelvin;W/mK;W/m.K" ), |
27 | symbolString, |
28 | ki18nc("amount in units (real)" , "%1 watts per meter kelvin" ), |
29 | ki18ncp("amount in units (integer)" , "%1 watt per meter kelvin" , "%1 watts per meter kelvin" ))); |
30 | |
31 | d->addCommonUnit(unit: UnitPrivate::makeUnit(categoryId: ThermalConductivityCategory, |
32 | id: BtuPerFootHourFahrenheit, |
33 | multiplier: 0.5779, |
34 | i18nc("thermal conductivity unit symbol" , "Btu/ft·hr·°F" ), |
35 | i18nc("unit description in lists" , "btu per foot hour degree Fahrenheit" ), |
36 | i18nc("unit synonyms for matching user input" , |
37 | "btu per foot hour degree Fahrenheit;btu per foot hour Fahrenheit;btu per foot-hour-Fahrenheit;Btu/ft-hr-F" ), |
38 | symbolString, |
39 | ki18nc("amount in units (real)" , "%1 btu per foot hour degree Fahrenheit" ), |
40 | ki18ncp("amount in units (integer)" , "%1 btu per foot hour degree Fahrenheit" , "%1 btu per foot hour degree Fahrenheit" ))); |
41 | |
42 | d->addCommonUnit(unit: UnitPrivate::makeUnit(categoryId: ThermalConductivityCategory, |
43 | id: BtuPerSquareFootHourFahrenheitPerInch, |
44 | multiplier: 6.9348, |
45 | i18nc("thermal conductivity unit symbol" , "Btu/ft²·hr·°F/in" ), |
46 | i18nc("unit description in lists" , "btu per square foot hour degree Fahrenheit per inch" ), |
47 | i18nc("unit synonyms for matching user input" , |
48 | "btu per square foot hour degree Fahrenheit per inch;btu per foot squared hour Fahrenheit per inch;btu per sq " |
49 | "foot-hour-Fahrenheit per inch;Btu/ft^2-hr-F/in" ), |
50 | symbolString, |
51 | ki18nc("amount in units (real)" , "%1 btu per square foot hour degree Fahrenheit per inch" ), |
52 | ki18ncp("amount in units (integer)" , |
53 | "%1 btu per square foot hour degree Fahrenheit per inch" , |
54 | "%1 btu per square foot hour degree Fahrenheit per inch" ))); |
55 | |
56 | return c; |
57 | } |
58 | |
59 | } // KUnitConversion namespace |
60 | |