From 50fa098102398437362d0be0409558498a376745 Mon Sep 17 00:00:00 2001 From: trueold89 Date: Wed, 1 Nov 2023 02:07:35 +0300 Subject: [PATCH] Add English translation --- bot/lang.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/bot/lang.py b/bot/lang.py index 9df0cfa..fb691eb 100644 --- a/bot/lang.py +++ b/bot/lang.py @@ -3,7 +3,7 @@ import os -langs = ['RU'] +langs = ['RU','ENG'] # Russian RU = { @@ -28,10 +28,27 @@ RU = { } # English -ENG = {} +ENG = { + 'alauth': 'You are already authorized', + 'sucauth': 'You have successfully logged in', + 'wrauth': 'Wrong password', + 'pne': "The '{}' directory does not exist on the server", + 'fsa': "The '{}' folder has been successfully added", + 'frm': "The '{}' folder has been successfully deleted", + 'fne': "The '{}' folder does not exist", + 'add': 'Torrent has been added to the queue', + 'type': 'Select the download type:', + 'magnet': 'Magnet', + 'file': 'File', + 'aerr': 'Wrong arguments', + 'cff': 'No folders found, use the /add command', + 'chf': 'Select folder:', + 'ntorr': 'Incorrect file extension', + 'sendm': 'Send Magnet link', + 'sendf': 'Send .torrent file', + 'adeny': "You do not have access, first authorize '/login '" + } for i in langs: - if i == os.environ['LANG']: + if i == os.environ.get('LANG','RU'): LANG = globals()[i] - else: - LANG = RU