Add translations for the login form (#751)

pull/752/head
Adam Mills 2017-12-23 14:02:14 -05:00 committed by GitHub
parent e7df8cb195
commit 1b60a93fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

@ -7,6 +7,8 @@
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
<link rel='import' href='../../src/util/hass-mixins.html'>
<dom-module id="login-form">
<template>
<style is="custom-style" include="iron-flex iron-positioning"></style>
@ -49,15 +51,15 @@
<div id='loginform' hidden$="[[showSpinner]]">
<paper-input
id='passwordInput'
label='Password'
label="[[localize('ui.login-form.password')]]"
type='password'
invalid='[[errorMessage]]'
error-message='[[errorMessage]]'
value='{{password}}'
></paper-input>
<div class="layout horizontal center">
<paper-checkbox for id='rememberLogin'>Remember</paper-checkbox>
<paper-button on-tap='validatePassword'>Log In</paper-button>
<paper-checkbox for id='rememberLogin'>[[localize('ui.login-form.remember')]]</paper-checkbox>
<paper-button on-tap='validatePassword'>[[localize('ui.login-form.log_in')]]</paper-button>
</div>
</div>
<div id="validatebox" hidden$="[[!showSpinner]]">
@ -70,7 +72,10 @@
</dom-module>
<script>
class LoginForm extends Polymer.Element {
/*
* @appliesMixin window.hassMixins.LocalizeMixin
*/
class LoginForm extends window.hassMixins.LocalizeMixin(Polymer.Element) {
static get is() { return 'login-form'; }
static get properties() {

View File

@ -283,6 +283,11 @@
"day": "{count} {count, plural,\n one {day}\n other {days}\n}",
"week": "{count} {count, plural,\n one {week}\n other {weeks}\n}"
},
"login-form": {
"password": "Password",
"remember": "Remember",
"log_in": "Log in"
},
"sidebar": {
"developer_tools": "Developer tools",
"log_out": "Log out"