From 622c56b6a7c6566f69970b8a78c13007d2084ec2 Mon Sep 17 00:00:00 2001 From: Gautham Varma K Date: Sat, 17 Oct 2020 16:43:05 +0530 Subject: [PATCH] Use common strings in emulated roku (#41745) * Use common strings in emulated roku Replace IP and port with references from common strings * Update strings.json *Replace References in mix with sentence with their values. *Replace name_exists with already_configured * Replace references in config_flow --- homeassistant/components/emulated_roku/config_flow.py | 2 +- homeassistant/components/emulated_roku/strings.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/emulated_roku/config_flow.py b/homeassistant/components/emulated_roku/config_flow.py index 0f8a82fa8934..f002178b40a0 100644 --- a/homeassistant/components/emulated_roku/config_flow.py +++ b/homeassistant/components/emulated_roku/config_flow.py @@ -31,7 +31,7 @@ class EmulatedRokuFlowHandler(config_entries.ConfigFlow): name = user_input[CONF_NAME] if name in configured_servers(self.hass): - return self.async_abort(reason="name_exists") + return self.async_abort(reason="already_configured") return self.async_create_entry(title=name, data=user_input) diff --git a/homeassistant/components/emulated_roku/strings.json b/homeassistant/components/emulated_roku/strings.json index a47f3f9a2e75..ef05c1265cc8 100644 --- a/homeassistant/components/emulated_roku/strings.json +++ b/homeassistant/components/emulated_roku/strings.json @@ -1,14 +1,14 @@ { "title": "Emulated Roku", "config": { - "abort": { "name_exists": "Name already exists" }, + "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" }, "step": { "user": { "data": { - "advertise_ip": "Advertise IP", - "advertise_port": "Advertise port", - "host_ip": "Host IP", - "listen_port": "Listen port", + "advertise_ip": "Advertise IP Address", + "advertise_port": "Advertise Port", + "host_ip": "Host IP Address", + "listen_port": "Listen Port", "name": "[%key:common::config_flow::data::name%]", "upnp_bind_multicast": "Bind multicast (True/False)" },