add updated beta locacles json

This commit is contained in:
Johannes Braun
2022-12-23 21:18:58 +01:00
parent ac2df9e431
commit 9fc6ccf901
2 changed files with 2472 additions and 15 deletions

View File

@@ -4,7 +4,6 @@ from collections import defaultdict
keys = {
'frontend.ui.card.light.brightness': 'lights.Brightness',
# 'frontend.ui.card.light.brightness': 'lights.Color',
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
'backend.component.binary_sensor.state.window.off': 'window.closed',
'backend.component.binary_sensor.state.window.on': 'window.opened',
@@ -16,6 +15,53 @@ keys = {
'frontend.ui.card.climate.currently': 'thermostat.Currently',
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
'frontend.ui.card.climate.operation': 'thermostat.Action',
'frontend.ui.card.button.press': 'button.press',
'frontend.ui.card.script.run': 'script.run',
'frontend.ui.card.scene.activate': 'scene.activate',
'frontend.ui.card.vacuum.actions.start_cleaning': 'vacuum.start_cleaning',
'frontend.ui.card.vacuum.actions.return_to_base': 'vacuum.return_to_base',
'frontend.ui.card.cover.tilt_position': 'blinds.tilt_position',
'frontend.ui.card.fan.speed': 'fan.speed',
'frontend.ui.card.timer.actions.start': 'timer.start',
'frontend.ui.card.timer.actions.pause': 'timer.pause',
'frontend.ui.card.timer.actions.cancel': 'timer.cancel',
'frontend.ui.card.timer.actions.finish': 'timer.finish',
'frontend.state_badge.alarm_control_panel.armed': 'alarm_control_panel.armed',
'frontend.state_badge.alarm_control_panel.armed_away': 'alarm_control_panel.armed_away',
'frontend.state_badge.alarm_control_panel.armed_custom_bypass': 'alarm_control_panel.armed_custom_bypass',
'frontend.state_badge.alarm_control_panel.armed_home': 'alarm_control_panel.armed_home',
'frontend.state_badge.alarm_control_panel.armed_night': 'alarm_control_panel.armed_night',
'frontend.state_badge.alarm_control_panel.armed_vacation': 'alarm_control_panel.armed_vacation',
'frontend.state_badge.alarm_control_panel.arming': 'alarm_control_panel.arming',
'frontend.state_badge.alarm_control_panel.disarmed': 'alarm_control_panel.disarmed',
'frontend.state_badge.alarm_control_panel.disarming': 'alarm_control_panel.disarming',
'frontend.state_badge.alarm_control_panel.pending': 'alarm_control_panel.pending',
'frontend.state_badge.alarm_control_panel.triggered': 'alarm_control_panel.triggered',
'frontend.state_attributes.climate.hvac_action.cooling': 'hvac_action.cooling',
'frontend.state_attributes.climate.hvac_action.drying': 'hvac_action.drying',
'frontend.state_attributes.climate.hvac_action.fan': 'hvac_action.fan',
'frontend.state_attributes.climate.hvac_action.heating': 'hvac_action.heating',
'frontend.state_attributes.climate.hvac_action.idle': 'hvac_action.idle',
'frontend.state_attributes.climate.hvac_action.off': 'hvac_action.off',
'frontend.ui.card.alarm_control_panel.arm_away': 'alarm_control_panel.arm_away',
'frontend.ui.card.alarm_control_panel.arm_custom_bypass': 'alarm_control_panel.arm_custom_bypass',
'frontend.ui.card.alarm_control_panel.arm_home': 'alarm_control_panel.arm_home',
'frontend.ui.card.alarm_control_panel.arm_night': 'alarm_control_panel.arm_night',
'frontend.ui.card.alarm_control_panel.arm_vacation': 'alarm_control_panel.arm_vacation',
'frontend.ui.card.alarm_control_panel.clear_code': 'alarm_control_panel.clear_code',
'frontend.ui.card.alarm_control_panel.code': 'alarm_control_panel.code',
'frontend.ui.card.alarm_control_panel.disarm': 'alarm_control_panel.disarm',
'backend.component.climate.state._.off': 'climate.off',
'backend.component.climate.state._.heat': 'climate.heat',
'backend.component.climate.state._.cool': 'climate.cool',
'backend.component.climate.state._.heat_cool': 'climate.heat_cool',
'backend.component.climate.state._.auto': 'climate.auto',
'backend.component.climate.state._.dry': 'climate.dry',
'backend.component.climate.state._.fan_only': 'climate.fan_only',
'backend.component.timer.state._.active': 'timer.active',
'backend.component.timer.state._.idle': 'timer.idle',
'backend.component.timer.state._.paused': 'timer.paused',
}
@@ -51,7 +97,8 @@ def lookup(path_frontend_file, path_backend_file, lookupstr):
if k in res:
res = res[k]
if type(res) is not str:
print("Warning result is not a String")
print(f"Warning result is not a String: {lookupstr}")
res = ""
return res
def get_translation(locale, lookupstr):
@@ -69,5 +116,5 @@ for src, dst in keys.items():
#print(json.dumps(out, indent=4, ensure_ascii=False))
with open("ioBroker_NSPanel_locales.json", "wb") as text_file:
with open("ioBroker_NSPanel_locales_beta.json", "wb") as text_file:
text_file.write(json.dumps(out, indent=4, ensure_ascii=False).encode('utf8'))

File diff suppressed because it is too large Load Diff