Skip to content

Commit

Permalink
Merge pull request #50 from Swampen/translation
Browse files Browse the repository at this point in the history
Translation
  • Loading branch information
dnguyen800 authored Sep 5, 2021
2 parents f69b87e + 09d6ce4 commit 6b573b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dist/air-visual-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// UPDATE FOR EACH RELEASE!!! From aftership-card. Version # is hard-coded for now.
console.info(
`%c AIR-VISUAL-CARD \n%c Version 0.0.16 `,
`%c AIR-VISUAL-CARD \n%c Version 0.0.19 `,
'color: orange; font-weight: bold; background: black',
'color: white; font-weight: bold; background: dimgray',
);
Expand Down Expand Up @@ -316,10 +316,8 @@ class AirVisualCard extends HTMLElement {
if (!isNaN(aplParse)) {
apl = APLdescription[getAQI()];
} else {
// Commenting this out as workaround for Github issue #48. The sensor.u_s_air_pollution_level uses keys for translation so text doesn't look nice.
// Relying on hard-coded English translation defined in APLdescription variable
// apl = hass.states[aplSensor.config].state;
apl = APLdescription[getAQI()];
let aplState = hass.states[aplSensor.config].state;
apl = hass.localize("component.sensor.state.airvisual__pollutant_level." + aplState)
}
}
};
Expand Down

0 comments on commit 6b573b9

Please sign in to comment.