1 | /* |
2 | * SPDX-FileCopyrightText: 2010 Petri Damstén <damu@iki.fi> |
3 | * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org> |
4 | * SPDX-FileCopyrightText: 2014 Garret Wassermann <gwasser@gmail.com> |
5 | * |
6 | * SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #include "thermal_flux_p.h" |
10 | #include "unit_p.h" |
11 | |
12 | #include <KLocalizedString> |
13 | |
14 | namespace KUnitConversion |
15 | { |
16 | UnitCategory ThermalFlux::makeCategory() |
17 | { |
18 | auto c = UnitCategoryPrivate::makeCategory(id: ThermalFluxCategory, i18n("Thermal Flux Density" ), i18n("Thermal Flux Density" )); |
19 | auto d = UnitCategoryPrivate::get(category: c); |
20 | KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (thermal flux density)" , "%1 %2" ); |
21 | |
22 | d->addDefaultUnit(unit: UnitPrivate::makeUnit(categoryId: ThermalFluxCategory, |
23 | id: WattPerSquareMeter, |
24 | multiplier: 1, |
25 | i18nc("thermal flux unit symbol" , "W/m²" ), |
26 | i18nc("unit description in lists" , "watt per square meter" ), |
27 | i18nc("unit synonyms for matching user input" , "watt per square meter;W/m2;W/m^2" ), |
28 | symbolString, |
29 | ki18nc("amount in units (real)" , "%1 watts per square meter" ), |
30 | ki18ncp("amount in units (integer)" , "%1 watt per square meter" , "%1 watts per square meter" ))); |
31 | |
32 | d->addCommonUnit(unit: UnitPrivate::makeUnit(categoryId: ThermalFluxCategory, |
33 | id: BtuPerHourPerSquareFoot, |
34 | multiplier: 0.3169986, |
35 | i18nc("thermal flux unit symbol" , "Btu/hr/ft²" ), |
36 | i18nc("unit description in lists" , "btu per hour per square foot" ), |
37 | i18nc("unit synonyms for matching user input" , "btu per hour per square foot;Btu/hr/ft2;Btu/hr/ft^2;Btu/ft^2/hr;Btu/ft2/hr" ), |
38 | symbolString, |
39 | ki18nc("amount in units (real)" , "%1 btu per hour per square foot" ), |
40 | ki18ncp("amount in units (integer)" , "%1 btu per hour per square foot" , "%1 btu per hour per square foot" ))); |
41 | |
42 | return c; |
43 | } |
44 | |
45 | } // KUnitConversion namespace |
46 | |