-
Notifications
You must be signed in to change notification settings - Fork 2
/
text.py
63 lines (58 loc) · 2.29 KB
/
text.py
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
61
62
63
# -*- coding: utf-8 -*-
import enum
from action import Action
class TextType(enum.Enum):
OutputPathComboBox = 1
OpenFileDialog = 2
AddFileLabel = 3
OpenFileLabel = 4
StartFileLabel = 5
class Text:
@staticmethod
def get(action, text_type):
text = ''
if action == Action.Pdf2Word:
if text_type == TextType.OutputPathComboBox:
text = 'title_pdf_path'
elif text_type == TextType.OpenFileDialog:
text = 'title_open_pdf'
elif text_type == TextType.AddFileLabel:
text = 'tip_add_pdf'
elif text_type == TextType.OpenFileLabel:
text = 'tip_open_pdf'
elif text_type == TextType.StartFileLabel:
text = 'tip_open_word'
elif action == Action.Word2Pdf:
if text_type == TextType.OutputPathComboBox:
text = 'title_word_path'
elif text_type == TextType.OpenFileDialog:
text = 'title_open_word'
elif text_type == TextType.AddFileLabel:
text = 'tip_add_word'
elif text_type == TextType.OpenFileLabel:
text = 'tip_open_word'
elif text_type == TextType.StartFileLabel:
text = 'tip_open_pdf'
elif action == Action.Excel2Pdf:
if text_type == TextType.OutputPathComboBox:
text = 'title_excel_path'
elif text_type == TextType.OpenFileDialog:
text = 'title_open_excel'
elif text_type == TextType.AddFileLabel:
text = 'tip_add_excel'
elif text_type == TextType.OpenFileLabel:
text = 'tip_open_excel'
elif text_type == TextType.StartFileLabel:
text = 'tip_open_pdf'
elif action == Action.PPT2Pdf:
if text_type == TextType.OutputPathComboBox:
text = 'title_ppt_path'
elif text_type == TextType.OpenFileDialog:
text = 'title_open_ppt'
elif text_type == TextType.AddFileLabel:
text = 'tip_add_ppt'
elif text_type == TextType.OpenFileLabel:
text = 'tip_open_ppt'
elif text_type == TextType.StartFileLabel:
text = 'tip_open_pdf'
return text