-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyLanguageTool.py
More file actions
60 lines (51 loc) · 1.35 KB
/
Copy pathpyLanguageTool.py
File metadata and controls
60 lines (51 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import os
import sys
from typing import Any, Dict, List
from PySide6.QtCore import QSettings, Qt
from PySide6.QtWidgets import (
QApplication,
)
templates: List[Dict[str, Any]] = [
{
"name": "Smartcat",
"simple": False,
"row": 0,
"source_col_index": 1,
"target_col_index": 2,
},
{
"name": "MemoQ",
"simple": False,
"row": 0,
"source_col_index": 1,
"target_col_index": 2,
},
{
"name": "Memsouce",
"simple": False,
"row": 0,
"source_col_index": 3,
"target_col_index": 4,
},
{
"name": "Target General",
"simple": True,
},
]
error_type_color_map = {
"uncategorized": Qt.GlobalColor.magenta,
"misspelling": Qt.GlobalColor.red,
"style": Qt.GlobalColor.blue,
}
if __name__ == "__main__":
# Set the organization name and application name for QSettings
QApplication.setOrganizationName("Andre Jonas")
QApplication.setApplicationName("pyLanguageTool")
# Set the user config directory
config_dir = QSettings().fileName()
config_dir = os.path.dirname(config_dir)
QSettings.setPath(QSettings.Format.IniFormat, QSettings.Scope.UserScope, config_dir)
app = QApplication(sys.argv)
from text_editor import TextEditor
editor = TextEditor()
sys.exit(app.exec())