Comments (5)
Hmm. I do think the concept of overriding translations in custom cards is interesting. If I add this it will be not the most user friendly as its so hard to know what parts of the translation object the card will use with custom sensors. But supporting overriding specific keys in the HA provided localisation resources by the exact same keys could be a neat convention for custom cards in general:
translations:
en:
state.climate.on: Its on
It would require you as the user to gather somewhat deeper knowledge of internal data structures in HA, but then again it would allow you to pinpoint any translation field in any language just for this one card. Should be future proof. Will ponder it further π€
from simple-thermostat.
@nervetattoo I also stuck a bit on localizing. I always got Temperature
. My quick fix was editing JS file with the correct string.
This would be a great addition :)
from simple-thermostat.
@nervetattoo I've just updated HA to the latest version and there is something wrong with localization:
Take a look at Status (State). On the label it is written heating
but the button says: GRZANIE
, which means heating in Polish. So the buttons are correctly localized, but the label isn't.
Ok, I think I found the issue with State:
in https://github.com/nervetattoo/simple-thermostat/blob/master/src/index.js#L264 it should be:
: this.renderInfoItem(this.localize(mode, 'state.climate.'), {
This way I got the correct label:
from simple-thermostat.
Thanks to this PR this is at least now possible to override so I'm leaving it at that solution
from simple-thermostat.
Hi!
I know this is an old thing, but, is it possible that this error reappeared?
on image below buttons are translated, while current status is in english:
from simple-thermostat.
Related Issues (20)
- Change sensors from on/off to open/closed HOT 5
- Updating color
- Enable Follow Me mode on the Cielo Breez units (Breez Max)
- Localization for modes none, eco, away, sleep, home, comfort HOT 4
- Project status HOT 2
- Translate State HOT 1
- Canβt find a way to change font size or background colour HOT 4
- Enable use of template sensors
- Weird layout with none parsed texts for preset and control HOT 4
- invert property for faults
- Water-heater entity support
- Please help to fix config screen have something wrong to can't adjust card
- Unwanted text before hvac modes HOT 5
- Error viewing card HOT 4
- How change color fan-only icon on aqua?
- custom element doesnt exist simple thermostat - on my ipad HOT 1
- away_indefinitely being displayed HOT 1
- Using Ecobee via Homekit displays "ui.card.climate.operation" header for modes HOT 1
- add buttons for vane_horizontal
- Heat/Cool missing button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-thermostat.