Commit b264b372 authored by Danial Behzadi's avatar Danial Behzadi
Browse files

Merge branch 'i18n' into 'master'

I18n

See merge request tractor-team/carburetor!21
parents c0af5a8d 3e565d38
......@@ -4,11 +4,9 @@
from distutils.util import strtobool
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
from gi.repository import Gdk, Gio, Gtk, GLib
gi.require_versions({'Gdk': '3.0', 'Gtk': '3.0', 'Notify': '0.7'})
from gi.repository import Gdk, Gio, Gtk, GLib, Notify
import gettext
import notify2
import os
import re
import signal
......@@ -26,7 +24,7 @@ locale_dir = s_data_dir+"/locales"
translate = gettext.translation('messages', localedir=locale_dir, fallback=True)
_ = translate.gettext
app_name = _("Carburetor")
notify2.init(app_name)
Notify.init(app_name)
class ToolButton(Gtk.ToolButton):
......@@ -79,8 +77,8 @@ class StartButton(ToolButton):
self.show_all()
def notify(self):
notif = notify2.Notification(app_name, self.notification)
notif.set_timeout(notify2.EXPIRES_DEFAULT)
notif = Notify.Notification.new(app_name, self.notification)
notif.set_timeout(Notify.EXPIRES_DEFAULT)
notif.show()
def update_label(self):
......@@ -148,8 +146,9 @@ class ProgressBar(Gtk.ProgressBar):
Gtk.ProgressBar.__init__(self)
def set_progress(self, percentage):
fraction = float(percentage) / 100
self.set_fraction(fraction)
if isinstance(percentage, int):
fraction = float(percentage) / 100
self.set_fraction(fraction)
class StopButton(Gtk.Button):
def __init__(self):
......@@ -247,10 +246,10 @@ class NewidButton(ToolButton):
if self.is_running():
newid = Popen(command + "newid", stdout=PIPE, shell=True)
newid.wait()
notif = notify2.Notification(app_name, _("You have a new identity!"))
notif = notify.Notification.new(app_name, _("You have a new identity!"))
else:
notif = notify2.Notification(app_name, _("Tractor is not running!"))
notif.set_timeout(notify2.EXPIRES_DEFAULT)
notif = notify.Notification.new(app_name, _("Tractor is not running!"))
notif.set_timeout(notify.EXPIRES_DEFAULT)
notif.show()
......
carburetor (2.8-1) bionic; urgency=medium
* use internal gi notification
* fix a bug in setting progress button
-- Danial Behzadi <dani.behzi@ubuntu.com> Mon, 07 Oct 2019 18:35:00 +0330
carburetor (2.7-1) bionic; urgency=medium
* add http tunnel port
......
......@@ -7,7 +7,7 @@ Build-Depends: debhelper (>=9)
Package: carburetor
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, tractor (>=2.4-0~), python3, python3-gi(>=3.10.2), python3-gi-cairo, gir1.2-gtk-3.0, python3-distutils, python3-notify2
Depends: ${shlibs:Depends}, ${misc:Depends}, tractor (>=2.4-0~), python3, python3-gi(>=3.10.2), python3-gi-cairo, gir1.2-gtk-3.0, python3-distutils
Description: Settings app for Tractor
This package is a graphical settings for tractor
which is an app using Python stem to provide
......
......@@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: dani.behzi@ubuntu.com\n"
"POT-Creation-Date: 2019-07-09 13:38+0430\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-07 18:35+0330\n"
"PO-Revision-Date: 2019-07-11 17:02+0000\n"
"Last-Translator: Andreas Kleinert <Andy.Kleinert@gmail.com>\n"
"Language-Team: German <https://hosted.weblate.org/projects/carburetor/"
......@@ -18,234 +18,234 @@ msgstr ""
"X-Generator: Weblate 3.8-dev\n"
"Generated-By: pygettext.py 1.5\n"
#: carburetor:28
#: carburetor:26
msgid "Carburetor"
msgstr "Carburetor"
#: carburetor:47
#: carburetor:45
msgid "Stop"
msgstr "Anhalten"
#: carburetor:62
#: carburetor:60
msgid "Tractor is running"
msgstr "Tractor wird ausgeführt"
#: carburetor:65
#: carburetor:63
msgid "Start"
msgstr "Starten"
#: carburetor:70
#: carburetor:68
msgid "Tractor is stopped"
msgstr "Tractor wurde angehalten"
#: carburetor:115
#: carburetor:113
msgid "stopping…"
msgstr "Wird angehalten …"
#: carburetor:121
#: carburetor:119
msgid "starting…"
msgstr "Wird gestartet …"
#: carburetor:212
#: carburetor:211
msgid "Unset Proxy"
msgstr "Proxy deaktivieren"
#: carburetor:217
#: carburetor:216
msgid "Set Proxy"
msgstr "Proxy festlegen"
#: carburetor:240
#: carburetor:239
msgid "New ID"
msgstr "Neue ID"
#: carburetor:250
#: carburetor:249
msgid "You have a new identity!"
msgstr "Ihnen wurde eine neue Identität zugeordnet!"
#: carburetor:252
#: carburetor:251
msgid "Tractor is not running!"
msgstr "Tractor ist ausgeschaltet!"
#: carburetor:262
#: carburetor:261
msgid "Settings for Tractor"
msgstr "Einstellungen für Tractor"
#: carburetor:288
#: carburetor:287
msgid "Austria"
msgstr "Österreich"
#: carburetor:289
#: carburetor:288
msgid "Bulgaria"
msgstr "Bulgarien"
#: carburetor:290
#: carburetor:289
msgid "Canada"
msgstr "Kanada"
#: carburetor:291
#: carburetor:290
msgid "Czech"
msgstr "Tschechien"
#: carburetor:292
#: carburetor:291
msgid "Finland"
msgstr "Finnland"
#: carburetor:293
#: carburetor:292
msgid "France"
msgstr "Frankreich"
#: carburetor:294
#: carburetor:293
msgid "Germany"
msgstr "Deutschland"
#: carburetor:295
#: carburetor:294
msgid "Ireland"
msgstr "Irland"
#: carburetor:296
#: carburetor:295
msgid "Moldova"
msgstr "Moldau"
#: carburetor:297
#: carburetor:296
msgid "Netherlands"
msgstr "Niederlande"
#: carburetor:298
#: carburetor:297
msgid "Norway"
msgstr "Norwegen"
#: carburetor:299
#: carburetor:298
msgid "Poland"
msgstr "Polen"
#: carburetor:300
#: carburetor:299
msgid "Romania"
msgstr "Rumänien"
#: carburetor:301
#: carburetor:300
msgid "Russia"
msgstr "Russland"
#: carburetor:302
#: carburetor:301
msgid "Seychelles"
msgstr "Seychellen"
#: carburetor:303
#: carburetor:302
msgid "Singapore"
msgstr "Singapur"
#: carburetor:304
#: carburetor:303
msgid "Spain"
msgstr "Spanien"
#: carburetor:305
#: carburetor:304
msgid "Sweden"
msgstr "Schweden"
#: carburetor:306
#: carburetor:305
msgid "Switzerland"
msgstr "Schweiz"
#: carburetor:307
#: carburetor:306
msgid "Ukraine"
msgstr "Ukraine"
#: carburetor:308
#: carburetor:307
msgid "United Kingdom"
msgstr "Großbritanien"
#: carburetor:309
#: carburetor:308
msgid "United States"
msgstr "Vereinigte Staaten"
#: carburetor:318
#: carburetor:317
msgid "<b>Exit node</b>"
msgstr "<b>Exit-Knoten</b>"
#: carburetor:322
#: carburetor:321
msgid "<small>The country you want to connect from</small>"
msgstr ""
"<small>Das Land, von dem aus eine Verbindung herstellen werden soll</small>"
#: carburetor:330
#: carburetor:329
msgid "Auto (Best)"
msgstr "Automatisch (Optimal)"
#: carburetor:347
#: carburetor:346
msgid "<b>Socks Port</b>"
msgstr "<b>Socks-Port</b>"
#: carburetor:351
#: carburetor:350
msgid "<small>Local port on which Tractor would be listen</small>"
msgstr "<small>Lokaler Port, auf dem Tractor lauschen soll</small>"
#: carburetor:375
#: carburetor:374
msgid "<b>DNS Port</b>"
msgstr "<b>DNS-Port</b>"
#: carburetor:379
#: carburetor:378
msgid ""
"<small>Local port on which you would have an anonymous name server</small>"
msgstr "<small>Lokaler Port, auf dem der anonyme DNS-Server läuft</small>"
#: carburetor:403
#: carburetor:402
msgid "<b>HTTP Tunnel Port</b>"
msgstr "<b>Port des HTTP-Tunnel</b>"
#: carburetor:407
#: carburetor:406
msgid "<small>Local port on which a HTTP tunnel would be listen</small>"
msgstr ""
"<small>Lokaler Port, an dem ein HTTP-Tunnel abgehört werden soll</small>"
#: carburetor:431
#: carburetor:430
msgid "<b>Accept connection</b>"
msgstr "<b>Verbindung akzeptieren</b>"
#: carburetor:435
#: carburetor:434
msgid ""
"<small>Whether or not allowing external devices to use this network</small>"
msgstr "<small>Dürfen externe Geräte dieses Netzwerk nutzen?</small>"
#: carburetor:455
#: carburetor:454
msgid "<b>Use bridges</b>"
msgstr "<b>Bridges verwenden</b>"
#: carburetor:459
#: carburetor:458
msgid "<small>Bridges help you to bypass tor sensorship</small>"
msgstr "<small>Bridges helfen, TOR-Sensorship zu umgehen</small>"
#: carburetor:479
#: carburetor:478
msgid "Bridges:"
msgstr "Bridges:"
#: carburetor:500
#: carburetor:499
msgid "Save"
msgstr "Speichern"
#: carburetor:513
#: carburetor:512
msgid "Can not save the bridges"
msgstr "Die Bridges konnten nicht gespeichert werden"
#: carburetor:514
#: carburetor:513
msgid "Please check the syntax of bridges"
msgstr "Bitte Syntax der Bridges prüfen"
#: carburetor:529
#: carburetor:528
msgid "<b>obfs4proxy executable</b>"
msgstr "<b>Programm obfs4proxy</b>"
#: carburetor:533
#: carburetor:532
msgid "<small>You should specify where is obfs4proxy file</small>"
msgstr "<small>Ort der Datei „obfs4proxy” festlegen</small>"
#: carburetor:560
#: carburetor:559
msgid "General"
msgstr "Allgemein"
#: carburetor:561
#: carburetor:560
msgid "Ports"
msgstr "Ports"
#: carburetor:562
#: carburetor:561
msgid "Bridges"
msgstr "Bridges"
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-09 13:38+0430\n"
"POT-Creation-Date: 2019-10-07 18:35+0330\n"
"PO-Revision-Date: 2019-06-18 19:06+0000\n"
"Last-Translator: THANOS SIOURDAKIS <siourdakisthanos@gmail.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/carburetor/"
......@@ -19,232 +19,232 @@ msgstr ""
"X-Generator: Weblate 3.7\n"
"Generated-By: pygettext.py 1.5\n"
#: carburetor:28
#: carburetor:26
msgid "Carburetor"
msgstr "Carburetor"
#: carburetor:47
#: carburetor:45
msgid "Stop"
msgstr "Σταμάτα"
#: carburetor:62
#: carburetor:60
msgid "Tractor is running"
msgstr ""
#: carburetor:65
#: carburetor:63
msgid "Start"
msgstr "Έναρξη"
#: carburetor:70
#: carburetor:68
msgid "Tractor is stopped"
msgstr ""
#: carburetor:115
#: carburetor:113
msgid "stopping…"
msgstr "διακοπή…"
#: carburetor:121
#: carburetor:119
msgid "starting…"
msgstr "εκκίνηση…"
#: carburetor:212
#: carburetor:211
msgid "Unset Proxy"
msgstr ""
#: carburetor:217
#: carburetor:216
msgid "Set Proxy"
msgstr "Ορισμός διακομιστή μεσολάβησης"
#: carburetor:240
#: carburetor:239
msgid "New ID"
msgstr "Νέο ID"
#: carburetor:250
#: carburetor:249
msgid "You have a new identity!"
msgstr "Έχετε νέα ταυτότητα!"
#: carburetor:252
#: carburetor:251
msgid "Tractor is not running!"
msgstr ""
#: carburetor:262
#: carburetor:261
msgid "Settings for Tractor"
msgstr ""
#: carburetor:288
#: carburetor:287
msgid "Austria"
msgstr "Αυστρία"
#: carburetor:289
#: carburetor:288
msgid "Bulgaria"
msgstr "Βουλγαρία"
#: carburetor:290
#: carburetor:289
msgid "Canada"
msgstr "Καναδάς"
#: carburetor:291
#: carburetor:290
msgid "Czech"
msgstr "Τσεχικά"
#: carburetor:292
#: carburetor:291
msgid "Finland"
msgstr "Φινλανδία"
#: carburetor:293
#: carburetor:292
msgid "France"
msgstr "Γαλλία"
#: carburetor:294
#: carburetor:293
msgid "Germany"
msgstr "Γερμανία"
#: carburetor:295
#: carburetor:294
msgid "Ireland"
msgstr "Ιρλανδία"
#: carburetor:296
#: carburetor:295
msgid "Moldova"
msgstr "Μολδαβία"
#: carburetor:297
#: carburetor:296
msgid "Netherlands"
msgstr "Ολλανδία"
#: carburetor:298
#: carburetor:297
msgid "Norway"
msgstr "Νορβηγία"
#: carburetor:299
#: carburetor:298
msgid "Poland"
msgstr "Πολωνία"
#: carburetor:300
#: carburetor:299
msgid "Romania"
msgstr "Ρουμανία"
#: carburetor:301
#: carburetor:300
msgid "Russia"
msgstr "Ρωσία"
#: carburetor:302
#: carburetor:301
msgid "Seychelles"
msgstr "Σεϋχέλλες"
#: carburetor:303
#: carburetor:302
msgid "Singapore"
msgstr "Σιγκαπούρη"
#: carburetor:304
#: carburetor:303
msgid "Spain"
msgstr "Ισπανία"
#: carburetor:305
#: carburetor:304
msgid "Sweden"
msgstr "Σουηδία"
#: carburetor:306
#: carburetor:305
msgid "Switzerland"
msgstr "Ελβετία"
#: carburetor:307
#: carburetor:306
msgid "Ukraine"
msgstr "Ουκρανία"
#: carburetor:308
#: carburetor:307
msgid "United Kingdom"
msgstr "Ηνωμένο Βασίλειο"
#: carburetor:309
#: carburetor:308
msgid "United States"
msgstr "Ηνωμένες Πολιτείες"
#: carburetor:318
#: carburetor:317
msgid "<b>Exit node</b>"
msgstr "<b>Κόμβος εξόδου</b>"
#: carburetor:322
#: carburetor:321
msgid "<small>The country you want to connect from</small>"
msgstr "<small>Η χώρα από την οποία θέλετε να συνδεθείτε από</small>"
#: carburetor:330
#: carburetor:329
msgid "Auto (Best)"
msgstr "Αυτόματο (καλύτερο)"
#: carburetor:347
#: carburetor:346
msgid "<b>Socks Port</b>"
msgstr ""
#: carburetor:351
#: carburetor:350
msgid "<small>Local port on which Tractor would be listen</small>"
msgstr ""
#: carburetor:375
#: carburetor:374
msgid "<b>DNS Port</b>"
msgstr ""
#: carburetor:379
#: carburetor:378
msgid ""
"<small>Local port on which you would have an anonymous name server</small>"
msgstr ""
#: carburetor:403
#: carburetor:402
msgid "<b>HTTP Tunnel Port</b>"
msgstr ""
#: carburetor:407
#: carburetor:406
msgid "<small>Local port on which a HTTP tunnel would be listen</small>"
msgstr ""
#: carburetor:431
#: carburetor:430
msgid "<b>Accept connection</b>"
msgstr ""
#: carburetor:435
#: carburetor:434
msgid ""
"<small>Whether or not allowing external devices to use this network</small>"
msgstr ""
#: carburetor:455
#: carburetor:454
msgid "<b>Use bridges</b>"
msgstr ""
#: carburetor:459
#: carburetor:458
msgid "<small>Bridges help you to bypass tor sensorship</small>"
msgstr ""
#: carburetor:479
#: carburetor:478
msgid "Bridges:"
msgstr ""
#: carburetor:500
#: carburetor:499
msgid "Save"
msgstr ""