Commit Graph
92 Commits
Author SHA1 Message Date
Adam Mills 288478978f Always run translation upload on master (#1106)
This ensures that if the master build gets cancelled when translations
change, or if any other weird situation happens, we know the
translations will be uploaded after the next build.
2018-04-18 14:11:31 -04:00
Adam Mills e719f113d9 Fix for Lokalise backend misinterpretation of keys (#1107)
The Lokalise server has a bug that the internal portion of key
references was misinterpreted as a symfony key, and was getting auto
converted by the convert placeholders feature. Since we don't use this
we're turning it off to work around the bug.
2018-04-18 14:11:03 -04:00
Adam Mills e5a5c353c4 Don't render minimum color temp with gray border (#1017) 2018-03-21 15:22:44 -07:00
Adam Mills 0df4aa6117 Use new light HS API for the color picker (#982) 2018-03-21 17:35:16 -04:00
Adam Mills 0ec4cd668f Use backend translation for config entries (#980)
* Use backend translation for config entries

* Accept label/error callbacks on ha-form

* Add hassMixins import to ha-form
2018-03-11 12:47:52 -07:00
Adam Mills 29f9b2d201 Fix backend translations load without selection (#979) 2018-03-10 10:06:25 -08:00
Adam Mills 1fbad393bf Lokalise upload fix (#976)
* Pin lokalise sceript to working version

* Include cleanups from the home-assistant scripts
2018-03-07 09:46:33 -05:00
Adam Mills 101794c88e Load and subscribe to backend translations (#894)
* Load backend translations

* Add support for component level state translations

* Fix selected language backend translation loading
2018-02-28 19:32:48 -08:00
Adam Mills d4b257854d Add localization to the automation editor (#923)
* Add localization to the automation editor

* Unnest automation strings from `section`
2018-02-26 16:15:51 -08:00
Adam Mills 7acab579b4 Use new lokalise builtin unzip for download (#900) 2018-02-17 19:49:14 -08:00
Adam Mills 8649c5352b 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
2018-01-20 22:08:22 -08:00
Adam Mills b3ded276b5 Properly localize unknown/unavailable sensors (#752) 2017-12-23 16:16:40 -05:00
Adam Mills 38088acf14 Use localized state display for timeline charts (#746)
* Fix import typo

* Use localized state names on timeline charts

* Track language in cache metadata
2017-12-23 14:02:33 -05:00
Adam Mills 1b60a93fcc Add translations for the login form (#751) 2017-12-23 14:02:14 -05:00
Adam Mills e7df8cb195 Mailbox empty state styling (#750) 2017-12-23 12:06:34 -05:00
Adam Mills 34fd3e4899 Map and mailbox translations (#748)
* Map translations

* Mailbox panel translations
2017-12-22 21:16:02 -08:00
Adam Mills f0f1a56537 Show RGB picker when RGB not in state attrs (#736)
* Show RGB picker when RGB not in state attrs

* Use supported_features and hide controls when off
2017-12-22 21:06:29 -08:00
Adam Mills 097a8cfdc6 Translations for logbook/history panels (#741)
* Translations for logbook/history panels

* Switch to base localize function

* Move periods to generic durations keys

These are going to end up part of a duration class of keys that will be
more widely used.
2017-12-22 14:22:13 -05:00
Adam Mills c8c21e6fac Refactor out our localize custom variant (#743) 2017-12-19 09:18:50 -05:00
Adam Mills f8261d93d3 Problem device class (#726)
* Problem device class

* Move OK/Problem master to binary_sensor
2017-12-13 20:02:35 -08:00
Adam Mills 0018a9a9c8 Fix bug on initial fragment load (#725) 2017-12-11 21:58:28 -08:00
Adam Mills bf126b6c5e Translations for domain names (#724) 2017-12-10 15:45:48 -08:00
Adam Mills c18247cd6b Sync translations post log_out move (#723) 2017-12-10 14:24:28 -05:00
Adam Mills fa2cc68139 Sidebar translations (#722) 2017-12-10 13:47:33 -05:00
Adam Mills 8dde92d572 Fix pushSupported not bubbling to config-core (#721) 2017-12-10 09:57:58 -08:00
Adam Mills e0a63a2ee3 Panel translation fragments (#691)
* Move flatten to separate gulp task

* Split translation fragments into separate files

* Load translation fragments when switching panels

* Fix gulpfile lint

* Move app-location to home-assistant.html

* Compute panel navigation in home-assistant.html

* Only pass down panelUrl from home-assistant.html

* Store panelUrl on hass

* Store computed panel on hass object

* Revert "Store computed panel on hass object"

This reverts commit 0f150b1faa2b91588a432ab346821b633b349d1a.

IMO this didn't really make the code cleaner. Just wanted to see how it
would look. Keeping it here as a reverted commit in case we do want to
use it.
2017-12-05 09:12:42 -05:00
Adam Mills a723c62f4f Separate more JS util logic to be unit tested (#705)
* Move featureClassNames to js util

* Add tests for featureClassNames

* Strip empty feature class names

* Move canToggleDomain to js util

* Add tests for canToggleDomain

* Refactor canToggleDomain to ensure boolean return

* Switch to chai assert for richer syntax options

* Move canToggleState to js util

* Tests for canToggleState

* Enable linting for mocha tests

* Move stateCardType to js util

* Add tests for stateCardType

* Move stateMoreInfoType to js util

* Tests for stateMoreInfoType

* Include mdn Array includes polyfill
2017-12-03 20:56:16 -08:00
Adam Mills 77cc77396b Fix push-notification toggle reset on failure (#701) 2017-12-03 15:30:14 -08:00
Adam Mills 7303e55f63 Move push notifications to config panel (#700) 2017-12-03 15:28:39 -08:00
Adam Mills 3412edb843 Compute state display tests (#643)
* Move computeDomain and format functions to js

* Add tests for computeStateDisplay

* Always recalculate state display

* Remove LANGUAGE from hassUtils object

* Move AppLocalizeBehavior import to mixins

* Import mixins to state-card-display

* Safety check on computeStateDisplay

* Don't store computed domains on stateObj

* Integration tests for state-card-display

* Include extractDomain code in polymer repo

* Remove util function null checking

* Dont render test element without hass and stateObj

* Revert "Don't store computed domains on stateObj"

This reverts commit e3509d71823ff5e42a4dcf4849a98c5bb6cb391c.

* Revert "Always recalculate state display"

This reverts commit 27c24e2694ee6f7c147782532268b3a67998d49b.
2017-11-20 21:46:36 -08:00
Adam Mills 8d790e9601 Add icons for input_datetime (#661) 2017-11-20 21:23:19 -08:00
Adam Mills fbc9755796 Keep language/resources on login (#646) 2017-11-18 20:04:40 -08:00
Adam Mills 70c082716f MVP tests for hass-util.html (#629)
* MVP tests for hass-util.html

* MVP util.js to allow individual JS function export

* Use mocha to unit test js logic

* Isolate mocha test directory

* Move mocha opts to separate file

* Default export of util function

* Use reify for mocha tests instead of babel
2017-11-15 21:42:54 -08:00
Adam Mills 3ff9fe1041 Build ES5/ES6 in parallel to share gulp deps (#615)
* Build ES5/ES6 in parallel to share gulp deps

* Rollup es5 files into build-temp-es5

* Use correct ES5 path for compatibility.js
2017-11-15 18:05:52 -08:00
Adam Mills 8cf0c0e94d Fix build attempting to include translationMaster (#628)
* Fix build attempting to include translationMaster

* Use full gulp path to run with no extra setup
2017-11-14 20:36:46 -08:00
Adam Mills 056e9e0d74 Translations for core states (#575)
* Fix deeper nested translations build

* Make fallback to message optional

* Use translated state names

* Remove unused switch cases

* Use src en.json as fallback instead of downloaded

* Use separate translations for badge states

* Eliminate unnecessary StatesMixin

* Remove now unused localize fallback parameter

* Fix capitalization to match material guidelines

* Move media player text generation back to model

* Make localize args object

* Change Mixin to use computed function

* Revert to normal args spread for haLocalize

* Rename to computeHaLocalize

* Allow state to default for badge and media player

* Denormalize en.json with Lokalise placeholders

* Fix cleanups missed after master merge

* Split zwave query stage states to separate keys

* Throw error to fail gulp build

* Fix zwave template and regression on general state
2017-11-12 17:48:42 -08:00
Adam Mills 1ab551116e Fix login form with translations (#612)
* Revert "Fix not showing login form (#564)"

This reverts commit d2faeaffe7.

* Don't lose translation resources on logout

* Fix lint
2017-11-11 18:16:15 -05:00
Adam Mills 508b5d6d77 Minify translations downloaded from Lokalise (#611) 2017-11-11 15:33:47 -05:00
Adam Mills 6de540a0b1 Fix WCT config - specify generic Safari 10 (#607)
Apparently the minimum safari version has been bumped from 10.0 to 10.1.
We can just specify 10 here to be more generic.
2017-11-10 14:38:16 -05:00
Adam Mills 86128d54b4 Auto deploy base translations with Travis (#599) 2017-11-09 19:15:55 -08:00
Adam Mills f81429702c Replace existing translations on upload (#597) 2017-11-09 13:42:45 -05:00
Adam Mills 5722b6bbdb Accept Lokalise token from environment (#598) 2017-11-08 23:59:10 -05:00
Adam Mills 11f4f3b3c9 Update zwave to use new state values (#584)
* Update zwave to use new state values

* Support for zwave initializing state

* Show query stage on card for zwave entities

* Move logic to compteStateState
2017-11-07 10:14:01 -05:00
Adam Mills aa389bf206 Safety check for translations upload script (#573) 2017-11-05 20:11:12 -08:00
Adam Mills f16886f63d Add Spanish to the translation metadata (#572)
Fixes #569
2017-11-05 17:45:36 -08:00
Adam Mills 90b80880ed Store current translations in git (#563)
* Store current translations in git

* Handle empty strings in translation downloads

* Use more consice filtering

* Skip empty keys on translation download
2017-11-04 16:44:07 -07:00
Adam Mills 6959b1849f Store language native names in git (#556)
* Don't delete the gitignore file

* Store translation native names in git
2017-11-03 21:31:22 -07:00
Adam Mills fdf2fa3d3f Migrate to Lokalise for managing translations (#555) 2017-11-03 20:34:47 -07:00
Adam Mills 979a22f311 Merge pull request #545 from outrun0506/master
Update German Translation
2017-11-01 11:53:54 -04:00
Adam Mills 73029ae2e7 Merge pull request #544 from Danielhiversen/patch-2
Update no.json
2017-11-01 11:53:10 -04:00
Adam Mills 021ded76d1 Remaining panel translations (#539)
* Remaining panel translations

* Revert hassio translation
2017-10-31 20:31:43 -07:00
Adam Mills fb0b1286d2 Convert remaining elements to ES6 classes (#538)
* Convert remaining elements to ES6 classes

* Use native DOM methods for tests

* Fix Polymer 2 debounce call
2017-10-29 21:47:03 -07:00
Adam Mills 780b58c210 Enable language selection in config panel (#506) 2017-10-26 21:32:12 -07:00
Adam Mills ef36a31ac0 Polymer 2.0 ES6 class conversions (#478) 2017-10-25 19:38:13 -07:00
Adam Mills 29fad98754 Core POC support for polymer i18n (#227)
* Core POC support for polymer i18n

* Move translation from core.js to html

* Replace fetch with XHR

* Convert translation pipeline to gulp

* Convert from polyglot to Polymer localize

* Pass through missing keys for custom panels

* Store promise to be reused

* Use cacheFirst sw handler for translations

* Write full filenames to translationFingerprints

* Precache en translation

* Convert home-assistant-main to ES6 class

* Create a localization mixin

* Cleanup

* Add polymer tags to annotate for linter

* Rename fingerprints to translationMetadata

* Build translation native names into metadata

* Add language selection UI to sidebar

* Provide separate message namespace argument

* Store language/resources on hass object

* Store translationMetadata on hass

* Move language selector to config panel

* Temporarily hide language selector

* Small cleanups

* Use dynamic-align for more flexible layout

* Migrate to fetch API

* Only send change events for user selection events

* Update for new linting rules

* Migrate build_frontend changes
2017-10-25 18:12:23 -07:00
Adam Mills 9c0845d595 Convert card elements to ES6 classes (#465)
* Convert cards to ES6 classes

* Bonus bugfix debugging card functionality

* Properly scope UPDATE_INTERVAL

* Condense simple property declarations
2017-10-16 22:09:55 -07:00
Adam Mills f24cb3eed5 Only generate fingerprints for non-dev SW (#453) 2017-10-11 23:36:04 -07:00
Adam Mills 9153c80229 Add missed hass-mixins imports (#440) 2017-09-30 17:39:58 -05:00
Adam Mills d1a194a147 Upgrade core config panels to ES6 classes (#438) 2017-09-30 15:15:43 -05:00
Adam Mills 3912347f3d Convert home-assistant-main to ES6 class (#424)
* Convert home-assistant-main to ES6 class

* Add arrow functions to ensure this is bound

* Add missed parameter

* Picky linter
2017-09-09 19:45:48 -07:00
Adam Mills 894a84ba77 Fire helper update (#410)
* Use deduping mixin and ES6 arrow

* Update to Polymer legacy implementation of events

* Remove Ha prefix
2017-08-27 10:17:13 -07:00
Adam Mills 81f00db0c1 ES6 class upgrade ha-sidebar and home-assistant (#409)
* ES6 class upgrade ha-sidebar and home-assistant

* Remove unused imports

* Fix linter errors

* Added event fire mixin

* By some miracle that still worked

* Ignore class-methods-use-this

* Add mixin annotation
2017-08-26 16:52:06 -07:00
Adam Mills 688a984bac Configurator updates (#386)
* Hide configurator button if no caption configured

* Put configurator links on new line
2017-08-12 17:55:54 -07:00
Adam Mills 2c69e001ee MVP Gulp introduction (#334)
* Install gulp as dev dependency

* Placeholder gulpfile

* Replace rollup invocations with gulp

* Consolidate duplicated code

* Big cleanup of gulpfile

* Without cache test

* Revert "Without cache test"

This reverts commit 0e3881d8d79b81faa514669fa2836e415dcc5c95.
2017-07-13 09:08:26 -07:00
Adam Mills 26218f64af Fix exception when no password is configured (#315) 2017-06-25 15:09:08 -07:00
Adam Mills a3d4b575d4 Use yarn on travis (#316) 2017-06-25 15:08:39 -07:00
Adam Mills 81ab4ff8a8 Show value details on zwave panel (#305) 2017-06-15 20:20:25 -07:00
Adam Mills 865b05b510 Hide oscillating button if oscillation not used (#301) 2017-06-11 21:36:51 -07:00
Adam Mills 75679e90f2 ZWave Panel Values Card (#295) 2017-06-02 00:17:48 -07:00
Adam Mills 6d1d425e75 Improvements for the zwave rename node entry (#296)
* Improvements for the zwave rename node entry

* Linter fix
2017-06-01 22:33:44 -07:00
Adam Mills abbdc6f055 Display history charts up to end of selected time (#254)
* Display history charts up to end time

* Back into JS world
2017-04-03 23:00:10 -07:00
Adam Mills c21187dc4f Exclude device_class from listed attributes (#222) 2017-02-26 14:59:53 -08:00
Adam Mills a9265b3a69 Add supported_features to cover component (#215)
* Add supported_features to cover component

* Fix linting
2017-02-18 18:11:08 -08:00
Adam Mills fe5fcc6db3 Fix media player model typo (#214) 2017-02-18 18:04:29 -08:00
Adam Mills 5207629e87 Add Object.assign polyfill support (#210)
* Add Object.assign polyfill support

* Remove redundant polyfill check

* Use ES6 in compatibility.js
2017-02-14 12:01:32 -08:00
Adam Mills fd798a8f29 Add device_class support to cover domain (#202) 2017-02-12 11:08:16 -08:00
Adam Mills 518d0b38da Rename sensor_class to device_class (#200) 2017-02-10 20:46:02 -08:00
Adam Mills bdd3157087 Rnm supported_media_commands to supported_features (#197) 2017-02-07 20:42:11 -08:00
Adam Mills c8af07ab6b Display attributions separately in more-info (#176)
* Display attributions separately in more-info

* Fix js lint

* Rename to formatAttributeValue

* Properly declare the computed bindings
2017-01-20 22:05:10 -08:00
Adam Mills d799d3a52e Capitalize card titles for default domain groups (#174) 2017-01-16 21:25:31 -08:00
Adam Mills 894c2cd29e Add supportsPlay (#169) 2017-01-09 01:10:21 +01:00
Adam Mills ab187a7a84 Media players can support turn off without turn on (#148) 2016-10-28 08:50:46 -07:00
Adam Mills 8c5b547141 Use material UI color for light icon (#129)
https://www.materialui.co/colors/yellow/600
2016-10-16 15:49:52 -07:00
Adam Mills 744198cdc9 Use native date formatting functions if available (#87)
With the removal of moment.js, dates and times are no longer formatted
using the native locale. This allows the browser to format if the
functionality is available (Everyone but Safari).

Also included is a correction in relativeTime. Times in the future were
being displaed incorrectly -xxx seconds, and the in/ago verbage was
reintroduced.
2016-08-10 13:30:06 -07:00
Adam Mills b3efdd9efa Additional comments for pikaday field binding 2016-07-27 14:27:27 -04:00
Adam Mills 1a8832099c Include submodule reference 2016-07-26 14:11:20 -04:00
Adam Mills 77e8c78d62 travis fixes 2016-07-26 14:05:06 -04:00
Adam Mills 0a0a24e5eb History and Logbook panel fixes 2016-07-26 13:57:56 -04:00
Adam Mills 1203312ac3 Fix indentation 2016-07-25 18:31:20 -04:00
Adam Mills e006ad9835 Submodule updates not included so travis can build 2016-07-25 18:19:40 -04:00
Adam Mills 911159e33f home-assistant-js fix 2016-07-25 15:21:27 -04:00
Adam Mills eb7dc87971 Use local timezone for log and history dates 2016-07-25 12:02:36 -04:00