diff --git a/cinnamon-screensaver.pot b/cinnamon-screensaver.pot index 21d50ad3..2f41a6b2 100644 --- a/cinnamon-screensaver.pot +++ b/cinnamon-screensaver.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 10:28-0600\n" +"POT-Creation-Date: 2024-11-22 04:11-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,6 +104,10 @@ msgstr "" msgid "You have the Caps Lock key on." msgstr "" +#: src/weather.py:102 +msgid "in" +msgstr "" + #. This is the first line of text for the backup-locker, explaining how to switch to tty #. and run 'cinnamon-unlock-desktop' command. This appears if the screensaver crashes. #: backup-locker/cs-backup-locker.c:306 diff --git a/src/util/openweathermap.py b/src/util/openweathermap.py index 0832b137..243c1bc9 100644 --- a/src/util/openweathermap.py +++ b/src/util/openweathermap.py @@ -90,7 +90,12 @@ def __init__(self): def GetWeather(self, loc: LocationData): lang = self.locale_to_owm_lang(Pango.language_get_default().to_string()) - pref = Pango.language_get_preferred() + pref = list( + map( + lambda p: self.locale_to_owm_lang(p.to_string()), + Pango.language_get_preferred(), + ) + ) if lang not in OWM_SUPPORTED_LANGS: for locale in pref: if self.locale_to_owm_lang(locale) in OWM_SUPPORTED_LANGS: diff --git a/src/weather.py b/src/weather.py index 24e3303d..e4680004 100644 --- a/src/weather.py +++ b/src/weather.py @@ -99,6 +99,8 @@ def update_weather(self): weather_data = self.weather_provider.GetWeather(self.location) + in_str = " " + _("in") + " " + temp = ( weather_data.temp_f() if settings.get_weather_units() == "imperial" @@ -106,7 +108,9 @@ def update_weather(self): ) temp_string = str(round(temp)) default_message = ( - weather_data.condition.main + " in " + weather_data.location.city + weather_data.condition.description.title() + + in_str + + weather_data.location.city.capitalize() ) markup = '%s\n ' % (