Add translation support
This commit is contained in:
23
custom_components/georide/.translations/en.json
Normal file
23
custom_components/georide/.translations/en.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"title": "Georide",
|
||||||
|
"step": {
|
||||||
|
"user": {
|
||||||
|
"title": "Set up Georide",
|
||||||
|
"description": "Are you sure you want to set up Georide?",
|
||||||
|
"data": {
|
||||||
|
"email": "email",
|
||||||
|
"password": "password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"abort": {
|
||||||
|
"one_instance_allowed": "Only a single instance is allowed.",
|
||||||
|
"no_credential": "You need to add your credentails."
|
||||||
|
|
||||||
|
},
|
||||||
|
"create_entry": {
|
||||||
|
"default": "\n\nJust give your credentials"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,12 +14,12 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
from homeassistant.setup import async_when_setup
|
from homeassistant.setup import async_when_setup
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
|
||||||
CONF_EMAIL,
|
CONF_EMAIL,
|
||||||
CONF_PASSWORD,
|
CONF_PASSWORD,
|
||||||
TRACKER_ID
|
TRACKER_ID
|
||||||
)
|
)
|
||||||
|
|
||||||
|
DOMAIN = "georide"
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -63,6 +63,7 @@ async def async_setup_entry(hass, entry):
|
|||||||
password
|
password
|
||||||
)
|
)
|
||||||
hass.data[DOMAIN]["context"] = context
|
hass.data[DOMAIN]["context"] = context
|
||||||
|
""" hass.async_create_task(hass.config_entries.async_forward_entry_setup(entry, "device_tracker") ) """
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ from homeassistant import config_entries
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
|
||||||
from .const import DOMAIN, CONF_EMAIL, CONF_PASSWORD
|
from .const import CONF_EMAIL, CONF_PASSWORD
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
STEP_ID = 'user'
|
STEP_ID = 'user'
|
||||||
|
|
||||||
@config_entries.HANDLERS.register(DOMAIN)
|
@config_entries.HANDLERS.register("georide")
|
||||||
class GeorideConfigFlow(config_entries.ConfigFlow):
|
class GeorideConfigFlow(config_entries.ConfigFlow):
|
||||||
"""Georide config flow """
|
"""Georide config flow """
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
""" Georide const file """
|
""" Georide const file """
|
||||||
|
|
||||||
DOMAIN = "georide"
|
|
||||||
CONF_EMAIL = "email"
|
CONF_EMAIL = "email"
|
||||||
CONF_PASSWORD = "password"
|
CONF_PASSWORD = "password"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user