mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 03:46:34 +00:00
Map and mailbox translations (#748)
* Map translations * Mailbox panel translations
This commit is contained in:
parent
b16bc88eb5
commit
34fd3e4899
@ -20,6 +20,7 @@ const outDir = workDir + '/output';
|
|||||||
const TRANSLATION_FRAGMENTS = [
|
const TRANSLATION_FRAGMENTS = [
|
||||||
'history',
|
'history',
|
||||||
'logbook',
|
'logbook',
|
||||||
|
'mailbox',
|
||||||
'shopping-list',
|
'shopping-list',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -14,6 +14,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'>
|
||||||
|
|
||||||
|
|
||||||
<dom-module id='ha-panel-mailbox'>
|
<dom-module id='ha-panel-mailbox'>
|
||||||
@ -50,6 +51,9 @@
|
|||||||
paper-dialog {
|
paper-dialog {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
paper-dialog p {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
#mp3dialog paper-icon-button {
|
#mp3dialog paper-icon-button {
|
||||||
float: right;
|
float: right;
|
||||||
@ -89,14 +93,14 @@
|
|||||||
<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>Mailbox</div>
|
<div main-title>[[localize('panel.mailbox')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
<div class='content'>
|
<div class='content'>
|
||||||
<paper-card>
|
<paper-card>
|
||||||
<template is='dom-if' if='[[!_messages.length]]'>
|
<template is='dom-if' if='[[!_messages.length]]'>
|
||||||
<div class='card-content'>
|
<div class='card-content'>
|
||||||
You do not have any messages.
|
[[localize('ui.panel.mailbox.empty')]]
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template is='dom-repeat' items='[[_messages]]'>
|
<template is='dom-repeat' items='[[_messages]]'>
|
||||||
@ -104,7 +108,7 @@
|
|||||||
<paper-item-body style="width:100%" two-line>
|
<paper-item-body style="width:100%" two-line>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div>[[item.caller]]</div>
|
<div>[[item.caller]]</div>
|
||||||
<div class="tip">[[item.duration]] secs</div>
|
<div class="tip">[[localize('ui.duration.second', 'count', item.duration)]]</div>
|
||||||
</div>
|
</div>
|
||||||
<div secondary>
|
<div secondary>
|
||||||
<span class="date">[[item.timestamp]]</span> - [[item.message]]
|
<span class="date">[[item.timestamp]]</span> - [[item.message]]
|
||||||
@ -118,31 +122,33 @@
|
|||||||
|
|
||||||
<paper-dialog with-backdrop id="mp3dialog" on-iron-overlay-closed="_mp3Closed">
|
<paper-dialog with-backdrop id="mp3dialog" on-iron-overlay-closed="_mp3Closed">
|
||||||
<h2>
|
<h2>
|
||||||
Message Playback
|
[[localize('ui.panel.mailbox.playback_title')]]
|
||||||
<paper-icon-button
|
<paper-icon-button
|
||||||
on-tap='openDeleteDialog'
|
on-tap='openDeleteDialog'
|
||||||
icon='mdi:delete'
|
icon='mdi:delete'
|
||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="transcribe">text</div>
|
<div id="transcribe"></div>
|
||||||
<div>
|
<div>
|
||||||
<audio id="mp3" preload="none" controls> <source id="mp3src" src="" type="audio/mpeg"></audio>
|
<audio id="mp3" preload="none" controls> <source id="mp3src" src="" type="audio/mpeg"></audio>
|
||||||
</div>
|
</div>
|
||||||
</paper-dialog>
|
</paper-dialog>
|
||||||
|
|
||||||
<paper-dialog with-backdrop id="confirmdel">
|
<paper-dialog with-backdrop id="confirmdel">
|
||||||
<h2>Delete Message</h2>
|
<p>[[localize('ui.panel.mailbox.delete_prompt')]]</p>
|
||||||
<p>Are you sure you want to delete this message?</p>
|
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<paper-button dialog-dismiss>Decline</paper-button>
|
<paper-button dialog-dismiss>[[localize('ui.common.cancel')]]</paper-button>
|
||||||
<paper-button dialog-confirm autofocus on-tap="deleteSelected">Accept</paper-button>
|
<paper-button dialog-confirm autofocus on-tap="deleteSelected">[[localize('ui.panel.mailbox.delete_button')]]</paper-button>
|
||||||
</div>
|
</div>
|
||||||
</paper-dialog>
|
</paper-dialog>
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaPanelMailbox extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaPanelMailbox extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-panel-mailbox'; }
|
static get is() { return 'ha-panel-mailbox'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<script src="../../bower_components/leaflet/dist/leaflet.js"></script>
|
<script src="../../bower_components/leaflet/dist/leaflet.js"></script>
|
||||||
|
|
||||||
<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-entity-marker.html">
|
<link rel="import" href="./ha-entity-marker.html">
|
||||||
|
|
||||||
<dom-module id="ha-panel-map">
|
<dom-module id="ha-panel-map">
|
||||||
@ -19,7 +20,7 @@
|
|||||||
|
|
||||||
<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>Map</div>
|
<div main-title>[[localize('panel.map')]]</div>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
|
|
||||||
<div id='map'></div>
|
<div id='map'></div>
|
||||||
@ -29,7 +30,10 @@
|
|||||||
<script>
|
<script>
|
||||||
window.L.Icon.Default.imagePath = '/static/images/leaflet';
|
window.L.Icon.Default.imagePath = '/static/images/leaflet';
|
||||||
|
|
||||||
class HaPanelMap extends Polymer.Element {
|
/*
|
||||||
|
* @appliesMixin window.hassMixins.LocalizeMixin
|
||||||
|
*/
|
||||||
|
class HaPanelMap extends window.hassMixins.LocalizeMixin(Polymer.Element) {
|
||||||
static get is() { return 'ha-panel-map'; }
|
static get is() { return 'ha-panel-map'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -275,9 +275,11 @@
|
|||||||
},
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
"common": {
|
"common": {
|
||||||
"loading": "Loading"
|
"loading": "Loading",
|
||||||
|
"cancel": "Cancel"
|
||||||
},
|
},
|
||||||
"duration": {
|
"duration": {
|
||||||
|
"second": "{count} {count, plural,\n one {second}\n other {seconds}\n}",
|
||||||
"day": "{count} {count, plural,\n one {day}\n other {days}\n}",
|
"day": "{count} {count, plural,\n one {day}\n other {days}\n}",
|
||||||
"week": "{count} {count, plural,\n one {week}\n other {weeks}\n}"
|
"week": "{count} {count, plural,\n one {week}\n other {weeks}\n}"
|
||||||
},
|
},
|
||||||
@ -293,6 +295,12 @@
|
|||||||
"logbook": {
|
"logbook": {
|
||||||
"showing_entries": "[%key:ui::panel::history::showing_entries%]"
|
"showing_entries": "[%key:ui::panel::history::showing_entries%]"
|
||||||
},
|
},
|
||||||
|
"mailbox": {
|
||||||
|
"empty": "You do not have any messages",
|
||||||
|
"playback_title": "Message playback",
|
||||||
|
"delete_prompt": "Delete this message?",
|
||||||
|
"delete_button": "Delete"
|
||||||
|
},
|
||||||
"shopping-list": {
|
"shopping-list": {
|
||||||
"clear_completed": "Clear completed",
|
"clear_completed": "Clear completed",
|
||||||
"add_item": "Add item",
|
"add_item": "Add item",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user