Core POC support for polymer i18n (#6344)

* Core POC support for polymer i18n

* Add gulp to build_frontend

* Remove frontend build

* Updated translations format

* Eliminate translation namespace from panel names

* Only register translations path in dev mode
This commit is contained in:
Adam Mills 2017-10-27 00:46:21 -04:00 committed by Paulus Schoutsen
parent 9d0c2a8dae
commit 583e57042b
4 changed files with 6 additions and 4 deletions

View file

@ -276,9 +276,11 @@ def async_setup(hass, config):
if is_dev:
hass.http.register_static_path("/home-assistant-polymer", repo_path)
hass.http.register_static_path(
"/static/translations",
os.path.join(repo_path, "build/translations"))
sw_path = os.path.join(repo_path, "build/service_worker.js")
static_path = os.path.join(repo_path, 'hass_frontend')
else:
sw_path = os.path.join(frontend_path, "service_worker.js")
static_path = frontend_path

View file

@ -245,7 +245,7 @@ def async_setup(hass, config):
hass.http.register_view(HistoryPeriodView(filters))
yield from hass.components.frontend.async_register_built_in_panel(
'history', 'History', 'mdi:poll-box')
'history', 'history', 'mdi:poll-box')
return True

View file

@ -101,7 +101,7 @@ def setup(hass, config):
hass.http.register_view(LogbookView(config.get(DOMAIN, {})))
yield from hass.components.frontend.async_register_built_in_panel(
'logbook', 'Logbook', 'mdi:format-list-bulleted-type')
'logbook', 'logbook', 'mdi:format-list-bulleted-type')
hass.services.async_register(
DOMAIN, 'log', log_message, schema=LOG_MESSAGE_SCHEMA)

View file

@ -13,5 +13,5 @@ DOMAIN = 'map'
def async_setup(hass, config):
"""Register the built-in map panel."""
yield from hass.components.frontend.async_register_built_in_panel(
'map', 'Map', 'mdi:account-location')
'map', 'map', 'mdi:account-location')
return True