-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.py
159 lines (153 loc) · 5.7 KB
/
Main.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
from Utilities import Utils
from GamesManagement import GamesManager
default_config = {
"input_path": "C:\\Users\\Juan Carlos Solano\\Documents\\Mine\\The Jackbox Party Pack 5",
"output_path": "",
"games_path": "games\\",
"language": "es",
"localization_forced_ins": {
'LANGUAGE_NAME': 'Español',
'BACK': 'ATRAS',
'CLOSE': 'CERRAR',
'ON': 'ENCENDIDO',
'BACK_TO_PACK': 'ATRAS',
'GO_TO': 'VE A',
'PRESS': 'PULSA',
'EVERYBODYS_IN': 'TODOS LISTOS',
'UNHIDE': 'MOSTRAR',
"SETTINGS_VOLUME_DESCRIPTION": "Haz que el juego suene ALTO o BAJO.",
'VOLUME_DESCRIPTION': 'Haz que el juego suene ALTO o BAJO.',
'TWITCH_REQUIRED': 'Requerir cuenta en TWITCH',
"LEADERBOARD": "Tabla de Puntos",
"BADGE_TITLE_FAMILY_MODE": "APTO PARA TODA LA FAMILIA",
"QUIT": "SALIR"
},
"localization_skip_words": ['twitter', 'spice girls', 'sub-zero', 'none', 'a', 'true', 'false', 'superman', 'frozen'],
"games": {
"PartyPack": {
"path": "games\\PartyPack",
"translate": False,
"filenames": {}
},
"PatentlyStupid": {
"path": "games\\PatentlyStupid",
"translate": False,
"filenames": {
'PatentlyStupidGeneDrawing': {
"translate": True,
"has_folder": True,
"strings": ['Title'],
"dicts": [],
"dict_arrays": [],
"special_characters": None,
"v": [1, 2],
"s": [],
"episodeid": 1230
},
'PatentlyStupidShortie': {
"translate": True,
"has_folder": True,
"strings": ['decoys', 'prompt'],
"dicts": [],
"dict_arrays": [],
"special_characters": None,
"v": [1, 2],
"s": [3],
"episodeid": 1368
}
}
},
"SplitTheRoom": {
"path": "games\\SplitTheRoom",
"translate": True,
"filenames": {
'SplitTheRoomFinal': {
'single_structure': True,
'skip_values': ['true', 'false'],
"translate": True,
"has_folder": True,
"strings": ['answerText', 'scenarioText', 'decoys', 'category', 'questionText'],
"dicts": [],
"dict_arrays": [['<', '>'], ['[', ']']],
"special_characters": None,
"episodeid": 1353
},
'SplitTheRoomLater': {
"translate": True,
'single_structure': True,
'skip_values': ['true', 'false'],
"has_folder": True,
"strings": ['answerText', 'scenarioText', 'decoys', 'category', 'questionText'],
"dicts": [],
"dict_arrays": [],
"special_characters": [['<', '>'], ['[', ']']],
"v": [3, 5, 7, 8, 9, 10, 12, 14],
"s": [15, 16, 17],
"episodeid": 1371
},
'SplitTheRoomShortie': {
"translate": True,
'single_structure': True,
'skip_values': ['true', 'false'],
"has_folder": True,
"strings": ['answerText', 'scenarioText', 'decoys', 'category', 'questionText'],
"dicts": [],
"dict_arrays": [],
"special_characters": [['<', '>'], ['[', ']']],
"v": [3, 5, 7, 9, 10, 12, 14],
"s": [15, 16, 17],
"episodeid": 1352
}
}
},
"SlingShoot": {
"path": "games\\SlingShoot",
"translate": True,
"filenames": {
'SSDifficulty': {
"translate": True,
"has_folder": False,
"strings": ['mission'],
"dicts": [],
"arrays": ['titles'],
"dict_arrays": [],
"special_characters": [['<', '>']],
"v": [],
"s": [],
"episodeid": 0
},
'SSEnemies': {
"translate": True,
"has_folder": False,
"strings": ['title'],
"dicts": [],
"dict_arrays": [],
"special_characters": [['<', '>']],
"v": [3, 5, 7, 8, 9, 10, 12, 14],
"s": [15, 16, 17],
"episodeid": 0
},
'SSWeapons': {
"translate": True,
"has_folder": False,
"strings": ['title', 'description'],
"dicts": [],
"dict_arrays": [],
"special_characters": [['<', '>']],
"v": [],
"s": [],
"episodeid": 0
}
}
}
}
}
utils = Utils()
config = utils.create_config(default_config)
# utils.refresh_output(config['input_path'], config['output_path'])
for game in config['games'].keys():
if config['games'][game]['translate']:
print('Translating: {0}'.format(game))
gamesManager = GamesManager(config, utils, game)
else:
print('{0} was skipped'.format(game))