Skip to content

Commit

Permalink
- Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
enj0yer committed Feb 16, 2023
1 parent 74235f5 commit 06aed2a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from PyQt6.QtWidgets import QApplication, QWidget, QMainWindow, QTextEdit, QPushButton, QHBoxLayout, QVBoxLayout, QPlainTextEdit
import sys

from logic import convert, Languages

style_text_field = """
QPlainTextEdit {
border: 1px solid rgb(37, 39, 49);
Expand Down Expand Up @@ -34,6 +36,7 @@
}
"""


class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
Expand Down Expand Up @@ -90,9 +93,9 @@ def __init__(self):
def getText(self):
text = self.input_field.toPlainText()
if self.language == 'ru':
translate_text = convert(text, Layouts.EN)
translate_text = convert(text, Languages.EN)
else:
translate_text = convert(text, Layouts.RU)
translate_text = convert(text, Languages.RU)
self.output_field.setPlainText(translate_text)

def change_language(self):
Expand Down

0 comments on commit 06aed2a

Please sign in to comment.