Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dyang886 committed Feb 19, 2024
1 parent 019354a commit 1f77537
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
16 changes: 8 additions & 8 deletions dependency/ResourceHacker.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[MRU List]
MRU1=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Deaths Door v1.0 Plus 11 Trainer.exe
MRU2=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Monster Train v1.0 Plus 7 Trainer.exe
MRU3=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Assassins Creed III Remastered v1.0 Plus 10 Trainer.exe
MRU4=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Ni no Kuni Wrath of the White Witch Remastered v1.0-v20220915 Plus 14 Trainer.exe
MRU5=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Little Witch Nobeta v1.0.5 Plus 13 Trainer.exe
MRU6=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Assassins Creed Rogue v1.0-1.1.0 Plus 29 Trainer.exe
MRU7=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Devil May Cry 4 Special Edition v20190328 Plus 20 Trainer.exe
MRU8=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Dark Souls III v1.0-v1.15.2 Plus 28 Trainer.exe
MRU1=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Fairy Fencer F Advent Dark Force v1.0 Plus 14 Trainer.exe
MRU2=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Deaths Door v1.0 Plus 11 Trainer.exe
MRU3=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Monster Train v1.0 Plus 7 Trainer.exe
MRU4=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Assassins Creed III Remastered v1.0 Plus 10 Trainer.exe
MRU5=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Ni no Kuni Wrath of the White Witch Remastered v1.0-v20220915 Plus 14 Trainer.exe
MRU6=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Little Witch Nobeta v1.0.5 Plus 13 Trainer.exe
MRU7=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Assassins Creed Rogue v1.0-1.1.0 Plus 29 Trainer.exe
MRU8=C:\Users\dyang\AppData\Local\Temp\GameCheatsManagerTemp\Devil May Cry 4 Special Edition v20190328 Plus 20 Trainer.exe
9 changes: 3 additions & 6 deletions gamecheats.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@ def load_settings():


def get_translator():
# compile .po files to .mo files
for root, dirs, files in os.walk(resource_path("locale/")):
for file in files:
if file.endswith(".po"):
po = polib.pofile(os.path.join(root, file))
po.save_as_mofile(os.path.join(
root, os.path.splitext(file)[0] + ".mo"))

# read settings and apply languages
lang = settings["language"]
gettext.bindtextdomain("Game Cheats Manager",
resource_path("locale/"))
Expand Down Expand Up @@ -145,7 +143,6 @@ def __init__(self):
self.downloadSearchEntryPrompt = _("Search to download")

# Paths and variable management
settings = load_settings() # Load settings once and use it throughout
self.trainerPath = os.path.normpath(
os.path.abspath(settings["downloadPath"]))
os.makedirs(self.trainerPath, exist_ok=True)
Expand All @@ -169,9 +166,9 @@ def __init__(self):

# Widget fonts and styles
font_config = {
"en_US": ("Noto Sans", "assets/NotoSans-Regular.ttf"),
"zh_CN": ("Noto Sans SC", "assets/NotoSansSC-Regular.ttf"),
"zh_TW": ("Noto Sans TC", "assets/NotoSansTC-Regular.ttf")
"en_US": ("Noto Sans", resource_path("assets/NotoSans-Regular.ttf")),
"zh_CN": ("Noto Sans SC", resource_path("assets/NotoSansSC-Regular.ttf")),
"zh_TW": ("Noto Sans TC", resource_path("assets/NotoSansTC-Regular.ttf"))
}

def is_font_installed(font_name):
Expand Down
Binary file modified locale/en_US/LC_MESSAGES/Game Cheats Manager.mo
Binary file not shown.
Binary file modified locale/zh_CN/LC_MESSAGES/Game Cheats Manager.mo
Binary file not shown.
Binary file modified locale/zh_TW/LC_MESSAGES/Game Cheats Manager.mo
Binary file not shown.

0 comments on commit 1f77537

Please sign in to comment.