diff --git a/dialogs/city_id_dialog.py b/dialogs/city_id_dialog.py index 8f99610..2f24952 100644 --- a/dialogs/city_id_dialog.py +++ b/dialogs/city_id_dialog.py @@ -46,10 +46,10 @@ def set_service(widget, label, liststore2, combobox_weather_lang, weather_lang, gw_config['city_id'] = gw_config[data.get_city_list(i)][0].split(';')[0] except: pass - gw_config['max_days'] = data.get_max_days(i) + gw_config['max_days'] = data.get(i)['max_days'] if gw_config['n'] > gw_config['max_days']: gw_config['n'] = gw_config['max_days'] - if data.get_need_appid(i): + if data.get(i)['need_appid']: grid_appid.show() else: grid_appid.hide() @@ -69,7 +69,12 @@ def set_weather_lang(widget): def load_data(service, label, liststore2, combobox_weather_lang, weather_lang, store): global url, example, code, dict_weather_lang, weather_lang_list, gw_config, loading loading = True - url, example, code, dict_weather_lang, weather_lang_list = data.get(service) + d = data.get(service) + url = d['url'] + example = d['example'] + code = d['code'] + dict_weather_lang = d['dict_weather_lang'] + weather_lang_list = d['weather_lang_list'] text = _("Choose your city on")+" %s\n" %(url, url)+\ _("and copy the city code below")+"\n"+\ _("For example")+ ":\n%s/\n" %example+\ @@ -95,7 +100,7 @@ def load_data(service, label, liststore2, combobox_weather_lang, weather_lang, s store.clear() for item in city_list: store.append([item.split(';')[0], item.split(';')[1]]) - if data.get_need_appid(service): + if data.get(service)['need_appid']: grid_appid.show() try: entrybox_appid.set_text(gw_config[data.get_appid(service)]) except: entrybox_appid.set_text('') diff --git a/dialogs/settings_dialog.py b/dialogs/settings_dialog.py index b3a90d3..f310380 100644 --- a/dialogs/settings_dialog.py +++ b/dialogs/settings_dialog.py @@ -197,8 +197,8 @@ def __init__(self): self.spinbutton_scale.connect("value-changed", self.save_settings) self.switch_always_on_top = self.ui.get_object('switch_always_on_top') self.switch_always_on_top.connect("notify::active", self.save_settings) - self.spinbutton_height_tune = self.ui.get_object('spinbutton_height_tune') - self.spinbutton_height_tune.connect("value-changed", self.save_settings) + self.spinbutton_height_adjustment = self.ui.get_object('spinbutton_height_adjustment') + self.spinbutton_height_adjustment.connect("value-changed", self.save_settings) self.clear_x_pos = self.ui.get_object('clear_x_pos') @@ -217,8 +217,8 @@ def __init__(self): self.clear_scale.connect("clicked", self.clear_settings) self.clear_always_on_top = self.ui.get_object('clear_always_on_top') self.clear_always_on_top.connect("clicked", self.clear_settings) - self.clear_height_tune = self.ui.get_object('clear_height_tune') - self.clear_height_tune.connect("clicked", self.clear_settings) + self.clear_height_adjustment = self.ui.get_object('clear_height_adjustment') + self.clear_height_adjustment.connect("clicked", self.clear_settings) # View @@ -546,7 +546,7 @@ def load_config_into_form(self): self.load(self.switch_block_sunrise__show) self.load(self.switch_block_moonrise__show) self.load(self.switch_always_on_top) - self.load(self.spinbutton_height_tune) + self.load(self.spinbutton_height_adjustment) self.adjustment_n_max.set_upper(gw_config_set['max_days']) @@ -854,7 +854,7 @@ def set_service(self, widget): gw_config_set['city_id'] = city_list[0].split(';')[0] else: gw_config_set['city_id'] = 0 - gw_config_set['max_days'] = data.get_max_days(gw_config_set['service']) + gw_config_set['max_days'] = data.get(gw_config_set['service'])['max_days'] if gw_config_set['n'] > gw_config_set['max_days']: gw_config_set['n'] = gw_config_set['max_days'] self.spinbutton_n.set_value(gw_config_set['n']) @@ -865,7 +865,9 @@ def set_service(self, widget): def load_available_service_lang(self, service): global dict_weather_lang, weather_lang_list - url, example, code, dict_weather_lang, weather_lang_list = data.get(gw_config_set['service']) + d = data.get(gw_config_set['service']) + dict_weather_lang = d['dict_weather_lang'] + weather_lang_list = d['weather_lang_list'] self.liststore6.clear() for i in range(len(weather_lang_list)): try: diff --git a/dialogs/settings_dialog.ui b/dialogs/settings_dialog.ui index 99d2452..7e4c802 100644 --- a/dialogs/settings_dialog.ui +++ b/dialogs/settings_dialog.ui @@ -1884,7 +1884,7 @@ True False True - Height tune + Height adjustment 0 @@ -1893,7 +1893,7 @@ - + True True True @@ -1907,7 +1907,7 @@ - + True True end diff --git a/gis-weather.py b/gis-weather.py index 95e7262..6b09550 100644 --- a/gis-weather.py +++ b/gis-weather.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # gis_weather.py -v = '0.8.3.11' +v = '0.8.3.12' # Copyright (C) 2013-2019 Alexander Koltsov # # This program is free software: you can redistribute it and/or modify @@ -203,7 +203,7 @@ def make_dirs(path): 'block_icons_top': 0, 'day_left': 0, 'day_top': 0, - 'height_tune': 0, + 'height_adjustment': 0, 'width_fix': 0, #FIXME Not used 'splash_icon_top': 0, 'splash_version_top': 0, @@ -452,7 +452,7 @@ def get_weather(): service = data.services_list[0] weather_lang = data.get(service)[-1][0] Save_Config() - if city_id == 0 or (not appid and data.get_need_appid(service)): + if city_id == 0 or (not appid and data.get(service)['need_appid']): if app.show_edit_dialog(): Save_Config() if city_id == 0: @@ -994,7 +994,7 @@ def Draw_Weather(self, cr): for i in range(1, n+1): try: - self.draw_weather_icon(cr, i, -8+block_icons_left + margin + block_margin + (i-1)*w_block + (i-1)*block_h_offset, block_icons_top + height-h_block-10 - margin - height_tune) + self.draw_weather_icon(cr, i, -8+block_icons_left + margin + block_margin + (i-1)*w_block + (i-1)*block_h_offset, block_icons_top + height-h_block-10 - margin - height_adjustment) except: print('Can\'t show weather for %s day'%str(i)) @@ -1584,7 +1584,7 @@ def set_window_properties(self): if n < 1: n = 1 # width = w_block*n + block_margin*2 + 10*(n - 1) + 2*margin + block_icons_left width = w_block*n + block_h_offset*n + 2*margin + block_icons_left + width_fix - height = 260 + block_margin + 2*margin + height_tune + height = 260 + block_margin + 2*margin + height_adjustment self.window_main.resize(int(width*scale), int(height*scale)) self.window_main.move(x_pos, y_pos) if sticky: @@ -1620,12 +1620,15 @@ def menu_response(self, widget, event, value=None): weather_menu = True Save_Config() if event == 'goto_site': + print(URL) if URL: webbrowser.open(URL) if event == 'goto_site_hourly': + print(URL_HOURLY) if URL_HOURLY != '?': webbrowser.open(URL_HOURLY) if event == 'goto_site_day': + print(URL_DAILY) if URL_DAILY != '?': webbrowser.open(URL_DAILY+str(value)) if event == 'start_new_instance': @@ -1745,8 +1748,8 @@ def menu_response(self, widget, event, value=None): if value[1] != 0: service = value[0] city_id = value[1].split(';')[0] - max_days = data.get_max_days(service) - if data.get_need_appid(service): + max_days = data.get(service)['max_days'] + if data.get(service)['need_appid']: appid = gw_config[data.get_appid(service)] if service+'_weather_lang' in gw_config.keys(): weather_lang = gw_config[service+'_weather_lang'] @@ -1809,7 +1812,7 @@ def show_edit_dialog(self): pass if response == Gtk.ResponseType.OK: try: - if data.get_need_appid(service) and entrybox_appid.get_text() != '': + if data.get(service)['need_appid'] and entrybox_appid.get_text() != '': appid = entrybox_appid.get_text() gw_config[data.get_appid(service)] = appid Save_Config() @@ -1852,7 +1855,7 @@ def show_edit_dialog(self): city_id = city_list[0].split(';')[0] else: city_id = 0 - if data.get_need_appid(service) and entrybox_appid.get_text() != '': + if data.get(service)['need_appid'] and entrybox_appid.get_text() != '': appid = entrybox_appid.get_text() gw_config[data.get_appid(service)] = appid Save_Config() diff --git a/i18n/fr/LC_MESSAGES/gis-weather.mo b/i18n/fr/LC_MESSAGES/gis-weather.mo index 8d275a6..43f1ea5 100644 Binary files a/i18n/fr/LC_MESSAGES/gis-weather.mo and b/i18n/fr/LC_MESSAGES/gis-weather.mo differ diff --git a/i18n/pt_BR/LC_MESSAGES/gis-weather.mo b/i18n/pt_BR/LC_MESSAGES/gis-weather.mo index 3d90d62..803b923 100644 Binary files a/i18n/pt_BR/LC_MESSAGES/gis-weather.mo and b/i18n/pt_BR/LC_MESSAGES/gis-weather.mo differ diff --git a/po/en.po b/po/en.po index 230db2e..cab0607 100644 --- a/po/en.po +++ b/po/en.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Gis Weather\n" -"POT-Creation-Date: 2019-06-30 23:17+0300\n" -"PO-Revision-Date: 2019-06-30 23:17+0300\n" +"POT-Creation-Date: 2019-07-03 23:34+0300\n" +"PO-Revision-Date: 2019-07-03 23:34+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: en\n" @@ -48,7 +48,7 @@ msgid "Backgrounds" msgstr "" #: dialogs/about_dialog.py:46 dialogs/settings_dialog.ui:3807 -#: dialogs/settings_dialog.ui:4262 utils/gw_menu.py:376 +#: dialogs/settings_dialog.ui:4262 utils/gw_menu.py:381 msgid "Icons" msgstr "" @@ -77,7 +77,7 @@ msgid "City code" msgstr "" #: dialogs/city_id_dialog.py:118 dialogs/city_id_dialog.ui:42 -#: dialogs/settings_dialog.ui:652 utils/gw_menu.py:41 utils/gw_menu.py:360 +#: dialogs/settings_dialog.ui:652 utils/gw_menu.py:46 utils/gw_menu.py:365 msgid "Location" msgstr "" @@ -113,11 +113,11 @@ msgstr "" msgid "Weather service" msgstr "" -#: dialogs/city_id_dialog.ui:293 gis-weather.py:1835 +#: dialogs/city_id_dialog.ui:293 gis-weather.py:1838 msgid "Invalid location code" msgstr "" -#: dialogs/city_id_dialog.ui:361 gis-weather.py:1830 +#: dialogs/city_id_dialog.ui:361 gis-weather.py:1833 msgid "Added" msgstr "" @@ -130,12 +130,12 @@ msgstr "" msgid "Send email" msgstr "" -#: dialogs/help_dialog.py:30 utils/gw_menu.py:409 +#: dialogs/help_dialog.py:30 utils/gw_menu.py:414 msgid "Help" msgstr "" #: dialogs/help_dialog.ui:25 dialogs/settings_dialog.ui:608 -#: dialogs/update_dialog.ui:44 utils/gw_menu.py:465 +#: dialogs/update_dialog.ui:44 utils/gw_menu.py:470 msgid "Close" msgstr "" @@ -181,7 +181,7 @@ msgid "Translation status" msgstr "" #: dialogs/settings_dialog.py:103 dialogs/settings_dialog.py:804 -#: utils/gw_menu.py:401 +#: utils/gw_menu.py:406 msgid "Preferences" msgstr "" @@ -229,7 +229,7 @@ msgstr "" msgid "Always" msgstr "" -#: dialogs/settings_dialog.py:452 utils/gw_menu.py:255 +#: dialogs/settings_dialog.py:452 utils/gw_menu.py:260 msgid "No" msgstr "" @@ -259,7 +259,7 @@ msgstr "" msgid "Configuration folder" msgstr "" -#: dialogs/settings_dialog.ui:712 utils/gw_menu.py:181 +#: dialogs/settings_dialog.ui:712 utils/gw_menu.py:186 msgid "Setup..." msgstr "" @@ -279,7 +279,7 @@ msgstr "" msgid "Add launcher icon to menu" msgstr "" -#: dialogs/settings_dialog.ui:937 utils/gw_menu.py:332 +#: dialogs/settings_dialog.ui:937 utils/gw_menu.py:337 msgid "Refresh" msgstr "" @@ -307,7 +307,7 @@ msgstr "" msgid "General" msgstr "" -#: dialogs/settings_dialog.ui:1268 gis-weather.py:899 utils/gw_menu.py:71 +#: dialogs/settings_dialog.ui:1268 gis-weather.py:899 utils/gw_menu.py:76 msgid "Wind" msgstr "" @@ -351,11 +351,11 @@ msgstr "" msgid "Fix BadDrawable error" msgstr "" -#: dialogs/settings_dialog.ui:1663 utils/gw_menu.py:286 +#: dialogs/settings_dialog.ui:1663 utils/gw_menu.py:291 msgid "On all desktops" msgstr "" -#: dialogs/settings_dialog.ui:1676 utils/gw_menu.py:280 +#: dialogs/settings_dialog.ui:1676 utils/gw_menu.py:285 msgid "Lock position" msgstr "" @@ -367,15 +367,15 @@ msgstr "" msgid "Scale" msgstr "" -#: dialogs/settings_dialog.ui:1849 utils/gw_menu.py:292 +#: dialogs/settings_dialog.ui:1849 utils/gw_menu.py:297 msgid "Always on top" msgstr "" #: dialogs/settings_dialog.ui:1887 -msgid "Height tune" +msgid "Height adjustment" msgstr "" -#: dialogs/settings_dialog.ui:1932 utils/gw_menu.py:391 +#: dialogs/settings_dialog.ui:1932 utils/gw_menu.py:396 msgid "Window" msgstr "" @@ -494,7 +494,7 @@ msgstr "" msgid "Weather description style" msgstr "" -#: dialogs/settings_dialog.ui:3459 utils/gw_menu.py:386 +#: dialogs/settings_dialog.ui:3459 utils/gw_menu.py:391 msgid "Text" msgstr "" @@ -514,7 +514,7 @@ msgstr "" msgid "Color" msgstr "" -#: dialogs/settings_dialog.ui:3721 utils/gw_menu.py:381 +#: dialogs/settings_dialog.ui:3721 utils/gw_menu.py:386 msgid "Background" msgstr "" @@ -626,7 +626,7 @@ msgstr "" msgid "testing mode turned on" msgstr "" -#: gis-weather.py:234 utils/gw_menu.py:61 utils/presets.py:61 +#: gis-weather.py:234 utils/gw_menu.py:66 utils/presets.py:61 #: utils/presets.py:178 utils/presets.py:214 utils/presets.py:249 #: utils/presets.py:282 msgid "Now" @@ -704,15 +704,15 @@ msgstr "" msgid "feels like" msgstr "" -#: gis-weather.py:901 utils/gw_menu.py:66 +#: gis-weather.py:901 utils/gw_menu.py:71 msgid "Humidity" msgstr "" -#: gis-weather.py:902 utils/gw_menu.py:82 +#: gis-weather.py:902 utils/gw_menu.py:87 msgid "Sunrise" msgstr "" -#: gis-weather.py:903 utils/gw_menu.py:87 +#: gis-weather.py:903 utils/gw_menu.py:92 msgid "Sunset" msgstr "" @@ -760,27 +760,27 @@ msgstr "" msgid "water" msgstr "" -#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:361 +#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:374 #: services/openweathermap.py:259 services/yr.py:147 msgid "Morning" msgstr "" -#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:361 +#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:374 #: services/openweathermap.py:259 services/yr.py:147 msgid "Day" msgstr "" -#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:361 +#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:374 #: services/openweathermap.py:259 services/yr.py:147 msgid "Evening" msgstr "" -#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:361 +#: gis-weather.py:1149 gis-weather.py:1191 services/gismeteo.py:374 #: services/openweathermap.py:259 services/yr.py:147 msgid "Night" msgstr "" -#: gis-weather.py:1154 gis-weather.py:1156 utils/gw_menu.py:112 +#: gis-weather.py:1154 gis-weather.py:1156 utils/gw_menu.py:117 msgid "Tomorrow" msgstr "" @@ -812,19 +812,19 @@ msgstr "" msgid "including indent" msgstr "" -#: gis-weather.py:1728 +#: gis-weather.py:1731 msgid "Requires restart" msgstr "" -#: gis-weather.py:1797 +#: gis-weather.py:1800 msgid "Removed" msgstr "" -#: gis-weather.py:1905 +#: gis-weather.py:1908 msgid "Your screen does not support alpha" msgstr "" -#: gis-weather.py:1907 +#: gis-weather.py:1910 msgid "Your screen supports alpha" msgstr "" @@ -832,17 +832,17 @@ msgstr "" msgid "If the city code is wrong, please read" msgstr "" -#: services/accuweather.py:200 services/gismeteo.py:246 +#: services/accuweather.py:200 services/gismeteo.py:259 #: services/openweathermap.py:88 services/yr.py:62 msgid "Failed to get the name of the location" msgstr "" -#: services/accuweather.py:226 services/gismeteo.py:265 +#: services/accuweather.py:226 services/gismeteo.py:278 #: services/openweathermap.py:117 services/yr.py:73 msgid "Getting weather for" msgstr "" -#: services/accuweather.py:226 services/gismeteo.py:265 +#: services/accuweather.py:226 services/gismeteo.py:278 #: services/openweathermap.py:117 services/yr.py:73 msgid "days" msgstr "" @@ -851,12 +851,12 @@ msgstr "" msgid "Calm" msgstr "" -#: services/accuweather.py:506 services/gismeteo.py:410 +#: services/accuweather.py:506 services/gismeteo.py:423 #: services/openweathermap.py:282 msgid "updated on server" msgstr "" -#: services/accuweather.py:507 services/gismeteo.py:411 +#: services/accuweather.py:507 services/gismeteo.py:424 #: services/openweathermap.py:283 services/yr.py:193 msgid "weather received" msgstr "" @@ -877,55 +877,55 @@ msgstr "" msgid "Switch to app menu" msgstr "" -#: utils/gw_menu.py:120 +#: utils/gw_menu.py:41 utils/gw_menu.py:328 +msgid "Show/Hide widget" +msgstr "" + +#: utils/gw_menu.py:125 msgid "Precipitation" msgstr "" -#: utils/gw_menu.py:270 +#: utils/gw_menu.py:275 msgid "Black" msgstr "" -#: utils/gw_menu.py:270 +#: utils/gw_menu.py:275 msgid "White" msgstr "" -#: utils/gw_menu.py:270 +#: utils/gw_menu.py:275 msgid "Gray" msgstr "" -#: utils/gw_menu.py:302 +#: utils/gw_menu.py:307 msgid "Save screenshot" msgstr "" -#: utils/gw_menu.py:318 -msgid "Switch to weather menu" -msgstr "" - #: utils/gw_menu.py:323 -msgid "Show/Hide widget" +msgid "Switch to weather menu" msgstr "" -#: utils/gw_menu.py:340 +#: utils/gw_menu.py:345 msgid "Start new instance" msgstr "" -#: utils/gw_menu.py:348 +#: utils/gw_menu.py:353 msgid "Go to site" msgstr "" -#: utils/gw_menu.py:366 +#: utils/gw_menu.py:371 msgid "Indicator icons" msgstr "" -#: utils/gw_menu.py:371 +#: utils/gw_menu.py:376 msgid "Menu icons" msgstr "" -#: utils/gw_menu.py:396 +#: utils/gw_menu.py:401 msgid "Presets" msgstr "" -#: utils/gw_menu.py:417 +#: utils/gw_menu.py:422 msgid "About" msgstr "" diff --git a/po/fr.po b/po/fr.po index 5eb8158..46bcb2c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,6 +1,7 @@ # # Translators: # RingOV , 2014 +# AO , 2019 # AO , 2017 # AO , 2017 # AO , 2016 @@ -11,8 +12,8 @@ msgid "" msgstr "" "Project-Id-Version: Gis Weather\n" "POT-Creation-Date: 2019-06-30 23:17+0300\n" -"PO-Revision-Date: 2019-06-30 20:17+0000\n" -"Last-Translator: RingOV \n" +"PO-Revision-Date: 2019-07-03 19:35+0000\n" +"Last-Translator: AO \n" "Language-Team: French (http://www.transifex.com/gis-weather-team/gis-weather/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -42,7 +43,7 @@ msgid "" "\n" "You can find the full text of the license under\n" "http://www.gnu.org/licenses/gpl.txt" -msgstr "Ce programme est un logiciel libre : vous pouvez le redistribuer et/ou\nle modifier selon les termes de la Licence Publique Générale GNU\npubliée par la « Free Software Foundation », soit la version 3 de la\nlicence, ou (selon votre choix) toute version ultérieure.\n\nCe programme est distribué dans l'espoir qu'il sera utile, mais SANS\nAUCUNE GARANTIE ; sans même la garantie implicite de\nCOMMERCIALISATION ou D'ADÉQUATION À UN USAGE\nPARTICULIER. Voir la Licence Publique Générale GNU pour plus de\ndétails.\n\nVous pouvez trouver le texte intégral de la licence sur\nhttp://www.gnu.org/licenses/gpl.txt" +msgstr "Ce programme est un logiciel libre : vous pouvez le redistribuer ou\nle modifier selon les termes de la Licence Publique Générale GNU\npubliée par la « Free Software Foundation », soit la version 3 de la\nlicence, ou (selon votre choix) toute version ultérieure.\n\nCe programme est distribué dans l’espoir qu’il sera utile, mais SANS\nAUCUNE GARANTIE ; sans même la garantie implicite de\nCOMMERCIALISATION ou D’ADÉQUATION À UN USAGE\nPARTICULIER. Voir la Licence Publique Générale GNU pour plus de\ndétails.\n\nVous pouvez trouver le texte intégral de la licence sur\nhttp://www.gnu.org/licenses/gpl.txt" #: dialogs/about_dialog.py:27 utils/autorun.py:72 utils/desktop.py:23 msgid "Weather widget" @@ -63,7 +64,7 @@ msgstr "Icônes" #: dialogs/about_dialog.py:63 msgid "translator-credits" -msgstr "spyder \nhttps://www.transifex.com/accounts/profile/yahoe.001/" +msgstr "https://www.transifex.com/accounts/profile/yahoe.001/" #: dialogs/city_id_dialog.py:35 gis-weather.py:313 msgid "Error loading config file" @@ -106,13 +107,13 @@ msgstr "Ajouter " msgid "" "Close & Reload\n" "selected" -msgstr "Fermer et recharger\n la sélection" +msgstr "Fermer et recharger la sélection" #: dialogs/city_id_dialog.ui:87 msgid "" "Remove\n" "selected" -msgstr "Supprimer\nla sélection" +msgstr "Supprimer la sélection" #: dialogs/city_id_dialog.ui:145 msgid "Language weather" @@ -124,7 +125,7 @@ msgstr "Service météo" #: dialogs/city_id_dialog.ui:293 gis-weather.py:1835 msgid "Invalid location code" -msgstr "Code d'emplacement invalide" +msgstr "Le code d’emplacement est invalide" #: dialogs/city_id_dialog.ui:361 gis-weather.py:1830 msgid "Added" @@ -150,20 +151,20 @@ msgstr "Fermer" #: dialogs/help_dialog.ui:92 dialogs/update_dialog.ui:334 msgid "Found a bug?" -msgstr "Vous avez trouvé un bogue ?" +msgstr "Avez-vous trouvé un bogue ?" #: dialogs/help_dialog.ui:109 dialogs/settings_dialog.ui:815 #: dialogs/update_dialog.ui:351 msgid "Want to translate?" -msgstr "Vous voulez traduire ?" +msgstr "Voulez-vous traduire ?" #: dialogs/help_dialog.ui:126 dialogs/update_dialog.ui:369 msgid "Have any questions?" -msgstr "Vous avez des questions ?" +msgstr "Avez-vous des questions ?" #: dialogs/help_dialog.ui:143 dialogs/update_dialog.ui:387 msgid "Have any suggestions?" -msgstr "Vous avez des suggestions ?" +msgstr "Avez-vous des suggestions ?" #: dialogs/help_dialog.ui:163 msgid "You can support my project" @@ -183,7 +184,7 @@ msgstr "Code source" #: dialogs/help_dialog.ui:270 dialogs/update_dialog.ui:203 msgid "What's New" -msgstr "Quoi de neuf ?" +msgstr "Nouveautés" #: dialogs/help_dialog.ui:286 dialogs/settings_dialog.ui:958 msgid "Translation status" @@ -262,7 +263,7 @@ msgstr "Mise à jour (en minutes)" #: dialogs/settings_dialog.ui:678 msgid "Check for updates" -msgstr "Vérifier la disponibilité d'une mise à jour" +msgstr "Vérifier la présence d’une mise à jour" #: dialogs/settings_dialog.ui:702 gis-weather.py:297 msgid "Configuration folder" @@ -270,11 +271,11 @@ msgstr "Dossier de configuration" #: dialogs/settings_dialog.ui:712 utils/gw_menu.py:181 msgid "Setup..." -msgstr "Configuration ..." +msgstr "Configuration…" #: dialogs/settings_dialog.ui:755 msgid "Open..." -msgstr "Ouvrir..." +msgstr "Ouvrir…" #: dialogs/settings_dialog.ui:834 msgid "Program language" @@ -290,7 +291,7 @@ msgstr "Ajouter une icône de lancement au menu" #: dialogs/settings_dialog.ui:937 utils/gw_menu.py:332 msgid "Refresh" -msgstr "Rafraîchir" +msgstr "Actualiser" #: dialogs/settings_dialog.ui:1007 msgid "Autostart at login" @@ -354,11 +355,11 @@ msgstr "Haut" #: dialogs/settings_dialog.ui:1559 msgid "Padding" -msgstr "Padding" +msgstr "Remplissage" #: dialogs/settings_dialog.ui:1650 msgid "Fix BadDrawable error" -msgstr "Correction des erreurs « BadDrawable »" +msgstr "Correction des erreurs « BadDrawable »" #: dialogs/settings_dialog.ui:1663 utils/gw_menu.py:286 msgid "On all desktops" @@ -382,7 +383,7 @@ msgstr "Toujours sur le dessus" #: dialogs/settings_dialog.ui:1887 msgid "Height tune" -msgstr "" +msgstr "Ajustement de la hauteur" #: dialogs/settings_dialog.ui:1932 utils/gw_menu.py:391 msgid "Window" @@ -399,7 +400,7 @@ msgstr "Afficher" #: dialogs/settings_dialog.ui:2216 dialogs/settings_dialog.ui:2399 #: dialogs/settings_dialog.ui:2593 msgid "Offset from center" -msgstr "Décalage du centre" +msgstr "Décalage à partir du centre" #: dialogs/settings_dialog.ui:2063 msgid "Block Tomorrow" @@ -407,7 +408,7 @@ msgstr "Bloc Demain" #: dialogs/settings_dialog.ui:2180 msgid "Block Today" -msgstr "Bloc Aujourd'hui" +msgstr "Bloc Aujourd’hui" #: dialogs/settings_dialog.ui:2258 msgid "Block Now" @@ -435,19 +436,19 @@ msgstr "Bloc Infos complémentaires" #: dialogs/settings_dialog.ui:2739 msgid "Block Moonrise" -msgstr "Bloc levé de lune" +msgstr "Bloc Levé de lune" #: dialogs/settings_dialog.ui:2892 msgid "Hide splash screen after attempts (0 - do not hide)" -msgstr "Masquer l'écran de démarrage après plusieurs tentatives (0 - ne pas cacher)" +msgstr "Masquer l’écran de démarrage après plusieurs tentatives (0 - ne pas cacher)" #: dialogs/settings_dialog.ui:2905 msgid "Show splash screen" -msgstr "Afficher l'écran de démarrage" +msgstr "Afficher l’écran de démarrage" #: dialogs/settings_dialog.ui:2918 msgid "Show weather retrieval time" -msgstr "Afficher l'heure de réception de la météo" +msgstr "Afficher l’heure de réception de la météo" #: dialogs/settings_dialog.ui:2931 msgid "Show chance of rain" @@ -459,7 +460,7 @@ msgstr "Nombre de jours" #: dialogs/settings_dialog.ui:2991 msgid "Time of day gradient" -msgstr "" +msgstr "Gradient de l’heure de la journée" #: dialogs/settings_dialog.ui:3052 msgid "View" @@ -489,7 +490,7 @@ msgstr "Vent fort\n(-1 = Pas en surbrillance)" #: dialogs/settings_dialog.ui:3243 msgid "Shadow color" -msgstr "Couleur de l'ombrage du texte" +msgstr "Couleur de l’ombrage du texte" #: dialogs/settings_dialog.ui:3256 dialogs/settings_dialog.ui:4009 msgid "Shadow" @@ -541,11 +542,11 @@ msgstr "Largeur" #: dialogs/settings_dialog.ui:3996 msgid "Color shadow" -msgstr "Couleur de l'ombrage du texte" +msgstr "Couleur de l’ombrage du texte" #: dialogs/settings_dialog.ui:4214 msgid "Show text" -msgstr "Montrer le texte" +msgstr "Afficher le texte" #: dialogs/settings_dialog.ui:4309 msgid "Fix the size" @@ -573,15 +574,15 @@ msgstr "Version actuelle" #: dialogs/update_dialog.py:90 msgid "Available new version" -msgstr "Nouvelle version disponible" +msgstr "Nouvelle version proposée" #: dialogs/update_dialog.py:113 msgid "Error downloading updates" -msgstr "Erreur lors du téléchargement des mises à jour" +msgstr "Erreur de téléchargement des mises à jour" #: dialogs/update_dialog.py:148 msgid "Error installing updates" -msgstr "Erreur lors de l'installation des mises à jour" +msgstr "Erreur d’installation des mises à jour" #: dialogs/update_dialog.py:152 dialogs/update_dialog.ui:575 msgid "Installation" @@ -605,7 +606,7 @@ msgstr "Vous pouvez soutenir mon projet" #: dialogs/update_dialog.ui:469 msgid "Additional information" -msgstr "Informations complémentaires" +msgstr "Renseignements complémentaires" #: dialogs/update_dialog.ui:589 msgid "Cleaning temporary files" @@ -617,7 +618,7 @@ msgstr "Redémarrer" #: dialogs/update_dialog.ui:701 msgid "Update successful" -msgstr "Mise à jour réussie" +msgstr "La mise à jour est réussie" #: dialogs/update_dialog.ui:756 msgid "Update error" @@ -625,11 +626,11 @@ msgstr "Erreur de mise à jour" #: gis-weather.py:42 msgid "Running multiple instances is not supported" -msgstr "L'exécution de plusieurs instances n'est pas prise en charge" +msgstr "L’exécution de plusieurs instances n’est pas prise en charge" #: gis-weather.py:47 msgid "number of instances" -msgstr "Nombre d'instances" +msgstr "Nombre d’instances" #: gis-weather.py:55 msgid "testing mode turned on" @@ -647,7 +648,7 @@ msgstr "Erreur de chargement du modèle de couleurs" #: gis-weather.py:359 msgid "Error loading preset" -msgstr "Erreur lors du chargement des préréglages" +msgstr "Erreur de chargement des préréglages" #: gis-weather.py:369 msgid "Enter full path to script" @@ -659,7 +660,7 @@ msgstr "Quitter" #: gis-weather.py:482 msgid "Check for new version" -msgstr "Vérifier la disponibilité d'une nouvelle version" +msgstr "Vérifier la présence d’une nouvelle version" #: gis-weather.py:487 gis-weather.py:496 msgid "Unable to check for updates" @@ -667,7 +668,7 @@ msgstr "Impossible de vérifier les mises à jour" #: gis-weather.py:512 msgid "New version available" -msgstr "Nouvelle version disponible" +msgstr "Nouvelle version proposée" #: gis-weather.py:519 msgid "You are using the latest version" @@ -675,23 +676,23 @@ msgstr "Vous utilisez la dernière version" #: gis-weather.py:537 gis-weather.py:1528 msgid "Screenshot saved to" -msgstr "Capture d'écran enregistrée vers" +msgstr "Capture d’écran enregistrée vers" #: gis-weather.py:541 msgid "Unable to get the screenshot" -msgstr "Impossible de capturer l'écran" +msgstr "Impossible de capturer l’écran" #: gis-weather.py:738 msgid "Getting weather..." -msgstr "Récupération de la météo ..." +msgstr "Récupération de la météo…" #: gis-weather.py:741 msgid "Error getting weather" -msgstr "Erreur lors de la récupération de la météo" +msgstr "Erreur de récupération de la météo" #: gis-weather.py:743 msgid "Location not set" -msgstr "Emplacement non défini" +msgstr "L’emplacement n’est pas défini" #: gis-weather.py:803 gis-weather.py:865 msgid "Next update in" @@ -795,15 +796,15 @@ msgstr "Demain" #: gis-weather.py:1195 msgid "Today" -msgstr "Aujourd'hui" +msgstr "Aujourd’hui" #: gis-weather.py:1349 msgid "Background image not found" -msgstr "L'image d’arrière-plan n'a pas été trouvée" +msgstr "L’image d’arrière-plan n’a pas été trouvée" #: gis-weather.py:1428 gis-weather.py:1441 msgid "Icon not found" -msgstr "Icône introuvable" +msgstr "L’icône est introuvable" #: gis-weather.py:1539 msgid "Widget size" @@ -844,7 +845,7 @@ msgstr "Si le code de ville est erroné, veuillez lire" #: services/accuweather.py:200 services/gismeteo.py:246 #: services/openweathermap.py:88 services/yr.py:62 msgid "Failed to get the name of the location" -msgstr "Impossible d'obtenir le nom de l'emplacement" +msgstr "Impossible d’obtenir le nom de l’emplacement" #: services/accuweather.py:226 services/gismeteo.py:265 #: services/openweathermap.py:117 services/yr.py:73 @@ -884,7 +885,7 @@ msgstr "nd" #: utils/gw_menu.py:36 msgid "Switch to app menu" -msgstr "" +msgstr "Basculer vers le menu de l’appli" #: utils/gw_menu.py:120 msgid "Precipitation" @@ -904,15 +905,15 @@ msgstr "Gris" #: utils/gw_menu.py:302 msgid "Save screenshot" -msgstr "Capturer l'écran météo" +msgstr "Capturer l’écran météo" #: utils/gw_menu.py:318 msgid "Switch to weather menu" -msgstr "" +msgstr "Basculer vers le menu de la météo" #: utils/gw_menu.py:323 msgid "Show/Hide widget" -msgstr "Montrer/cacher le widget" +msgstr "Afficher/cacher le widget" #: utils/gw_menu.py:340 msgid "Start new instance" @@ -920,11 +921,11 @@ msgstr "Lancer une nouvelle instance" #: utils/gw_menu.py:348 msgid "Go to site" -msgstr "Aller au site" +msgstr "Aller vers le site" #: utils/gw_menu.py:366 msgid "Indicator icons" -msgstr "Icônes de l'indicateur" +msgstr "Icônes de l’indicateur" #: utils/gw_menu.py:371 msgid "Menu icons" @@ -936,7 +937,7 @@ msgstr "Préréglages" #: utils/gw_menu.py:417 msgid "About" -msgstr "À propos de l'appli" +msgstr "À propos de l’appli" #: utils/opener.py:102 msgid "Unable to download page, check the network connection" diff --git a/po/pt_BR.po b/po/pt_BR.po index 24f5256..4493575 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -3,12 +3,13 @@ # Alex Sandulyak , 2016 # Fernando Cardoso , 2015 # Jader Silva Justino , 2014 +# Luciano Machado , 2019 msgid "" msgstr "" "Project-Id-Version: Gis Weather\n" "POT-Creation-Date: 2019-06-30 23:17+0300\n" -"PO-Revision-Date: 2019-06-30 20:17+0000\n" -"Last-Translator: RingOV \n" +"PO-Revision-Date: 2019-07-03 00:58+0000\n" +"Last-Translator: Luciano Machado \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/gis-weather-team/gis-weather/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -374,7 +375,7 @@ msgstr "Escala" #: dialogs/settings_dialog.ui:1849 utils/gw_menu.py:292 msgid "Always on top" -msgstr "" +msgstr "Sempre visível" #: dialogs/settings_dialog.ui:1887 msgid "Height tune" @@ -629,7 +630,7 @@ msgstr "número de instâncias" #: gis-weather.py:55 msgid "testing mode turned on" -msgstr "" +msgstr "modo teste ligado" #: gis-weather.py:234 utils/gw_menu.py:61 utils/presets.py:61 #: utils/presets.py:178 utils/presets.py:214 utils/presets.py:249 @@ -711,15 +712,15 @@ msgstr "" #: gis-weather.py:901 utils/gw_menu.py:66 msgid "Humidity" -msgstr "" +msgstr "Umidade" #: gis-weather.py:902 utils/gw_menu.py:82 msgid "Sunrise" -msgstr "" +msgstr "Nascer do sol" #: gis-weather.py:903 utils/gw_menu.py:87 msgid "Sunset" -msgstr "" +msgstr "Pôr do sol" #: gis-weather.py:1036 msgid "Updated on server" @@ -884,7 +885,7 @@ msgstr "" #: utils/gw_menu.py:120 msgid "Precipitation" -msgstr "" +msgstr "Precipitação" #: utils/gw_menu.py:270 msgid "Black" @@ -916,7 +917,7 @@ msgstr "Inicie nova instancia" #: utils/gw_menu.py:348 msgid "Go to site" -msgstr "" +msgstr "Ir para o site" #: utils/gw_menu.py:366 msgid "Indicator icons" diff --git a/services/data.py b/services/data.py index f01700a..0b8c581 100644 --- a/services/data.py +++ b/services/data.py @@ -51,25 +51,25 @@ def get_city_name(service, city_id): if service == 'Yr': return yr.get_city_name(city_id) -def get_max_days(service): - if service == 'Gismeteo': - return gismeteo.max_days - # if service == 'AccuWeather': - # return accuweather.max_days - if service == 'OpenWeatherMap': - return openweathermap.max_days - if service == 'Yr': - return yr.max_days +# def get_max_days(service): +# if service == 'Gismeteo': +# return gismeteo.max_days +# # if service == 'AccuWeather': +# # return accuweather.max_days +# if service == 'OpenWeatherMap': +# return openweathermap.max_days +# if service == 'Yr': +# return yr.max_days -def get_need_appid(service): - if service == 'Gismeteo': - return gismeteo.need_appid - # if service == 'AccuWeather': - # return accuweather.need_appid - if service == 'OpenWeatherMap': - return openweathermap.need_appid - if service == 'Yr': - return yr.need_appid +# def get_need_appid(service): +# if service == 'Gismeteo': +# return gismeteo.need_appid +# # if service == 'AccuWeather': +# # return accuweather.need_appid +# if service == 'OpenWeatherMap': +# return openweathermap.need_appid +# if service == 'Yr': +# return yr.need_appid def get_weather(service): if service == 'Gismeteo': diff --git a/services/gismeteo.py b/services/gismeteo.py index 8f3c71d..662f4d1 100644 --- a/services/gismeteo.py +++ b/services/gismeteo.py @@ -8,20 +8,33 @@ import os from datetime import datetime, timezone -data = [ - "http://www.gismeteo.com", # url - "https://www.gismeteo.com/weather-alphen-1234", # example - "1234", # code - { - 'en': 'English', - 'ru': 'Русский', - 'uk': 'Українська', - 'pl': 'Polski', - }, # dict_weather_lang - ('en', 'ru', 'uk', 'pl') # weather_lang_list -] -max_days = 6 -need_appid = False +# data = [ +# "http://www.gismeteo.com", # url +# "https://www.gismeteo.com/weather-alphen-1234", # example +# "1234", # code +# { +# 'en': 'English', +# 'ru': 'Русский', +# 'uk': 'Українська', +# 'pl': 'Polski', +# }, # dict_weather_lang +# ('en', 'ru', 'uk', 'pl') # weather_lang_list +# ] +data = { + 'url': "http://www.gismeteo.com", # url + 'example': "https://www.gismeteo.com/weather-alphen-1234", # example + 'code': "1234", # code + 'dict_weather_lang': + { + 'en': 'English', + 'ru': 'Русский', + 'uk': 'Українська', + 'pl': 'Polski', + }, # dict_weather_lang + 'weather_lang_list': ('en', 'ru', 'uk', 'pl'), # weather_lang_list + 'max_days': 6, + 'need_appid': False +} # weather variables w = weather_vars.weather diff --git a/services/openweathermap.py b/services/openweathermap.py index 2f7efc3..6d514f5 100644 --- a/services/openweathermap.py +++ b/services/openweathermap.py @@ -8,35 +8,63 @@ import json from datetime import datetime -data = [ - "http://openweathermap.org/find?q=", # url - "http://openweathermap.org/city/1234", # example - "1234 %s API key (APPID)"%_('How to get'), # code - { - 'en': 'English', - 'ru': 'Russian', - 'it': 'Italian', - 'es': 'Spanish', - 'uk': 'Ukrainian', - 'de': 'German', - 'pt': 'Portuguese', - 'ro': 'Romanian', - 'pl': 'Polish', - 'fi': 'Finnish', - 'nl': 'Dutch', - 'fr': 'French', - 'bg': 'Bulgarian', - 'sv': 'Swedish', - 'zh_tw': 'ChineseTraditional', - 'zh': 'ChineseSimplified', - 'tr': 'Turkish', - 'hr': 'Croatian', - 'ca': 'Catalan' - }, # dict_weather_lang - ('en', 'ru', 'it', 'es', 'uk', 'de', 'pt', 'ro', 'pl', 'fi', 'nl', 'fr', 'bg', 'sv', 'zh_tw', 'zh', 'tr', 'hr', 'ca') # weather_lang_list -] -max_days = 5 -need_appid = True +# data = [ +# "http://openweathermap.org/find?q=", # url +# "http://openweathermap.org/city/1234", # example +# "1234 %s API key (APPID)"%_('How to get'), # code +# { +# 'en': 'English', +# 'ru': 'Russian', +# 'it': 'Italian', +# 'es': 'Spanish', +# 'uk': 'Ukrainian', +# 'de': 'German', +# 'pt': 'Portuguese', +# 'ro': 'Romanian', +# 'pl': 'Polish', +# 'fi': 'Finnish', +# 'nl': 'Dutch', +# 'fr': 'French', +# 'bg': 'Bulgarian', +# 'sv': 'Swedish', +# 'zh_tw': 'ChineseTraditional', +# 'zh': 'ChineseSimplified', +# 'tr': 'Turkish', +# 'hr': 'Croatian', +# 'ca': 'Catalan' +# }, # dict_weather_lang +# ('en', 'ru', 'it', 'es', 'uk', 'de', 'pt', 'ro', 'pl', 'fi', 'nl', 'fr', 'bg', 'sv', 'zh_tw', 'zh', 'tr', 'hr', 'ca') # weather_lang_list +# ] +data = { + 'url': "http://openweathermap.org/find?q=", # url + 'example': "http://openweathermap.org/city/1234", # example + 'code': "1234 %s API key (APPID)"%_('How to get'), # code + 'dict_weather_lang': + { + 'en': 'English', + 'ru': 'Russian', + 'it': 'Italian', + 'es': 'Spanish', + 'uk': 'Ukrainian', + 'de': 'German', + 'pt': 'Portuguese', + 'ro': 'Romanian', + 'pl': 'Polish', + 'fi': 'Finnish', + 'nl': 'Dutch', + 'fr': 'French', + 'bg': 'Bulgarian', + 'sv': 'Swedish', + 'zh_tw': 'ChineseTraditional', + 'zh': 'ChineseSimplified', + 'tr': 'Turkish', + 'hr': 'Croatian', + 'ca': 'Catalan' + }, # dict_weather_lang + 'weather_lang_list': ('en', 'ru', 'it', 'es', 'uk', 'de', 'pt', 'ro', 'pl', 'fi', 'nl', 'fr', 'bg', 'sv', 'zh_tw', 'zh', 'tr', 'hr', 'ca'), # weather_lang_list + 'max_days': 5, + 'need_appid': True +} # weather variables w = weather_vars.weather diff --git a/services/yr.py b/services/yr.py index 3954e06..bfbd6d9 100644 --- a/services/yr.py +++ b/services/yr.py @@ -7,17 +7,27 @@ import time import os -data = [ - "http://www.yr.no", # url - "www.yr.no/sted/South_Africa/North-West/Sun_City", # example - "South_Africa/North-West/Sun_City", # code - { - 'en': 'English' - }, # dict_weather_lang - ('en', '') # weather_lang_list -] -max_days = 8 -need_appid = False +# data = [ +# "http://www.yr.no", # url +# "www.yr.no/sted/South_Africa/North-West/Sun_City", # example +# "South_Africa/North-West/Sun_City", # code +# { +# 'en': 'English' +# }, # dict_weather_lang +# ('en', '') # weather_lang_list +# ] + +data = { + 'url': "http://www.yr.no", # url + 'example': "www.yr.no/sted/South_Africa/North-West/Sun_City", # example + 'code': "South_Africa/North-West/Sun_City", # code + 'dict_weather_lang': { + 'en': 'English' + }, # dict_weather_lang + 'weather_lang_list': ('en', ''), # weather_lang_list + 'max_days': 8, + 'need_appid': False +} # weather variables w = weather_vars.weather diff --git a/utils/gw_menu.py b/utils/gw_menu.py index 36df987..a80087f 100644 --- a/utils/gw_menu.py +++ b/utils/gw_menu.py @@ -38,6 +38,11 @@ def create_weather_menu(app, ICONS_PATH, gw_config, weather): menu_items.connect("activate", app.menu_response, 'weather_menu') menu_items.show() + menu_items = Gtk.ImageMenuItem('⇅ '+_('Show/Hide widget')) + menu.append(menu_items) + menu_items.connect("activate", app.menu_response, 'show_hide_widget') + menu_items.show() + menu_items = Gtk.ImageMenuItem(_('Location')+': '+current_place) menu.append(menu_items) menu_items.connect("activate", app.menu_response, 'goto_site', 0) @@ -203,7 +208,7 @@ def create_menu(app, ICONS_PATH, BGS_PATH, ICONS_USER_PATH, BGS_USER_PATH, color if city_list[j].split(';')[0] == str(gw_config['city_id']) and gw_config['service'] == data.services_list[i]: menu_items.set_active(True) sub_menu_place.append(menu_items) - menu_items.connect("activate", app.menu_response, 'reload', [data.services_list[i], city_list[j], data.get(data.services_list[i])[4][0]]) + menu_items.connect("activate", app.menu_response, 'reload', [data.services_list[i], city_list[j], data.get(data.services_list[i])['weather_lang_list'][0]]) menu_items.show() # sub_menu_icons