From: copycat-killer Date: Thu, 8 May 2014 13:10:57 +0000 (+0200) Subject: yawn: language failsafe X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/90623d2e5d787909be18b494faa041a5fd8cb515?ds=inline;hp=--cc yawn: language failsafe --- 90623d2e5d787909be18b494faa041a5fd8cb515 diff --git a/widgets/yawn/init.lua b/widgets/yawn/init.lua index 86a2d0f..4109d6c 100644 --- a/widgets/yawn/init.lua +++ b/widgets/yawn/init.lua @@ -36,7 +36,7 @@ local localizations_path = project_path .. 'localizations/' local icon_path = project_path .. 'icons/' local api_url = 'http://weather.yahooapis.com/forecastrss' local units_set = '?u=c&w=' -- Default is Celsius -local language = string.match(os.getenv("LANG"), "(%S*$*)[.]") +local language = string.match(os.getenv("LANG"), "(%S*$*)[.]") or "en_US" -- if LANG is not set local weather_data = nil local notification = nil local city_id = nil