From 576c7f8755383c026a76a584842327b497b3d9e7 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Fri, 25 Mar 2022 20:58:04 +0100 Subject: [PATCH] fixed localization for buttons --- apps/nspanel-lovelace-ui/luibackend/pages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 5563102f..d2ca07b4 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -132,10 +132,11 @@ class LuiPagesGen(object): return f",text,{item},{icon_id},{icon_color},{name},{value}" if item_type in ["button", "input_button"]: icon_id = get_icon_id_ha("button", overwrite=icon) - return f",button,{item},{icon_id},17299,{name},PRESS" + text = get_translation(self._locale,"PRESS") + return f",button,{item},{icon_id},17299,{name},{text}" if item_type == "scene": icon_id = get_icon_id_ha("scene", overwrite=icon) - text = get_translation(self._locale,"PRESS") + text = get_translation(self._locale,"ACTIVATE") return f",button,{item},{icon_id},17299,{name},{text}"