mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
more welsh translations
This commit is contained in:
parent
ddb2ce88e7
commit
e17983da1a
12 changed files with 97 additions and 6 deletions
|
|
@ -16,8 +16,12 @@ class FloorAttributes(Definitions):
|
|||
WELSH_TEXT = {
|
||||
"(anheddiad arall islaw)": "(another dwelling below)",
|
||||
"solet, dim inswleiddio (rhagdybiaeth)": "solid, no insulation (assumed)",
|
||||
"solet, dim inswleiddio": "solid, no insulation)",
|
||||
"crog, dim inswleiddio (rhagdybiaeth)": "suspended, no insulation (assumed)",
|
||||
"(eiddo arall islaw)": "(other premises below)"
|
||||
"crog, dim inswleiddio": "suspended, no insulation",
|
||||
"(eiddo arall islaw)": "(other premises below)",
|
||||
"solet, inswleiddio cyfyngedig (rhagdybiaeth)": "solid, limited insulation (assumed)",
|
||||
"solet, inswleiddio cyfyngedig": "solid, limited insulation"
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ class HotWaterAttributes(Definitions):
|
|||
"bwyler/cylchredydd nwy": "gas boiler/circulator",
|
||||
"ogçör brif system, dim thermostat ar y silindr": "from main system, no cylinder thermostat",
|
||||
"twymwr tanddwr, an-frig": "electric immersion, off-peak",
|
||||
"ogçör brif system, gydag ynnigçör haul": "from main system, plus solar"
|
||||
"ogçör brif system, gydag ynnigçör haul": "from main system, plus solar",
|
||||
"twymwr tanddwr, tarriff safonol": "electric immersion, standard tariff"
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class MainHeatAttributes(Definitions):
|
|||
"micro-cogeneration",
|
||||
"solar assisted heat pump",
|
||||
"exhaust source heat pump",
|
||||
"community heat pump",
|
||||
]
|
||||
FUEL_TYPES = ["electric", "mains gas", "wood logs", "LPG", "coal", "oil", "wood pellets", "anthracite",
|
||||
"dual fuel mineral and wood", "smokeless fuel", "lpg"]
|
||||
|
|
@ -27,6 +28,8 @@ class MainHeatAttributes(Definitions):
|
|||
"st+¦r wresogyddion trydan": "electric storage heaters",
|
||||
"bwyler a rheiddiaduron, olew": "boiler and radiators, oil",
|
||||
"heat pumptrydan": "electric heat pump",
|
||||
"bwyler a rheiddiaduron, trydan": "boiler and radiators, electric",
|
||||
"bwyler a gwres dan y llawr, olew": "boiler and underfloor heating, oil"
|
||||
}
|
||||
|
||||
REMAP = {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class MainheatControlAttributes(Definitions):
|
|||
"rhaglennydd, dim thermostat ystafell": "programmer, no room thermostat",
|
||||
"rhaglennydd a thermostat ystafell": "programmer and room thermostat",
|
||||
"rheoligçör t+ól +ó llaw": "manual charge control",
|
||||
"rheolaeth amser a rheolaeth parthau tymheredd": "time and temperature zone control",
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ class RoofAttributes(Definitions):
|
|||
"ar oleddf, dim inswleiddio (rhagdybiaeth)": "pitched, no insulation (assumed)",
|
||||
"(annedd arall uwchben)": "(another dwelling above)",
|
||||
"yn wastad, inswleiddio cyfyngedig (rhagdybiaeth)": "Flat, limited insulation (assumed)",
|
||||
"yn wastad, inswleiddio cyfyngedig": "Flat, limited insulation",
|
||||
"ar oleddf, wedigçöi inswleiddio (rhagdybiaeth)": "pitched, insulated (assumed)",
|
||||
"ar oleddf, wedigçöi inswleiddio": "pitched, insulated",
|
||||
"(eiddo arall uwchben)": "(another dwelling above)"
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
@ -40,11 +44,15 @@ class RoofAttributes(Definitions):
|
|||
|
||||
insulation_thickness_match = re.search(r"(\d+ mm) o inswleiddio yn y llofft", self.description)
|
||||
|
||||
uvalue_search = re.search(r"trawsyriannedd thermol cyfartalog (\d+(\.\d+)?)\s*w/m-¦k", self.description)
|
||||
|
||||
# Step 2: Generalized translation with placeholder
|
||||
if insulation_thickness_match:
|
||||
insulation_thickness = insulation_thickness_match.group(1)
|
||||
self.description = self.description.replace(insulation_thickness_match.group(0), "")
|
||||
self.description = f"pitched, {insulation_thickness} loft insulation"
|
||||
elif uvalue_search:
|
||||
uvalue = uvalue_search.group(1)
|
||||
self.description = f"average thermal transmittance {uvalue} W/m-¦K"
|
||||
else:
|
||||
translation = self.WELSH_TEXT.get(self.description)
|
||||
if translation:
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ class WindowAttributes(Definitions):
|
|||
"gwydrau dwbl llawn": "full double glazing",
|
||||
"gwydrau dwbl rhannol": "partial double glazing",
|
||||
"gwydrau dwbl gan mwyaf": "Mostly double glazing",
|
||||
"gwydrau sengl": "single glazed",
|
||||
"ffenestri perfformiad uchel": "high performance glazing",
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -346,5 +346,8 @@ clean_floor_cases = [
|
|||
'thermal_transmittance_unit': None,
|
||||
'is_assumed': False, 'is_to_unheated_space': False, 'is_to_external_air': False, 'is_suspended': False,
|
||||
'is_solid': False, 'insulation_thickness': None,
|
||||
"another_property_below": True}
|
||||
"another_property_below": True},
|
||||
{'original_description': 'Solet, inswleiddio cyfyngedig (rhagdybiaeth)', 'thermal_transmittance': None,
|
||||
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
|
||||
'is_suspended': False, 'is_solid': True, 'insulation_thickness': 'below average', "another_property_below": False},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -151,4 +151,8 @@ hotwater_cases = [
|
|||
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
||||
'extra_features': 'plus solar', 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
|
||||
'assumed': False, "appliance": None},
|
||||
{'original_description': 'Twymwr tanddwr, tarriff safonol', 'heater_type': 'electric immersion',
|
||||
'system_type': None, 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None,
|
||||
'tariff_type': 'standard tariff', 'extra_features': None, 'chp_systems': None, 'distribution_system': None,
|
||||
'no_system_present': None, 'assumed': False, "appliance": None}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1154,4 +1154,53 @@ mainheat_cases = [
|
|||
'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False,
|
||||
"has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{"original_description": "Community heat pump, underfloor, Heat pump", 'has_radiators': False,
|
||||
'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False,
|
||||
'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False,
|
||||
'has_air_source_heat_pump': False, 'has_room_heaters': False, 'has_electric_storage_heaters': False,
|
||||
'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False,
|
||||
'has_community_scheme': False, 'has_ground_source_heat_pump': False, 'has_no_system_present': False,
|
||||
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric_heat_pump': False,
|
||||
'has_micro-cogeneration': False, 'has_solar_assisted_heat_pump': False, 'has_exhaust_source_heat_pump': False,
|
||||
'has_community_heat_pump': True, 'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False,
|
||||
'has_LPG': False, 'has_coal': False, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False,
|
||||
'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False,
|
||||
'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': True},
|
||||
{'original_description': 'Bwyler a rheiddiaduron, trydan', 'has_radiators': True, 'has_fan_coil_units': False,
|
||||
'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False,
|
||||
'has_pipes_in_concrete_slab': False, 'has_boiler': True, 'has_air_source_heat_pump': False,
|
||||
'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False,
|
||||
'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False,
|
||||
'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False,
|
||||
'has_water_source_heat_pump': False, 'has_electric': True, 'has_mains_gas': False, 'has_wood_logs': False,
|
||||
'has_LPG': False, 'has_coal': False, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False,
|
||||
'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False,
|
||||
'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False,
|
||||
"has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'Boiler and underfloor heating, oil', 'has_radiators': False, 'has_fan_coil_units': False,
|
||||
'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False,
|
||||
'has_pipes_in_concrete_slab': False, 'has_boiler': True, 'has_air_source_heat_pump': False,
|
||||
'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False,
|
||||
'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False,
|
||||
'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False,
|
||||
'has_water_source_heat_pump': False, 'has_electric_heat_pump': False, 'has_micro-cogeneration': False,
|
||||
'has_solar_assisted_heat_pump': False, 'has_exhaust_source_heat_pump': False, 'has_community_heat_pump': False,
|
||||
'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False,
|
||||
'has_oil': True, 'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': True},
|
||||
{'original_description': 'Bwyler a gwres dan y llawr, olew', 'has_radiators': False, 'has_fan_coil_units': False,
|
||||
'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False,
|
||||
'has_pipes_in_concrete_slab': False, 'has_boiler': True, 'has_air_source_heat_pump': False,
|
||||
'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False,
|
||||
'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False,
|
||||
'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False,
|
||||
'has_water_source_heat_pump': False, 'has_electric_heat_pump': False, 'has_micro-cogeneration': False,
|
||||
'has_solar_assisted_heat_pump': False, 'has_exhaust_source_heat_pump': False, 'has_community_heat_pump': False,
|
||||
'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False,
|
||||
'has_oil': True, 'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': True}
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -143,4 +143,8 @@ mainheat_control_cases = [
|
|||
{'original_description': 'RheoliGÇÖr t+ól +ó llaw', 'thermostatic_control': None,
|
||||
'charging_system': 'manual charge control', 'switch_system': None, 'no_control': None, 'dhw_control': None,
|
||||
'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None},
|
||||
{'original_description': 'Rheolaeth amser a rheolaeth parthau tymheredd',
|
||||
'thermostatic_control': 'time and temperature zone control', 'charging_system': None, 'switch_system': None,
|
||||
'no_control': None, 'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False,
|
||||
'auxiliary_systems': None, 'trvs': None},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -357,5 +357,13 @@ clean_roof_test_cases = [
|
|||
{'original_description': 'Yn wastad, inswleiddio cyfyngedig (rhagdybiaeth)', 'thermal_transmittance': None,
|
||||
'thermal_transmittance_unit': None, 'is_pitched': False, 'is_roof_room': False, 'is_loft': False, 'is_flat': True,
|
||||
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': True, 'has_dwelling_above': False, 'is_valid': True,
|
||||
'insulation_thickness': 'below average'}
|
||||
'insulation_thickness': 'below average'},
|
||||
{'original_description': 'Ar oleddf, wediGÇÖi inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
|
||||
'thermal_transmittance_unit': None, 'is_pitched': True, 'is_roof_room': False, 'is_loft': False, 'is_flat': False,
|
||||
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': True, 'has_dwelling_above': False, 'is_valid': True,
|
||||
'insulation_thickness': 'average'},
|
||||
{'original_description': '(eiddo arall uwchben)', 'thermal_transmittance': None,
|
||||
'thermal_transmittance_unit': None, 'is_pitched': False, 'is_roof_room': False, 'is_loft': False, 'is_flat': False,
|
||||
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': False, 'has_dwelling_above': True, 'is_valid': True,
|
||||
'insulation_thickness': None},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -41,5 +41,9 @@ windows_cases = [
|
|||
{'original_description': 'Gwydrau dwbl rhannol', 'has_glazing': True, 'glazing_coverage': 'partial',
|
||||
'glazing_type': 'double', 'no_data': False},
|
||||
{'original_description': 'Gwydrau dwbl gan mwyaf', 'has_glazing': True, 'glazing_coverage': 'most',
|
||||
'glazing_type': 'double', 'no_data': False}
|
||||
'glazing_type': 'double', 'no_data': False},
|
||||
{'original_description': 'Gwydrau sengl', 'has_glazing': True, 'glazing_coverage': 'full', 'glazing_type': 'single',
|
||||
'no_data': False},
|
||||
{'original_description': 'Ffenestri perfformiad uchel', 'has_glazing': True, 'glazing_coverage': 'full',
|
||||
'glazing_type': 'high performance', 'no_data': False},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue