diff --git a/src/components/modals/main/settings/sections/QuickLinks.jsx b/src/components/modals/main/settings/sections/QuickLinks.jsx index 1de9abc9..573b42bd 100644 --- a/src/components/modals/main/settings/sections/QuickLinks.jsx +++ b/src/components/modals/main/settings/sections/QuickLinks.jsx @@ -10,9 +10,9 @@ export default function QuickLinks() { <>

{language.title}

- - - + + + ); } diff --git a/src/components/modals/main/settings/sections/Weather.jsx b/src/components/modals/main/settings/sections/Weather.jsx index 954c9af9..3764750d 100644 --- a/src/components/modals/main/settings/sections/Weather.jsx +++ b/src/components/modals/main/settings/sections/Weather.jsx @@ -28,15 +28,15 @@ export default class TimeSettings extends React.PureComponent { const tempFormat = [ { - 'name': 'Celsius', + 'name': language.temp_format.celsius + ' (°C)', 'value': 'celsius' }, { - 'name': 'Fahrenheit', + 'name': language.temp_format.fahrenheit + ' (°F)', 'value': 'fahrenheit' }, { - 'name': 'Kelvin', + 'name': language.temp_format.kelvin + ' (K)', 'value': 'kelvin' } ]; @@ -45,18 +45,18 @@ export default class TimeSettings extends React.PureComponent { <>

{language.title}

-
-
    -

    Location this.getLocation()}>Auto

    +

    {language.location} this.getLocation()}>{language.auto}

    this.setState({ location: e.target.value })}>
-

Extra Information

- - - - - +
+ +

{language.extra_info.title}

+ + + + + ); } diff --git a/src/components/widgets/weather/Weather.jsx b/src/components/widgets/weather/Weather.jsx index 9720bbdb..69670f3e 100644 --- a/src/components/widgets/weather/Weather.jsx +++ b/src/components/widgets/weather/Weather.jsx @@ -68,18 +68,19 @@ export default class Weather extends React.PureComponent { } render() { + const checkValue = (setting) => { + return (localStorage.getItem(setting) === 'true'); + }; + return (
{this.state.weather.temp + this.state.temp_text}
- {this.state.weather.temp_min + this.state.temp_text} {this.state.weather.temp_max + this.state.temp_text} -
- {this.state.weather.humidity}% -
- {this.state.weather.windspeed} m/s -
- {this.state.weather.pressure} hPa + {checkValue('mintemp') ? this.state.weather.temp_min + this.state.temp_text : null} {checkValue('maxtemp') ? this.state.weather.temp_max + this.state.temp_text : null} + {checkValue('humidity') ?
{this.state.weather.humidity}%
: null} + {checkValue('windspeed') ?
{this.state.weather.windspeed} m/s
: null} + {checkValue('atmosphericpressure') ?
{this.state.weather.pressure} hPa
: null}
{this.state.location} {/*{this.state.weather.title}*/} diff --git a/src/translations/en_GB.json b/src/translations/en_GB.json index a85887a4..a2d55dd2 100644 --- a/src/translations/en_GB.json +++ b/src/translations/en_GB.json @@ -143,10 +143,29 @@ "voice_search": "Voice Search" }, "weather": { - "title": "Weather" + "title": "Weather", + "location": "Location", + "auto": "Auto", + "temp_format": { + "title": "Temperature Format", + "celsius": "Celsius", + "fahrenheit": "Fahrenheit", + "kelvin": "Kelvin" + }, + "extra_info": { + "title": "Extra Information", + "humidity": "Humidity", + "wind_speed": "Wind speed", + "min_temp": "Minimum temperature", + "max_temp": "Maximum temperature", + "atmospheric_pressure": "Atmospheric pressure" + } }, "quicklinks": { - "title": "Quick Links" + "title": "Quick Links", + "open_new": "Open in new tab", + "tooltip": "Tooltip", + "chrome_apps": "Chrome Apps" }, "appearance": { "title": "Appearance",