Skip to content

Commit d5e1ae7

Browse files
committed
Version Bugs
fix some translation bugs.
1 parent 5ea7900 commit d5e1ae7

6 files changed

Lines changed: 26 additions & 14 deletions

File tree

oclp_r/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self) -> None:
2121
self.voodoo_patch_already: bool = False
2222

2323
# Patcher Versioning
24-
self.patcher_version: str = "3.1.7" # OCLP-R
24+
self.patcher_version: str = "3.1.8" # OCLP-R
2525
self.patcher_support_pkg_version: str = "1.11.3" # PatcherSupportPkg
2626
self.copyright_date: str = "Copyright © 2020-2026 Dortania and Hackdoc"
2727
self.patcher_name: str = "OCLP-R"

oclp_r/support/kdk_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
178178
return
179179

180180
older_version = f"{parsed_version.major}.{parsed_version.minor - 1 if parsed_version.minor > 0 else 0}"
181-
logging.info(self.trans["Checking for KDKs matching {0}"].format(older_version))
181+
logging.info(self.trans["Checking for KDKs loosely matching {0}"].format(older_version))
182182
self.kdk_installed_path = self._local_kdk_installed(match=older_version, check_version=True)
183183
if self.kdk_installed_path:
184184
logging.info(self.trans["Found matching KDK: {0}"].format(Path(self.kdk_installed_path).name))
@@ -188,7 +188,7 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
188188

189189
logging.warning(self.trans["Couldn't find KDK matching {0} or {1}, please install one manually"].format(host_version,host_build))
190190

191-
self.error_msg = self.trans["Couldn't find KDK matching {0} ({1}) or {2} was installed.\nPlease ensure you have a network connection or manually install a KDK."].format(host_version,host_build,older_version)
191+
self.error_msg = self.trans["Couldn't find KDK matching {0} ({1}) or {2} was installed."].format(host_version,host_build,older_version) + "\n" + self.trans["Please ensure you have a network connection or manually install a KDK."]
192192

193193
return
194194

oclp_r/support/metallib_handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def _get_latest_metallib(self) -> None:
150150

151151
logging.warning(self.trans["Couldn't find metallib matching {0} or {1}, please install one manually"].format(self.host_version, older_version))
152152

153-
self.error_msg = self.trans["Could not contact MetallibSupportPkg API, and no metallib matching {0} ({1}) or {2} was installed.\nPlease ensure you have a network connection or manually install a metallib."].format(self.host_version, self.host_build, older_version)
153+
self.error_msg = self.trans["Could not contact MetallibSupportPkg API, and no metallib matching {0} ({1}) or {2} was installed."].format(self.host_version, self.host_build, older_version) + "\n" + self.trans["Please ensure you have a network connection or manually install a metallib."]
154154

155155
return
156156

@@ -272,12 +272,12 @@ def retrieve_download(self, override_path: str = "") -> network_handler.Download
272272
self.error_msg = ""
273273

274274
if self.metallib_already_installed:
275-
logging.info(self.trans[f"No download required, metallib already installed"])
275+
logging.info(self.trans["No download required, metallib already installed"])
276276
self.success = True
277277
return None
278278

279279
if self.metallib_url == "":
280-
self.error_msg = self.trans[f"Could not retrieve metallib catalog, no metallib to download"]
280+
self.error_msg = self.trans["Could not retrieve metallib catalog, no metallib to download"]
281281
logging.error(self.error_msg)
282282
return None
283283

@@ -294,11 +294,11 @@ def install_metallib(self, metallib: str = None) -> None:
294294
"""
295295

296296
if not self.success:
297-
logging.error(self.trans[f"Cannot install metallib, no metallib was successfully retrieved"])
297+
logging.error(self.trans["Cannot install metallib, no metallib was successfully retrieved"])
298298
return False
299299

300300
if self.metallib_already_installed:
301-
logging.info(self.trans[f"No installation required, metallib already installed"])
301+
logging.info(self.trans["No installation required, metallib already installed"])
302302
return True
303303

304304
result = subprocess_wrapper.run_as_root([

oclp_r/support/subprocess_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def run_as_root(*args, **kwargs) -> subprocess.CompletedProcess:
5353
"""
5454
# Check if first argument exists
5555
if not Path(args[0][0]).exists():
56-
raise FileNotFoundError(trans["file_not_found: {0}"].format(args[0][0]))
56+
raise FileNotFoundError(trans["File not found: {0}"].format(args[0][0]))
5757

5858
return subprocess.run([OCLP_PRIVILEGED_HELPER] + [args[0][0]] + args[0][1:], **kwargs)
5959

oclp_r/support/translate_language.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def arguements(self):
5959
"- Failed to load plist for":"- Failed to load plist for",
6060
"- Removing":"- Removing",
6161
"- Using custom model:":"- Using custom model:",
62-
"""Your model is not supported by this patcher for running unsupported OSes!"
62+
"""Your model is not supported by this patcher for running unsupported OSes!
6363
64-
If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""":"""Your model is not supported by this patcher for running unsupported OSes!"
64+
If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""":"""Your model is not supported by this patcher for running unsupported OSes!
6565
6666
If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""",
6767
"- Using detected model:":"- Using detected model:",
@@ -170,7 +170,7 @@ def arguements(self):
170170
"- Failed to load plist for": "- 无法加载 plist 文件",
171171
"- Removing": "- 正在删除",
172172
"- Using custom model:":"- 使用自定义型号:",
173-
"""Your model is not supported by this patcher for running unsupported OSes!"
173+
"""Your model is not supported by this patcher for running unsupported OSes!
174174
175175
If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""": """您的型号不受此修补程序支持以运行不支持的操作系统!
176176
@@ -280,7 +280,9 @@ def kdk_handler(self):
280280
"Failed to fetch KDK list, falling back to local KDK matching":"Failed to fetch KDK list, falling back to local KDK matching",
281281
"Checking for KDKs loosely matching {0}":"Checking for KDKs loosely matching {0}",
282282
"Found matching KDK: {0}":"Found matching KDK: {0}",
283+
"Couldn't find KDK matching {0} or {1}, please install one manually":"Couldn't find KDK matching {0} or {1}, please install one manually",
283284
"Couldn't find KDK matching {0} ({1}) or {2} was installed.":"Couldn't find KDK matching {0} ({1}) or {2} was installed.",
285+
"No KDKs found for {0} ({1})":"No KDKs found for {0} ({1})",
284286
"Please ensure you have a network connection or manually install a KDK.":"Please ensure you have a network connection or manually install a KDK.",
285287
"No direct match found for {0}, falling back to closest match":"No direct match found for {0}, falling back to closest match",
286288
"Closest Match: {0} ({1})":"Closest Match: {0} ({1})",
@@ -336,7 +338,9 @@ def kdk_handler(self):
336338
"Failed to fetch KDK list, falling back to local KDK matching":"获取 KDK 列表失败, 回退到本地 KDK 匹配",
337339
"Checking for KDKs loosely matching {0}":"检查与 {0} 松散匹配的 KDK",
338340
"Found matching KDK: {0}":"找到匹配的 KDK: {0}",
341+
"Couldn't find KDK matching {0} or {1}, please install one manually":"找不到与 {0} 或 {1} 匹配的 KDK, 请手动安装",
339342
"Couldn't find KDK matching {0} ({1}) or {2} was installed.":"找不到与 {0} ({1}) 或 {2} 匹配的 KDK.",
343+
"No KDKs found for {0} ({1})":"找不到适用于 {0} ({1}) 的 KDK",
340344
"Please ensure you have a network connection or manually install a KDK.":"请确保您有网络连接或手动安装 KDK.",
341345
"No direct match found for {0}, falling back to closest match":"未找到 {0} 的直接匹配, 回退到最接近的匹配",
342346
"Closest Match: {0} ({1})":"最接近的匹配: {0} ({1})",
@@ -2067,6 +2071,8 @@ def gui_settings(self):
20672071
"Provide English & Chinese Simplified.":"Provide English & Chinese Simplified.",
20682072
"Updating System Defaults: {variable} = {value} ({value_type})":"Updating System Defaults: {variable} = {value} ({value_type})",
20692073
"Updating System Defaults (root): {variable} = {value} ({value_type})":"Updating System Defaults (root): {variable} = {value} ({value_type})",
2074+
"Updating GPU Selection: {gpu_choice}":"Updating GPU Selection: {gpu_choice}",
2075+
"user_download_file:{path}":"user_download_file:{path}",
20702076
"Root Volume update Failed, check terminal output":"Root Volume update Failed, check terminal output",
20712077
}
20722078
elif self.language_point=="简体中文":
@@ -2417,6 +2423,8 @@ def gui_settings(self):
24172423
"Populate Stats":"填充统计信息",
24182424
"Return":"返回",
24192425
"This settings requires 'gpu-power-prefs' NVRAM argument to be set to '1'.\n\nIf missing and this option is toggled, the system will not boot\n\nFull command:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00":"此设置需要 'gpu-power-prefs' NVRAM 参数设置为 '1'。\n\n如果缺失且此选项被切换,系统将无法启动\n\n完整命令:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00",
2426+
"Updating GPU Selection: {gpu_choice}":"正在更新GPU选择: {gpu_choice}",
2427+
"user_download_file:{path}":"用户下载的文件: {path}",
24202428
"Root Volume update Failed, check terminal output":"根卷更新失败,请检查终端输出",
24212429
}
24222430
return trans
@@ -2551,6 +2559,8 @@ def gui_sys_patch_start(self):
25512559
"No new patches detected for system":"No new patches detected for system",
25522560
"- Patch {patch} not installed":"- Patch {patch} not installed",
25532561
"Built from source, running from socure":"Built from source, running from socure",
2562+
"- Commit URLs differ":"- Commit URLs differ",
2563+
"- Commit URLs:":"- Commit URLs:",
25542564
}
25552565
elif self.language_point=="简体中文":
25562566
trans={
@@ -2596,7 +2606,9 @@ def gui_sys_patch_start(self):
25962606
"We just finished installing the patches to your Root Volume!\n\nHowever, Apple requires users to manually approve the kernel extensions installed before they can be used next reboot.\n\nWould you like to open System Preferences?":"我们刚刚完成了对您根卷的补丁安装!\n\n但, Apple 要求用户手动批准安装的内核扩展,然后才能在下次重启时使用它们。\n\n您想要打开系统偏好设置吗?",
25972607
"Open System Preferences?":"打开系统偏好设置?",
25982608
"Open System Preferences":"打开系统偏好设置",
2599-
"Ignore":"忽略"
2609+
"Ignore":"忽略",
2610+
"- Commit URLs differ":"- 提交 URL 不同",
2611+
"- Commit URLs:":"- 提交 URL 为:",
26002612
}
26012613
return trans
26022614

oclp_r/sys_patch/utilities/kdk_merge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def merge(self, save_hid_cs: bool = False) -> str:
152152
kdk_path = Path(kdk_obj.kdk_installed_path) if kdk_obj.kdk_installed_path != "" else None
153153
if kdk_path is None:
154154
logging.info(self.trans["- Unable to find Kernel Debug Kit"])
155-
raise Exception(self.trans["Unable to find Kernel Debug Kit"])
155+
raise Exception(self.trans["- Unable to find Kernel Debug Kit"])
156156

157157
logging.info(self.trans["- Found KDK at: {kdk_path}"].format(kdk_path=kdk_path))
158158

0 commit comments

Comments
 (0)