From 8c00529135058ed5786345581c274e0e16d8978d Mon Sep 17 00:00:00 2001 From: Artur Tretiak Date: Fri, 30 Nov 2018 01:20:52 +0200 Subject: [PATCH] HotFix Fix - GetText error caused by GitHub pull request --- Defs/Actions.py | 1 + Defs/Checks.py | 3 ++- Defs/Languages.py | 3 +++ HiddenEye.py | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Defs/Actions.py b/Defs/Actions.py index d4da95d..4e4bde8 100644 --- a/Defs/Actions.py +++ b/Defs/Actions.py @@ -13,6 +13,7 @@ from Defs.Languages import * RED, WHITE, CYAN, GREEN, DEFAULT = '\033[91m', '\033[46m', '\033[36m', '\033[1;32m', '\033[0m' +installGetText() languageSelector() ifSettingsNotExists() config = readConfig() diff --git a/Defs/Checks.py b/Defs/Checks.py index 57899e1..f031243 100644 --- a/Defs/Checks.py +++ b/Defs/Checks.py @@ -6,11 +6,12 @@ from subprocess import check_output from platform import system as systemos, architecture from wget import download from Defs.Languages import * - RED, GREEN, DEFAULT = '\033[91m', '\033[1;32m', '\033[0m' +installGetText() languageSelector() + def checkConnection(host='http://duckduckgo.com'): #Connection check try: urlopen(host) diff --git a/Defs/Languages.py b/Defs/Languages.py index 0e8776c..f48c8a0 100644 --- a/Defs/Languages.py +++ b/Defs/Languages.py @@ -4,6 +4,9 @@ import sys import gettext from Defs.Configurations import readConfig +def installGetText(): + gettext.install('hiddeneye', './locale') + def langRussian(): ru = gettext.translation('hiddeneye',localedir='./locale', languages=['ru']) ru.install() diff --git a/HiddenEye.py b/HiddenEye.py index 72ad850..f03624c 100644 --- a/HiddenEye.py +++ b/HiddenEye.py @@ -12,7 +12,7 @@ from Defs.Languages import * RED, WHITE, CYAN, GREEN, DEFAULT = '\033[91m', '\033[46m', '\033[36m', '\033[1;32m', '\033[0m' - +installGetText() languageSelector() checkConnection() checkNgrok()