Use language from config instead of system language
This fixes an issue where the weekday would be named according to the system language, but not the specified language in that module's settings.
This commit is contained in:
parent
031b3211ec
commit
b8ef99d07b
@ -107,7 +107,7 @@ class Weather(inkycal_module):
|
|||||||
# additional configuration
|
# additional configuration
|
||||||
self.owm = OWM(self.api_key).weather_manager()
|
self.owm = OWM(self.api_key).weather_manager()
|
||||||
self.timezone = get_system_tz()
|
self.timezone = get_system_tz()
|
||||||
self.locale = sys_locale()[0]
|
self.locale = config['language']
|
||||||
self.weatherfont = ImageFont.truetype(
|
self.weatherfont = ImageFont.truetype(
|
||||||
fonts['weathericons-regular-webfont'], size = self.fontsize)
|
fonts['weathericons-regular-webfont'], size = self.fontsize)
|
||||||
|
|
||||||
@ -417,7 +417,9 @@ class Weather(inkycal_module):
|
|||||||
logger.debug((key,val))
|
logger.debug((key,val))
|
||||||
|
|
||||||
# Get some current weather details
|
# Get some current weather details
|
||||||
temperature = '{}°'.format(weather.temperature(unit=temp_unit)['temp'])
|
temperature = '{}°'.format(round(
|
||||||
|
weather.temperature(unit=temp_unit)['temp'], ndigits=dec_temp))
|
||||||
|
|
||||||
weather_icon = weather.weather_icon_name
|
weather_icon = weather.weather_icon_name
|
||||||
humidity = str(weather.humidity)
|
humidity = str(weather.humidity)
|
||||||
sunrise_raw = arrow.get(weather.sunrise_time()).to(self.timezone)
|
sunrise_raw = arrow.get(weather.sunrise_time()).to(self.timezone)
|
||||||
|
Loading…
Reference in New Issue
Block a user