mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-11 11:26:35 +00:00
Core config translations (#821)
* Config dashboard translations * Simplify config pages * Core/Core/Validation * Core/Core/Reloading * Core/Core/Server_Management * Core/Push_Notifications * Core/Translation * Core/Themes * Initial hassbian config translations * Switch to sentence cases
This commit is contained in:
parent
31bc099cef
commit
8649c5352b
@ -18,6 +18,7 @@ const outDir = workDir + '/output';
|
|||||||
// should mirror the fragment definitions in polymer.json, so that we load
|
// should mirror the fragment definitions in polymer.json, so that we load
|
||||||
// additional resources at equivalent points.
|
// additional resources at equivalent points.
|
||||||
const TRANSLATION_FRAGMENTS = [
|
const TRANSLATION_FRAGMENTS = [
|
||||||
|
'config',
|
||||||
'history',
|
'history',
|
||||||
'logbook',
|
'logbook',
|
||||||
'mailbox',
|
'mailbox',
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
icon='mdi:arrow-left'
|
icon='mdi:arrow-left'
|
||||||
on-tap='_backTapped'
|
on-tap='_backTapped'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
<div main-title>Automations</div>
|
<div main-title>[[localize('ui.panel.config.automation.caption')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -94,7 +94,12 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaAutomationPicker extends window.hassMixins.EventsMixin(Polymer.Element) {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
* @appliesMixin window.hassMixins.EventsMixin
|
||||||
|
*/
|
||||||
|
class HaAutomationPicker extends
|
||||||
|
window.hassMixins.LocalizeMixin(window.hassMixins.EventsMixin(Polymer.Element)) {
|
||||||
static get is() { return 'ha-automation-picker'; }
|
static get is() { return 'ha-automation-picker'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
<template is='dom-if' if='[[!showEditor]]'>
|
<template is='dom-if' if='[[!showEditor]]'>
|
||||||
<ha-automation-picker
|
<ha-automation-picker
|
||||||
|
hass='[[hass]]'
|
||||||
narrow='[[narrow]]'
|
narrow='[[narrow]]'
|
||||||
show-menu='[[showMenu]]'
|
show-menu='[[showMenu]]'
|
||||||
automations='[[automations]]'
|
automations='[[automations]]'
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||||
<link rel='import' href='../../../src/layouts/ha-app-layout.html'>
|
<link rel='import' href='../../../src/layouts/ha-app-layout.html'>
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
|
|
||||||
<link rel="import" href="./ha-config-section-core.html">
|
<link rel="import" href="./ha-config-section-core.html">
|
||||||
<!-- <link rel="import" href="./ha-config-section-group.html"> -->
|
<!-- <link rel="import" href="./ha-config-section-group.html"> -->
|
||||||
@ -38,7 +39,7 @@
|
|||||||
icon='mdi:arrow-left'
|
icon='mdi:arrow-left'
|
||||||
on-tap='_backTapped'
|
on-tap='_backTapped'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
<div main-title>General</div>
|
<div main-title>[[localize('ui.panel.config.core.caption')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -94,7 +95,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigCore extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigCore extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-core'; }
|
static get is() { return 'ha-config-core'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../../../src/components/buttons/ha-call-service-button.html">
|
<link rel="import" href="../../../src/components/buttons/ha-call-service-button.html">
|
||||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
|
|
||||||
<link rel="import" href="../ha-config-section.html">
|
<link rel="import" href="../ha-config-section.html">
|
||||||
|
|
||||||
@ -44,19 +45,23 @@
|
|||||||
<ha-config-section
|
<ha-config-section
|
||||||
is-wide='[[isWide]]'
|
is-wide='[[isWide]]'
|
||||||
>
|
>
|
||||||
<span slot='header'>Configuration and Server Control</span>
|
<span slot='header'>[[localize('ui.panel.config.core.section.core.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>[[localize('ui.panel.config.core.section.core.introduction')]]</span>
|
||||||
Changing your configuration can be a tiresome process. We know. This section will try to make your life a little bit easier.
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<paper-card heading='Configuration Validation'>
|
<paper-card heading="[[localize('ui.panel.config.core.section.core.validation.heading')]]">
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid.
|
[[localize('ui.panel.config.core.section.core.validation.introduction')]]
|
||||||
<template is='dom-if' if='[[!validateLog]]'>
|
<template is='dom-if' if='[[!validateLog]]'>
|
||||||
<div class='validate-container'>
|
<div class='validate-container'>
|
||||||
<template is='dom-if' if='[[!validating]]'>
|
<template is='dom-if' if='[[!validating]]'>
|
||||||
<div class='validate-result' id='result'>[[validateResult]]</div>
|
<template is='dom-if' if='[[isValid]]'>
|
||||||
<paper-button raised on-tap='validateConfig'>check config</paper-button>
|
<div class='validate-result' id='result'>
|
||||||
|
[[localize('ui.panel.config.core.section.core.validation.valid')]]
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<paper-button raised on-tap='validateConfig'>
|
||||||
|
[[localize('ui.panel.config.core.section.core.validation.check_config')]]
|
||||||
|
</paper-button>
|
||||||
</template>
|
</template>
|
||||||
<template is='dom-if' if='[[validating]]'>
|
<template is='dom-if' if='[[validating]]'>
|
||||||
<paper-spinner active></paper-spinner>
|
<paper-spinner active></paper-spinner>
|
||||||
@ -65,48 +70,56 @@
|
|||||||
</template>
|
</template>
|
||||||
<template is='dom-if' if='[[validateLog]]'>
|
<template is='dom-if' if='[[validateLog]]'>
|
||||||
<div class='config-invalid'>
|
<div class='config-invalid'>
|
||||||
<span class='text'>Configuration invalid.</span>
|
<span class='text'>
|
||||||
<paper-button raised on-tap='validateConfig'>check config</paper-button>
|
[[localize('ui.panel.config.core.section.core.validation.invalid')]]
|
||||||
|
</span>
|
||||||
|
<paper-button raised on-tap='validateConfig'>
|
||||||
|
[[localize('ui.panel.config.core.section.core.validation.check_config')]]
|
||||||
|
</paper-button>
|
||||||
</div>
|
</div>
|
||||||
<div id='configLog' class='validate-log'>[[validateLog]]</div>
|
<div id='configLog' class='validate-log'>[[validateLog]]</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
|
|
||||||
<paper-card heading='Configuration Reloading'>
|
<paper-card heading="[[localize('ui.panel.config.core.section.core.reloading.heading')]]">
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
Some parts of Home Assistant can reload without requiring a restart. Hitting reload will unload their current configuration and load the new one.
|
[[localize('ui.panel.config.core.section.core.reloading.introduction')]]
|
||||||
</div>
|
</div>
|
||||||
<div class='card-actions'>
|
<div class='card-actions'>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='homeassistant'
|
domain='homeassistant'
|
||||||
service='reload_core_config'
|
service='reload_core_config'
|
||||||
>Reload Core</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.reloading.core')]]
|
||||||
|
</ha-call-service-button>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='group'
|
domain='group'
|
||||||
service='reload'
|
service='reload'
|
||||||
hidden$='[[!groupLoaded(hass)]]'
|
hidden$='[[!groupLoaded(hass)]]'
|
||||||
>Reload Groups</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.reloading.group')]]
|
||||||
|
</ha-call-service-button>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='automation'
|
domain='automation'
|
||||||
service='reload'
|
service='reload'
|
||||||
hidden$='[[!automationLoaded(hass)]]'
|
hidden$='[[!automationLoaded(hass)]]'
|
||||||
>Reload Automation</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.reloading.automation')]]
|
||||||
|
</ha-call-service-button>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='script'
|
domain='script'
|
||||||
service='reload'
|
service='reload'
|
||||||
hidden$='[[!scriptLoaded(hass)]]'
|
hidden$='[[!scriptLoaded(hass)]]'
|
||||||
>Reload Scripts</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.reloading.script')]]
|
||||||
|
</ha-call-service-button>
|
||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
|
|
||||||
<paper-card heading='Server Management'>
|
<paper-card heading="[[localize('ui.panel.config.core.section.core.server_management.heading')]]">
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
Control your Home Assistant server… from Home Assistant.
|
[[localize('ui.panel.config.core.section.core.server_management.introduction')]]
|
||||||
</div>
|
</div>
|
||||||
<div class='card-actions warning'>
|
<div class='card-actions warning'>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
@ -114,13 +127,15 @@
|
|||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='homeassistant'
|
domain='homeassistant'
|
||||||
service='restart'
|
service='restart'
|
||||||
>Restart</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.server_management.restart')]]
|
||||||
|
</ha-call-service-button>
|
||||||
<ha-call-service-button
|
<ha-call-service-button
|
||||||
class='warning'
|
class='warning'
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
domain='homeassistant'
|
domain='homeassistant'
|
||||||
service='stop'
|
service='stop'
|
||||||
>Stop</ha-call-service-button>
|
>[[localize('ui.panel.config.core.section.core.server_management.stop')]]
|
||||||
|
</ha-call-service-button>
|
||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
|
|
||||||
@ -129,7 +144,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigSectionCore extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigSectionCore extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-section-core'; }
|
static get is() { return 'ha-config-section-core'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -148,9 +166,9 @@ class HaConfigSectionCore extends Polymer.Element {
|
|||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
validateResult: {
|
isValid: {
|
||||||
type: String,
|
type: Boolean,
|
||||||
value: '',
|
value: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
validateLog: {
|
validateLog: {
|
||||||
@ -175,19 +193,14 @@ class HaConfigSectionCore extends Polymer.Element {
|
|||||||
validateConfig() {
|
validateConfig() {
|
||||||
this.validating = true;
|
this.validating = true;
|
||||||
this.validateLog = '';
|
this.validateLog = '';
|
||||||
this.validateResult = '';
|
this.isValid = null;
|
||||||
|
|
||||||
var el = this;
|
this.hass.callApi('POST', 'config/core/check_config').then((result) => {
|
||||||
|
this.validating = false;
|
||||||
|
this.isValid = result.result === 'valid';
|
||||||
|
|
||||||
this.hass.callApi('POST', 'config/core/check_config')
|
if (!this.isValid) {
|
||||||
.then(function (result) {
|
this.validateLog = result.errors;
|
||||||
el.validating = false;
|
|
||||||
var isValid = el.configValid = result.result === 'valid';
|
|
||||||
|
|
||||||
if (isValid) {
|
|
||||||
el.validateResult = 'Valid!';
|
|
||||||
} else {
|
|
||||||
el.validateLog = result.errors;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../../../src/components/ha-menu-button.html">
|
<link rel="import" href="../../../src/components/ha-menu-button.html">
|
||||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
|
|
||||||
<link rel="import" href="../ha-config-section.html">
|
<link rel="import" href="../ha-config-section.html">
|
||||||
|
|
||||||
@ -33,9 +34,9 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<ha-config-section is-wide='[[isWide]]'>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<span slot='header'>Bring Hassbian to the next level</span>
|
<span slot='header'>[[localize('ui.panel.config.core.section.hassbian.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>
|
||||||
Discover exciting add-ons to enhance your Home Assistant installation. Add an MQTT server or control a connected TV via HDMI-CEC.
|
[[localize('ui.panel.config.core.section.hassbian.introduction')]]
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<template is='dom-if' if='[[suiteStatus]]'>
|
<template is='dom-if' if='[[suiteStatus]]'>
|
||||||
@ -51,10 +52,14 @@
|
|||||||
[[computeSuiteDescription(suiteStatus, suiteKey)]]
|
[[computeSuiteDescription(suiteStatus, suiteKey)]]
|
||||||
</div>
|
</div>
|
||||||
<div class='card-actions'>
|
<div class='card-actions'>
|
||||||
<paper-button on-tap='suiteMoreInfoTapped'>LEARN MORE</paper-button>
|
<paper-button on-tap='suiteMoreInfoTapped'>
|
||||||
|
[[localize('ui.panel.config.core.section.hassbian.learn_more')]]
|
||||||
|
</paper-button>
|
||||||
|
|
||||||
<template is='dom-if' if='[[computeShowInstall(suiteStatus, suiteKey)]]'>
|
<template is='dom-if' if='[[computeShowInstall(suiteStatus, suiteKey)]]'>
|
||||||
<paper-button on-tap='suiteActionTapped'>INSTALL</paper-button>
|
<paper-button on-tap='suiteActionTapped'>
|
||||||
|
[[localize('ui.panel.config.core.section.hassbian.install')]]
|
||||||
|
</paper-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
@ -65,7 +70,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigSectionHassbian extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigSectionHassbian extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-section-hassbian'; }
|
static get is() { return 'ha-config-section-hassbian'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -16,15 +16,15 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<ha-config-section is-wide='[[isWide]]'>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<span slot='header'>Enable Push Notifications</span>
|
<span slot='header'>[[localize('ui.panel.config.core.section.push_notifications.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>
|
||||||
Enable this setting to receive push notifications on this device
|
[[localize('ui.panel.config.core.section.push_notifications.introduction')]]
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<paper-card>
|
<paper-card>
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
<iron-label class='horizontal layout'>
|
<iron-label class='horizontal layout'>
|
||||||
Push Notifications
|
[[localize('ui.panel.config.core.section.push_notifications.push_notifications')]]
|
||||||
<ha-push-notifications-toggle
|
<ha-push-notifications-toggle
|
||||||
hass='[[hass]]'
|
hass='[[hass]]'
|
||||||
push-supported='{{pushSupported}}'
|
push-supported='{{pushSupported}}'
|
||||||
@ -37,7 +37,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigSectionPushNotifications extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigSectionPushNotifications extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-section-push-notifications'; }
|
static get is() { return 'ha-config-section-push-notifications'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
<dom-module id="ha-config-section-themes">
|
<dom-module id="ha-config-section-themes">
|
||||||
<template>
|
<template>
|
||||||
<ha-config-section is-wide='[[isWide]]'>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<span slot='header'>Set a theme</span>
|
<span slot='header'>[[localize('ui.panel.config.core.section.themes.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>
|
||||||
Choose 'Backend-selected' to use whatever theme the backend chooses or pick a theme for this device.
|
[[localize('ui.panel.config.core.section.themes.introduction')]]
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<paper-card>
|
<paper-card>
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
<paper-dropdown-menu label='Theme' dynamic-align>
|
<paper-dropdown-menu label="[[localize('ui.panel.config.core.section.themes.header')]]" dynamic-align>
|
||||||
<paper-listbox
|
<paper-listbox
|
||||||
slot="dropdown-content"
|
slot="dropdown-content"
|
||||||
selected='{{selectedTheme}}'
|
selected='{{selectedTheme}}'
|
||||||
@ -34,7 +34,12 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigSectionThemes extends window.hassMixins.EventsMixin(Polymer.Element) {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
* @appliesMixin window.hassMixins.EventsMixin
|
||||||
|
*/
|
||||||
|
class HaConfigSectionThemes extends
|
||||||
|
window.hassMixins.LocalizeMixin(window.hassMixins.EventsMixin(Polymer.Element)) {
|
||||||
static get is() { return 'ha-config-section-themes'; }
|
static get is() { return 'ha-config-section-themes'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
<dom-module id="ha-config-section-translation">
|
<dom-module id="ha-config-section-translation">
|
||||||
<template>
|
<template>
|
||||||
<ha-config-section is-wide='[[isWide]]'>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<span slot='header'>Choose a Language</span>
|
<span slot='header'>[[localize('ui.panel.config.core.section.translation.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>
|
||||||
Choose a language for the Home Assistant interface on this device.
|
[[localize('ui.panel.config.core.section.translation.introduction')]]
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<paper-card>
|
<paper-card>
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
<paper-dropdown-menu label="Language" dynamic-align>
|
<paper-dropdown-menu label="[[localize('ui.panel.config.core.section.translation.language')]]" dynamic-align>
|
||||||
<paper-listbox slot="dropdown-content" on-selected-item-changed="handleLanguageSelect" attr-for-selected="language-tag" selected="[[language]]">
|
<paper-listbox slot="dropdown-content" on-selected-item-changed="handleLanguageSelect" attr-for-selected="language-tag" selected="[[language]]">
|
||||||
<template is='dom-repeat' items='[[languages]]'>
|
<template is='dom-repeat' items='[[languages]]'>
|
||||||
<paper-item language-tag="[[item.tag]]">[[item.nativeName]]</paper-item>
|
<paper-item language-tag="[[item.tag]]">[[item.nativeName]]</paper-item>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<link rel="import" href="../../../src/util/hass-util.html">
|
<link rel="import" href="../../../src/util/hass-util.html">
|
||||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
|
|
||||||
<link rel="import" href="./ha-form-customize.html">
|
<link rel="import" href="./ha-form-customize.html">
|
||||||
<link rel="import" href="../ha-config-section.html">
|
<link rel="import" href="../ha-config-section.html">
|
||||||
@ -23,7 +24,7 @@
|
|||||||
icon='mdi:arrow-left'
|
icon='mdi:arrow-left'
|
||||||
on-tap='_backTapped'
|
on-tap='_backTapped'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
<div main-title>Customization</div>
|
<div main-title>[[localize('ui.panel.config.customize.caption')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -47,7 +48,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigCustomize extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigCustomize extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-customize'; }
|
static get is() { return 'ha-config-customize'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -4,11 +4,13 @@
|
|||||||
<link rel="import" href="../../../bower_components/app-layout/app-toolbar/app-toolbar.html">
|
<link rel="import" href="../../../bower_components/app-layout/app-toolbar/app-toolbar.html">
|
||||||
|
|
||||||
<link rel="import" href="../../../src/components/ha-menu-button.html">
|
<link rel="import" href="../../../src/components/ha-menu-button.html">
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
<link rel="import" href="../ha-config-section.html">
|
<link rel="import" href="../ha-config-section.html">
|
||||||
|
|
||||||
<link rel="import" href="./ha-config-navigation.html">
|
<link rel="import" href="./ha-config-navigation.html">
|
||||||
<link rel="import" href="./ha-config-cloud-menu.html">
|
<link rel="import" href="./ha-config-cloud-menu.html">
|
||||||
|
|
||||||
|
|
||||||
<dom-module id="ha-config-dashboard">
|
<dom-module id="ha-config-dashboard">
|
||||||
<template>
|
<template>
|
||||||
<style include="iron-flex ha-style">
|
<style include="iron-flex ha-style">
|
||||||
@ -21,7 +23,7 @@
|
|||||||
<app-header slot="header" fixed>
|
<app-header slot="header" fixed>
|
||||||
<app-toolbar>
|
<app-toolbar>
|
||||||
<ha-menu-button narrow='[[narrow]]' show-menu='[[showMenu]]'></ha-menu-button>
|
<ha-menu-button narrow='[[narrow]]' show-menu='[[showMenu]]'></ha-menu-button>
|
||||||
<div main-title>Configuration</div>
|
<div main-title>[[localize('panel.configuration')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -29,10 +31,8 @@
|
|||||||
<ha-config-section
|
<ha-config-section
|
||||||
is-wide='[[isWide]]'
|
is-wide='[[isWide]]'
|
||||||
>
|
>
|
||||||
<span slot='header'>Configure Home Assistant</span>
|
<span slot='header'>[[localize('ui.panel.config.header')]]</span>
|
||||||
<span slot='introduction'>
|
<span slot='introduction'>[[localize('ui.panel.config.introduction')]]</span>
|
||||||
Here it is possible to configure your components and Home Assistant. Not everything is possible to configure from the UI yet, but we're working on it.
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<template is='dom-if' if='[[computeIsCloudLoaded(hass)]]'>
|
<template is='dom-if' if='[[computeIsCloudLoaded(hass)]]'>
|
||||||
<ha-config-cloud-menu
|
<ha-config-cloud-menu
|
||||||
@ -51,7 +51,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigDashboard extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigDashboard extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-dashboard'; }
|
static get is() { return 'ha-config-dashboard'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
<template is='dom-if' if='[[_computeLoaded(hass, item)]]'>
|
<template is='dom-if' if='[[_computeLoaded(hass, item)]]'>
|
||||||
<paper-item on-tap='_navigate'>
|
<paper-item on-tap='_navigate'>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
[[_computeCaption(item)]]
|
[[_computeCaption(item, localize)]]
|
||||||
<div secondary>[[_computeDescription(item)]]</div>
|
<div secondary>[[_computeDescription(item, localize)]]</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon='mdi:chevron-right'></iron-icon>
|
<iron-icon icon='mdi:chevron-right'></iron-icon>
|
||||||
</paper-item>
|
</paper-item>
|
||||||
@ -33,7 +33,17 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigNavigation extends window.hassMixins.EventsMixin(Polymer.Element) {
|
{
|
||||||
|
const CORE_PAGES = [
|
||||||
|
'core',
|
||||||
|
'customize',
|
||||||
|
];
|
||||||
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
* @appliesMixin window.hassMixins.EventsMixin
|
||||||
|
*/
|
||||||
|
class HaConfigNavigation extends
|
||||||
|
window.hassMixins.LocalizeMixin(window.hassMixins.EventsMixin(Polymer.Element)) {
|
||||||
static get is() { return 'ha-config-navigation'; }
|
static get is() { return 'ha-config-navigation'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -45,55 +55,34 @@ class HaConfigNavigation extends window.hassMixins.EventsMixin(Polymer.Element)
|
|||||||
pages: {
|
pages: {
|
||||||
type: Array,
|
type: Array,
|
||||||
value: [
|
value: [
|
||||||
{
|
'core',
|
||||||
domain: 'core',
|
'customize',
|
||||||
caption: 'General',
|
'automation',
|
||||||
description: 'Validate your configuration file and control the server.',
|
'script',
|
||||||
loaded: true,
|
'zwave',
|
||||||
},
|
|
||||||
{
|
|
||||||
domain: 'customize',
|
|
||||||
caption: 'Customization',
|
|
||||||
description: 'Customize your entities.',
|
|
||||||
loaded: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
domain: 'automation',
|
|
||||||
caption: 'Automation',
|
|
||||||
description: 'Create and edit automations.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
domain: 'script',
|
|
||||||
caption: 'Script',
|
|
||||||
description: 'Create and edit scripts.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
domain: 'zwave',
|
|
||||||
caption: 'Z-Wave',
|
|
||||||
description: 'Manage your Z-Wave network.',
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeLoaded(hass, component) {
|
_computeLoaded(hass, page) {
|
||||||
return component.loaded || window.hassUtil.isComponentLoaded(hass, component.domain);
|
return CORE_PAGES.includes(page) || window.hassUtil.isComponentLoaded(hass, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeCaption(component) {
|
_computeCaption(page, localize) {
|
||||||
return component.caption;
|
return localize(`ui.panel.config.${page}.caption`);
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeDescription(component) {
|
_computeDescription(page, localize) {
|
||||||
return component.description;
|
return localize(`ui.panel.config.${page}.description`);
|
||||||
}
|
}
|
||||||
|
|
||||||
_navigate(ev) {
|
_navigate(ev) {
|
||||||
history.pushState(null, null, '/config/' + ev.model.item.domain);
|
history.pushState(null, null, '/config/' + ev.model.item);
|
||||||
this.fire('location-changed');
|
this.fire('location-changed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define(HaConfigNavigation.is, HaConfigNavigation);
|
customElements.define(HaConfigNavigation.is, HaConfigNavigation);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
<template is='dom-if' if='[[!showEditor]]'>
|
<template is='dom-if' if='[[!showEditor]]'>
|
||||||
<ha-script-picker
|
<ha-script-picker
|
||||||
|
hass='[[hass]]'
|
||||||
narrow='[[narrow]]'
|
narrow='[[narrow]]'
|
||||||
show-menu='[[showMenu]]'
|
show-menu='[[showMenu]]'
|
||||||
scripts='[[scripts]]'
|
scripts='[[scripts]]'
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
icon='mdi:arrow-left'
|
icon='mdi:arrow-left'
|
||||||
on-tap='_backTapped'
|
on-tap='_backTapped'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
<div main-title>Scripts</div>
|
<div main-title>[[localize('ui.panel.config.script.caption')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -90,7 +90,12 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaScriptPicker extends window.hassMixins.EventsMixin(Polymer.Element) {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
* @appliesMixin window.hassMixins.EventsMixin
|
||||||
|
*/
|
||||||
|
class HaScriptPicker extends
|
||||||
|
window.hassMixins.LocalizeMixin(window.hassMixins.EventsMixin(Polymer.Element)) {
|
||||||
static get is() { return 'ha-script-picker'; }
|
static get is() { return 'ha-script-picker'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<link rel="import" href="../../../src/components/ha-service-description.html">
|
<link rel="import" href="../../../src/components/ha-service-description.html">
|
||||||
<link rel='import' href='../../../src/layouts/ha-app-layout.html'>
|
<link rel='import' href='../../../src/layouts/ha-app-layout.html'>
|
||||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||||
|
<link rel='import' href='../../../src/util/hass-mixins.html'>
|
||||||
|
|
||||||
<link rel="import" href="../ha-config-section.html">
|
<link rel="import" href="../ha-config-section.html">
|
||||||
<link rel="import" href="../ha-form-style.html">
|
<link rel="import" href="../ha-form-style.html">
|
||||||
@ -78,7 +79,7 @@
|
|||||||
icon='mdi:arrow-left'
|
icon='mdi:arrow-left'
|
||||||
on-tap='_backTapped'
|
on-tap='_backTapped'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
<div main-title>Z-Wave Manager</div>
|
<div main-title>[[localize('ui.panel.config.zwave.caption')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -344,7 +345,10 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaConfigZwave extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaConfigZwave extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-config-zwave'; }
|
static get is() { return 'ha-config-zwave'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -313,6 +313,78 @@
|
|||||||
"log_out": "Log out"
|
"log_out": "Log out"
|
||||||
},
|
},
|
||||||
"panel": {
|
"panel": {
|
||||||
|
"config": {
|
||||||
|
"header": "Configure Home Assistant",
|
||||||
|
"introduction": "Here it is possible to configure your components and Home Assistant. Not everything is possible to configure from the UI yet, but we're working on it.",
|
||||||
|
"core": {
|
||||||
|
"caption": "General",
|
||||||
|
"description": "Validate your configuration file and control the server",
|
||||||
|
"section": {
|
||||||
|
"core": {
|
||||||
|
"header": "Configuration and server control",
|
||||||
|
"introduction": "Changing your configuration can be a tiresome process. We know. This section will try to make your life a little bit easier.",
|
||||||
|
"validation": {
|
||||||
|
"heading": "Configuration validation",
|
||||||
|
"introduction": "Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid",
|
||||||
|
"check_config": "Check config",
|
||||||
|
"valid": "Configuration valid!",
|
||||||
|
"invalid": "Configuration invalid"
|
||||||
|
},
|
||||||
|
"reloading": {
|
||||||
|
"heading": "Configuration reloading",
|
||||||
|
"introduction": "Some parts of Home Assistant can reload without requiring a restart. Hitting reload will unload their current configuration and load the new one.",
|
||||||
|
"core": "Reload core",
|
||||||
|
"group": "Reload groups",
|
||||||
|
"automation": "Reload automations",
|
||||||
|
"script": "Reload scripts"
|
||||||
|
},
|
||||||
|
"server_management": {
|
||||||
|
"heading": "Server management",
|
||||||
|
"introduction": "Control your Home Assistant server… from Home Assistant.",
|
||||||
|
"restart": "Restart",
|
||||||
|
"stop": "Stop"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"push_notifications": {
|
||||||
|
"header": "Configure push notifications",
|
||||||
|
"introduction": "Enable this setting to receive push notifications on this device",
|
||||||
|
"push_notifications": "Push notifications"
|
||||||
|
},
|
||||||
|
"translation": {
|
||||||
|
"header": "Choose a language",
|
||||||
|
"introduction": "Choose a language for the Home Assistant interface on this device",
|
||||||
|
"language": "Language"
|
||||||
|
},
|
||||||
|
"themes": {
|
||||||
|
"header": "Set a theme",
|
||||||
|
"introduction": "Choose 'Backend-selected' to use whatever theme the backend chooses or pick a theme for this device",
|
||||||
|
"theme": "Theme"
|
||||||
|
},
|
||||||
|
"hassbian": {
|
||||||
|
"header": "Bring Hassbian to the next level",
|
||||||
|
"introduction": "Discover exciting add-ons to enhance your Home Assistant installation. Add an MQTT server or control a connected TV via HDMI-CEC.",
|
||||||
|
"learn_more": "Learn more",
|
||||||
|
"install": "Install"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"customize": {
|
||||||
|
"caption": "Customization",
|
||||||
|
"description": "Customize your entities"
|
||||||
|
},
|
||||||
|
"automation": {
|
||||||
|
"caption": "Automation",
|
||||||
|
"description": "Create and edit automations"
|
||||||
|
},
|
||||||
|
"script": {
|
||||||
|
"caption": "Script",
|
||||||
|
"description": "Create and edit scripts"
|
||||||
|
},
|
||||||
|
"zwave": {
|
||||||
|
"caption": "Z-Wave",
|
||||||
|
"description": "Manage your Z-Wave network"
|
||||||
|
}
|
||||||
|
},
|
||||||
"history": {
|
"history": {
|
||||||
"showing_entries": "Showing entries for",
|
"showing_entries": "Showing entries for",
|
||||||
"period": "Period"
|
"period": "Period"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user