Skip to content

Commit e3013fa

Browse files
committed
update translation
1 parent 2bc031d commit e3013fa

File tree

4 files changed

+6
-45
lines changed

4 files changed

+6
-45
lines changed

oclp_r/support/macos_installer_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def generate_installer_creation_script(self, tmp_location: str, installer_path:
114114
# Adjust installer_path to point to the copied installer
115115
installer_path = Path(ia_tmp) / Path(Path(installer_path).name)
116116
if not Path(installer_path).exists():
117-
logging.info(self.trans["Failed to copy installer to {0}".format(ia_tmp)])
117+
logging.info(self.trans["Failed to copy installer to {0}"].format(ia_tmp))
118118
return False
119119

120120
# Verify code signature before executing

oclp_r/support/metallib_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _get_file_size(self, url: str) -> int:
100100
if content_length:
101101
return int(content_length)
102102
except Exception as e:
103-
logging.warning(self.trans["Cannot get file size {0}: {1}".format(url, e)])
103+
logging.warning(self.trans["Cannot get file size {0}: {1}"].format(url, e))
104104

105105
return 0
106106

oclp_r/support/translate_language.py

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def arguements(self):
112112
"Metallib installed successfully":"Metallib installed successfully",
113113
"Failed to install Metallib":"Failed to install Metallib",
114114
"KDK missing, generating KDK download frame":"KDK missing, generating KDK download frame",
115-
"KDK download complete, validating with hdiutil":"KDK download complete, validating with hdiutil",
116115
"KDK download complete":"KDK download complete",
117116
"MetallibSupportPkg missing, generating Metallib download frame":"MetallibSupportPkg missing, generating Metallib download frame",
118117
"Metallib download complete, installing Metallib PKG":"Metallib download complete, installing Metallib PKG",
@@ -265,44 +264,6 @@ def arguements(self):
265264
"Selected macOS DMG {version} ({build})":"已选择macOS DMG {version} ({build})",
266265
"Selected macOS {version} ({build})":"已选择macOS {version} ({build})"
267266
}
268-
trans = {
269-
"Set Validation Mode": "设置验证模式",
270-
"- Running from Installer Sandbox, blocking OS updaters": "- 从安装程序沙箱运行, 阻止操作系统更新程序",
271-
"Set System Volume patching": "设置系统卷修补",
272-
"Set System Volume unpatching": "设置系统卷取消修补",
273-
"Set Auto patching": "设置自动修补",
274-
"Preparing host for macOS update": "准备主机以进行 macOS 更新",
275-
"No update staged, skipping": "没有暂存的更新,跳过",
276-
"Preparing for update to": "准备更新到",
277-
"Another instance of OS caching is running, exiting": "另一个操作系统缓存实例正在运行,退出",
278-
"- Failed to load plist for": "- 无法加载 plist 文件",
279-
"- Removing": "- 正在删除",
280-
"- Using custom model:": "- 使用自定义型号:",
281-
"""Your model is not supported by this patcher for running unsupported OSes!"
282-
283-
If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""": """您的型号不受此修补程序支持以运行不支持的操作系统!
284-
285-
如果您计划为另一台机器创建 USB,请在菜单中选择"更改型号"选项。""",
286-
"- Using detected model:": "- 使用检测到的型号:",
287-
"- Set verbose configuration": "- 设置详细配置",
288-
"- Set OpenCore DEBUG configuration": "- 设置 OpenCore 调试配置",
289-
"- Set kext DEBUG configuration": "- 设置 kext 调试配置",
290-
"- Set HidePicker configuration": "- 设置隐藏选择器配置",
291-
"- Set Disable SIP configuration": "- 设置禁用 SIP 配置",
292-
"- Set Disable SecureBootModel configuration": "- 设置禁用安全启动机型配置",
293-
"- Set Vault configuration": "- 设置 Vault 配置",
294-
"- Set FireWire Boot configuration": "- 设置 FireWire 启动配置",
295-
"- Set NVMe Boot configuration": "- 设置 NVMe 启动配置",
296-
"- Set Wake on WLAN configuration": "- 设置无线局域网唤醒配置",
297-
"- Set Disable Thunderbolt configuration": "- 设置禁用 Thunderbolt 配置",
298-
"- Forcing SurPlus override configuration": "- 强制 SurPlus 覆盖配置",
299-
"- Set Moderate SMBIOS Patching configuration": "- 设置适度 SMBIOS 修补配置",
300-
"- Unknown SMBIOS arg passed:": "- 传递了未知的 SMBIOS 参数:",
301-
"- Building for natively supported model": "- 为原生支持的型号构建",
302-
"Cleaning /Library/Extensions":"正在清理/Library/Extensions",
303-
"Failed to load plist for":"加载plist失败:",
304-
"Set OpenCore Build":"设置OpenCore构建"
305-
}
306267
return trans
307268

308269
def kdk_handler(self):
@@ -1640,7 +1601,7 @@ def gui_main_menu(self):
16401601
"Resources for OpenCore Legacy":"Resources for OpenCore Legacy",
16411602
"Patcher.":"Patcher.",
16421603
"Unsupported Configuration Detected!":"Unsupported Configuration Detected!",
1643-
"We found you are currently booting OpenCore built for a different unit: {build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.":"We found you are currently booting OpenCore built for a different unit: {self.constants.computer.build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.",
1604+
"We found you are currently booting OpenCore built for a different unit: {build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.":"We found you are currently booting OpenCore built for a different unit: {build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.",
16441605
"Update successful!":"Update successful!",
16451606
"OCLP-R has been updated to the latest version: {patcher_version}\n\nWould you like to update OpenCore and your root volume patches?":"OCLP-R has been updated to the latest version: {patcher_version}\n\nWould you like to update OpenCore and your root volume patches?",
16461607
"A new version of OCLP-R is available!":"A new version of OCLP-R is available!",
@@ -1690,7 +1651,7 @@ def gui_main_menu(self):
16901651
"Resources for OpenCore Legacy":"OpenCore Legacy Patcher",
16911652
"Patcher.":"的资源。",
16921653
"Unsupported Configuration Detected!":"检测到不支持的配置!",
1693-
"We found you are currently booting OpenCore built for a different unit: {build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.":"我们发现您当前正在引导为不同设备构建的 OpenCore:{self.constants.computer.build_model}\n\n我们构建的配置是为匹配单个设备的,不能与不同的 Mac 混合使用或重复使用。\n\n请构建并安装一个新的 OpenCore 配置,然后重启您的 Mac。",
1654+
"We found you are currently booting OpenCore built for a different unit: {build_model}\n\nWe builds configs to match individual units and cannot be mixed or reused with different Macs.\n\nPlease Build and Install a new OpenCore config, and reboot your Mac.":"我们发现您当前正在引导为不同设备构建的 OpenCore:{build_model}\n\n我们构建的配置是为匹配单个设备的,不能与不同的 Mac 混合使用或重复使用。\n\n请构建并安装一个新的 OpenCore 配置,然后重启您的 Mac。",
16941655
"Update successful!":"更新成功!",
16951656
"OCLP-R has been updated to the latest version: {patcher_version}\n\nWould you like to update OpenCore and your root volume patches?":"OCLP-R 已更新到最新版本:{patcher_version}\n\n您是否要更新 OpenCore 和根卷补丁?",
16961657
"A new version of OCLP-R is available!":"OCLP-R 有新版本可用!",

oclp_r/wx_gui/gui_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ def _populate_sip_settings(self, panel: wx.Frame) -> None:
11411141
self.sip_checkbox.Bind(wx.EVT_CHECKBOX, self.on_sip_value)
11421142
def on_text_change(self, event:wx.Event):
11431143
self.constants.user_download_file = event.GetEventObject().GetValue()
1144-
logging.info(f"{self.trans['user_download_file:']} {self.constants.user_download_file}")
1144+
logging.info(self.trans["user_download_file:{path}"].format(path=self.constants.user_download_file))
11451145
def _change_download_path(self,panel:wx.Frame) -> None:
11461146
def is_dir_writable(dirpath):
11471147
import os
@@ -1479,7 +1479,7 @@ def _populate_graphics_override(self, panel: wx.Panel) -> None:
14791479
def gpu_selection_click(self, event: wx.Event) -> None:
14801480
gpu_choice = event.GetEventObject().GetStringSelection()
14811481

1482-
logging.info(self.trans["Updating GPU Selection: {gpu_choice}".format(gpu_choice)])
1482+
logging.info(self.trans["Updating GPU Selection: {gpu_choice}"].format(gpu_choice=gpu_choice))
14831483
if "AMD" in gpu_choice:
14841484
self.constants.imac_vendor = "AMD"
14851485
self.constants.metal_build = True

0 commit comments

Comments
 (0)