Skip to content

Commit 6f2cf2a

Browse files
committed
Tried to fix a lang bug
1 parent 61fa2a8 commit 6f2cf2a

18 files changed

+12
-42
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- A spacing mistake has been fixed.
44
- The editing VM dialog had a bug which sometimes didn't apply the actual architecture of the VM.
5+
- I tried to fix a language bug but it failed. For now, if the editing VM dialog doesn't open, restart EmuGUI.
56

67
# EmuGUI v0.6
78

-427 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

dialogExecution/editVirtualMachine.py

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -126,46 +126,15 @@ def langDetect(self):
126126
langmode = "system"
127127

128128
try:
129-
qemu_img_slot = str(result[0])
130-
131-
i = 0
132-
133-
if result[0][1] == "default":
134-
while i < self.comboBox_4.count():
135-
if self.comboBox_4.itemText(i) == "System default":
136-
self.comboBox_4.setCurrentIndex(i)
137-
break
138-
139-
i += 1
140-
141-
elif result[0][1] == "en":
142-
while i < self.comboBox_4.count():
143-
if self.comboBox_4.itemText(i) == "English":
144-
self.comboBox_4.setCurrentIndex(i)
145-
break
146-
147-
i += 1
129+
qemu_img_slot = str(result[0])
148130

131+
if result[0][1] == "en":
149132
langmode = "en"
150133

151134
elif result[0][1] == "de":
152-
while i < self.comboBox_4.count():
153-
if self.comboBox_4.itemText(i) == "Deutsch":
154-
self.comboBox_4.setCurrentIndex(i)
155-
break
156-
157-
i += 1
158-
159135
langmode = "de"
160136

161137
elif result[0][1] == "uk":
162-
while i < self.comboBox_4.count():
163-
if self.comboBox_4.itemText(i) == "Українська":
164-
self.comboBox_4.setCurrentIndex(i)
165-
break
166-
167-
i += 1
168-
169138
langmode = "uk"
170139

171140
self.setLanguage(langmode)
@@ -180,7 +149,7 @@ def langDetect(self):
180149
print(f"The SQLite module encountered an error: {e}.")
181150

182151
def setLanguage(self, langmode):
183-
if langmode == "system":
152+
if langmode == "system" or langmode == None:
184153
languageToUse = locale.getlocale()[0]
185154

186155
else:

0 commit comments

Comments
 (0)