diff options
Diffstat (limited to 'weather-widget')
-rw-r--r-- | weather-widget/locale/pt.lua | 14 | ||||
-rw-r--r-- | weather-widget/weather.lua | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/weather-widget/locale/pt.lua b/weather-widget/locale/pt.lua new file mode 100644 index 0000000..e7f4012 --- /dev/null +++ b/weather-widget/locale/pt.lua @@ -0,0 +1,14 @@ +local pt = { + warning_title = "Widget do tempo", + parameter_warning = "Parâmetros necessários não definidos: ", + directions = { + "N", "NNE", "NE", "ENE", "L", "ESE", "SE", "SSE", "S", "SSO", "SO", + "OSO", "O", "ONO", "NO", "NNO", "N" + }, + feels_like = "Sensação de ", + wind = "Vento: ", + humidity = "Umidade: ", + uv = "UV: " +} + +return pt diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 4e8e659..3ec1c3f 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -18,6 +18,10 @@ local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/weather-widg local GET_FORECAST_CMD = [[bash -c "curl -s --show-error -X GET '%s'"]] local SYS_LANG = os.getenv("LANG"):sub(1, 2) +if SYS_LANG == "C" or SYS_LANG == "C." then + -- C-locale is a common fallback for simple English + SYS_LANG = "en" +end -- default language is ENglish local LANG = gears.filesystem.file_readable(WIDGET_DIR .. "/" .. "locale/" .. SYS_LANG .. ".lua") and SYS_LANG or "en" |