Skip to content

Commit d5c747f

Browse files
committed
add more translations
1 parent a794797 commit d5c747f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+225
-138
lines changed

.github/workflows/build-releases.yml

Whitespace-only changes.

oclp_r/detections/amfi_detect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class AmfiConfigDetectLevel(enum.IntEnum):
1717
LIBRARY_VALIDATION: int = 1 # For Ventura, use LIBRARY_VALIDATION_AND_SIG
1818
LIBRARY_VALIDATION_AND_SIG: int = 2
1919
ALLOW_ALL: int = 3
20+
DISABLE_FORCE: int = 4
2021

2122

2223
class AmfiConfigurationDetection:

oclp_r/support/translate_language.py

Lines changed: 149 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import logging
55

66
class TranslateLanguage:
7-
def __init__(self, global_constants: Constants) -> None:
7+
def __init__(self, global_constants: Constants = None) -> None:
88
self.file_name: str = ".com.hackdoc.oclp-r.plist"
99
self.global_settings_folder: str = "/Users/Shared"
1010
self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}"
@@ -1386,6 +1386,11 @@ def gui_macos_installer_download(self):
13861386
"Copy the download link of the selected DMG.":"Copy the download link of the selected DMG.",
13871387
"Create macOS Installer":"Create macOS Installer",
13881388
"Your model ({model}) may not be fully supported by this installer. You may encounter the following issues:\n\n{problems}\n\nFor more information, see associated page. Otherwise, we recommend using macOS Monterey":"Your model ({model}) may not be fully supported by this installer. You may encounter the following issues:\n\n{problems}\n\nFor more information, see associated page. Otherwise, we recommend using macOS Monterey",
1389+
"Selected macOS DMG {version} ({build})":"Selected macOS DMG {version} ({build})",
1390+
"Select Path":"Select Path",
1391+
"Cannot write to the selected directory.":"Cannot write to the selected directory.",
1392+
"Read-only Directory":"Read-only Directory",
1393+
"Selected directory: {save_path}":"Selected directory: {save_path}",
13891394
}
13901395
elif self.language_point=="简体中文":
13911396
trans={
@@ -1452,7 +1457,12 @@ def gui_macos_installer_download(self):
14521457
"Finished extracting the installer, would you like to continue and create a macOS installer?":"安装程序提取完成,是否要继续创建 macOS 安装程序?",
14531458
"Create macOS Installer?":"创建 macOS 安装程序?",
14541459
"Create macOS Installer":"创建 macOS 安装程序",
1455-
"Available installers on SimpleHac":"SimpleHac 上可用的安装程序"
1460+
"Available installers on SimpleHac":"SimpleHac 上可用的安装程序",
1461+
"Selected macOS DMG {version} ({build})":"已选择 macOS DMG {version} ({build})",
1462+
"Select Path":"选择路径",
1463+
"Cannot write to the selected directory.":"无法写入选择的目录。",
1464+
"Read-only Directory":"只读目录",
1465+
"Selected directory: {save_path}":"已选择目录: {save_path}",
14561466
}
14571467
return trans
14581468

@@ -1524,7 +1534,8 @@ def gui_macos_installer_flash(self):
15241534
"Installer created successfully, would you like to continue and Install OpenCore to this disk?":"Installer created successfully, would you like to continue and Install OpenCore to this disk?",
15251535
"Installer created successfully! If you want to install OpenCore to this USB, you will need to change the Target Model in settings":"Installer created successfully! If you want to install OpenCore to this USB, you will need to change the Target Model in settings",
15261536
"If you want to install OpenCore to this USB, you will need to change the Target Model in settings":"If you want to install OpenCore to this USB, you will need to change the Target Model in settings",
1527-
"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}":"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}"
1537+
"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}":"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}",
1538+
"Installer(s) found:":"Installer(s) found:",
15281539
}
15291540
elif self.language_point=="简体中文":
15301541
trans={
@@ -1593,7 +1604,8 @@ def gui_macos_installer_flash(self):
15931604
"Successfully created macOS installer":"成功创建 macOS 安装程序",
15941605
"Installer created successfully, would you like to continue and Install OpenCore to this disk?":"安装程序创建成功,是否继续将 OpenCore 安装到此磁盘?",
15951606
"If you want to install OpenCore to this USB, you will need to change the Target Model in settings":"如果您想将 OpenCore 安装到此 USB,您需要在设置中更改目标机型",
1596-
"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}":"创建 macOS 安装程序失败\n\n输出: {output}\n\n错误: {error}"
1607+
"Failed to create macOS installer\n\nOutput: {output}\n\nError: {error}":"创建 macOS 安装程序失败\n\n输出: {output}\n\n错误: {error}",
1608+
"Installer(s) found:":"找到安装程序:",
15971609
}
15981610
return trans
15991611

@@ -2068,12 +2080,16 @@ def gui_settings(self):
20682080
"Updating Local Setting: {variable} = {value}":"Updating Local Setting: {variable} = {value}",
20692081
"Updating Global Setting: {variable} = {value}":"Updating Global Setting: {variable} = {value}",
20702082
"Initializing Settings Frame":"Initializing Settings Frame",
2083+
"Choose Your Language":"Choose Your Language",
2084+
"Provide English & Chinese Simplified.":"Provide English & Chinese Simplified.",
20712085
"Updating System Defaults: {variable} = {value} ({value_type})":"Updating System Defaults: {variable} = {value} ({value_type})",
20722086
"Updating System Defaults (root): {variable} = {value} ({value_type})":"Updating System Defaults (root): {variable} = {value} ({value_type})",
20732087
}
20742088
elif self.language_point=="简体中文":
20752089
trans={
20762090
"Initializing Settings Frame":"初始化设置框架",
2091+
"Choose Your Language":"选择您的语言",
2092+
"Provide English & Chinese Simplified.":"提供英文和简体中文",
20772093
"Updating System Defaults (root): {variable} = {value} ({value_type})":"更新系统默认值(root):{variable} = {value} ({value_type})",
20782094
"Updating System Defaults: {variable} = {value} ({value_type})":"更新系统默认值:{variable} = {value} ({value_type})",
20792095
"Updating Global Setting: {variable} = {value}":"更新全局设置:{variable} = {value}",
@@ -2347,13 +2363,13 @@ def gui_settings(self):
23472363
"menu bar colour will dynamically":"菜单栏颜色将动态变化",
23482364
"Beta Blur":"测试版模糊",
23492365
"Control window blur behaviour.":"控制窗口模糊行为。",
2350-
"Beach Ball Cursor Workaround":"沙滩球光标解决方法",
2351-
"Control beach ball cursor behaviour.":"控制沙滩球光标行为。",
2366+
"Beach Ball Cursor Workaround":"彩虹球球光标解决方法",
2367+
"Control beach ball cursor behaviour.":"控制彩虹球光标行为。\n注意这会占用更多CPU资源",
23522368
"Beta Menu Bar":"测试版菜单栏",
23532369
"Supports dynamic colour changes.":"支持动态颜色变化。",
23542370
"Disable Beta Rim":"禁用测试版边框",
23552371
"Control Window Rim rendering.":"控制窗口边框渲染。",
2356-
"Disable Color Widgets Enforcement":"禁用颜色小组件强制",
2372+
"Disable Color Widgets Enforcement":"禁用颜色小组件强制执行",
23572373
"Control Color Desktop Widgets Enforcement.":"控制彩色桌面小组件强制。",
23582374
"App":"应用",
23592375
"General":"常规",
@@ -2652,7 +2668,7 @@ def gui_update(self):
26522668
}
26532669
return trans
26542670
class TranslateLanguage_sys_patch:
2655-
def __init__(self, global_constants: Constants) -> None:
2671+
def __init__(self, global_constants: Constants = None) -> None:
26562672
self.file_name: str = ".com.hackdoc.oclp-r.plist"
26572673
self.global_settings_folder: str = "/Users/Shared"
26582674
self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}"
@@ -3095,8 +3111,132 @@ def utilities(self):
30953111
}
30963112
return trans
30973113

3114+
def hardware(self):
3115+
if self.language_point=="English":
3116+
trans={
3117+
# Hardware Variants
3118+
"Graphics":"Graphics",
3119+
"Networking":"Networking",
3120+
"Audio":"Audio",
3121+
"Miscellaneous":"Miscellaneous",
3122+
"USB":"USB",
3123+
3124+
# Audio
3125+
"Legacy Audio":"Legacy Audio",
3126+
"Modern Audio":"Modern Audio",
3127+
"Voodoo Audio":"Voodoo Audio",
3128+
3129+
# Graphics
3130+
"AMD Legacy GCN":"AMD Legacy GCN",
3131+
"AMD Navi":"AMD Navi",
3132+
"AMD Polaris":"AMD Polaris",
3133+
"AMD TeraScale 1":"AMD TeraScale 1",
3134+
"AMD TeraScale 2":"AMD TeraScale 2",
3135+
"AMD Vega":"AMD Vega",
3136+
"Intel Broadwell":"Intel Broadwell",
3137+
"Intel Haswell":"Intel Haswell",
3138+
"Intel Iron Lake":"Intel Iron Lake",
3139+
"Intel Ivy Bridge":"Intel Ivy Bridge",
3140+
"Intel Sandy Bridge":"Intel Sandy Bridge",
3141+
"Intel Skylake":"Intel Skylake",
3142+
"Nvidia Kepler":"Nvidia Kepler",
3143+
"Nvidia Tesla":"Nvidia Tesla",
3144+
"Nvidia Web Drivers":"Nvidia Web Drivers",
3145+
3146+
# Miscellaneous
3147+
"FileVault Patch for Non-T2":"FileVault Patch for Non-T2",
3148+
"Legacy CPUs (Lacking AVX)":"Legacy CPUs (Lacking AVX)",
3149+
"Legacy GMUX":"Legacy GMUX",
3150+
"Legacy Keyboard Backlight":"Legacy Keyboard Backlight",
3151+
"PCIe FaceTime Camera":"PCIe FaceTime Camera",
3152+
"T1 Security Chip":"T1 Security Chip",
3153+
"Legacy Backlight Control":"Legacy Backlight Control",
3154+
3155+
# Networking
3156+
"Legacy Wireless":"Legacy Wireless",
3157+
"Modern Wireless":"Modern Wireless",
3158+
3159+
# USB
3160+
"Modern USB":"Modern USB",
3161+
"Legacy USB 1.1":"Legacy USB 1.1",
3162+
}
3163+
elif self.language_point=="简体中文":
3164+
trans={
3165+
# Hardware Variants
3166+
"Graphics":"图形",
3167+
"Networking":"网络",
3168+
"Audio":"音频",
3169+
"Miscellaneous":"杂项",
3170+
"USB":"USB",
3171+
3172+
# Audio
3173+
"Legacy Audio":"传统音频补丁",
3174+
"Modern Audio":"现代音频补丁",
3175+
"Voodoo Audio":"Voodoo 音频补丁",
3176+
3177+
# Graphics
3178+
"AMD Legacy GCN":"AMD 传统 GCN",
3179+
"AMD Navi":"AMD Navi",
3180+
"AMD Polaris":"AMD Polaris",
3181+
"AMD TeraScale 1":"AMD TeraScale 1",
3182+
"AMD TeraScale 2":"AMD TeraScale 2",
3183+
"AMD Vega":"AMD Vega",
3184+
"Intel Broadwell":"Intel Broadwell (iGPU,5th)",
3185+
"Intel Haswell":"Intel Haswell (iGPU,4th)",
3186+
"Intel Iron Lake":"Intel Iron Lake",
3187+
"Intel Ivy Bridge":"Intel Ivy Bridge (iGPU,3rd)",
3188+
"Intel Sandy Bridge":"Intel Sandy Bridge (iGPU,2nd)",
3189+
"Intel Skylake":"Intel Skylake (iGPU,6th)",
3190+
"Nvidia Kepler":"Nvidia Kepler",
3191+
"Nvidia Tesla":"Nvidia Tesla",
3192+
"Nvidia Web Drivers":"Nvidia Web 驱动程序",
3193+
3194+
# Miscellaneous
3195+
"FileVault Patch for Non-T2":"非 T2 芯片 的 FileVault 补丁",
3196+
"Legacy CPUs (Lacking AVX)":"传统 CPU(缺少 AVX)的补丁",
3197+
"Legacy GMUX":"传统 GMUX 补丁",
3198+
"Legacy Keyboard Backlight":"传统键盘背光补丁",
3199+
"PCIe FaceTime Camera":"PCIe FaceTime 摄像头补丁",
3200+
"T1 Security Chip":"T1 安全芯片补丁",
3201+
"Legacy Backlight Control":"传统背光控制补丁",
3202+
3203+
# Networking
3204+
"Legacy Wireless":"传统无线补丁",
3205+
"Modern Wireless":"现代无线补丁",
3206+
3207+
# USB
3208+
"Modern USB":"现代 USB 补丁",
3209+
"Legacy USB 1.1":"传统 USB 1.1补丁",
3210+
}
3211+
return trans
3212+
3213+
def base(self):
3214+
if self.language_point=="English":
3215+
trans={
3216+
"Overwrite System Volume":"Overwrite System Volume",
3217+
"Overwrite Data Volume":"Overwrite Data Volume",
3218+
"Merge System Volume":"Merge System Volume",
3219+
"Merge Data Volume":"Merge Data Volume",
3220+
"Remove System Volume":"Remove System Volume",
3221+
"Remove Data Volume":"Remove Data Volume",
3222+
"Execute":"Execute",
3223+
"MetallibSupportPkg":"MetallibSupportPkg",
3224+
}
3225+
elif self.language_point=="简体中文":
3226+
trans={
3227+
"Overwrite System Volume":"覆盖系统卷",
3228+
"Overwrite Data Volume":"覆盖数据卷",
3229+
"Merge System Volume":"合并系统卷",
3230+
"Merge Data Volume":"合并数据卷",
3231+
"Remove System Volume":"删除系统卷",
3232+
"Remove Data Volume":"删除数据卷",
3233+
"Execute":"执行",
3234+
"MetallibSupportPkg":"MetallibSupportPkg",
3235+
}
3236+
return trans
3237+
30983238
class TranslateLanguage_efi_builder:
3099-
def __init__(self, global_constants: Constants) -> None:
3239+
def __init__(self, global_constants: Constants = None) -> None:
31003240
self.file_name: str = ".com.hackdoc.oclp-r.plist"
31013241
self.global_settings_folder: str = "/Users/Shared"
31023242
self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}"

oclp_r/support/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def _validate_sys_patch(self) -> None:
233233

234234
atexit.register(self._unmount_dmg)
235235

236-
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, os_data.os_data.sonoma, os_data.os_data.sequoia, os_data.os_data.tahoe]:
236+
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, os_data.os_data.sonoma, os_data.os_data.sequoia]:
237237
for i in range(0, 10):
238238
self._validate_root_patch_files(supported_os, i)
239239

oclp_r/sys_patch/patchsets/base.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@
33
"""
44

55
from enum import StrEnum
6+
from ...support.translate_language import TranslateLanguage_sys_patch
67

8+
trans=TranslateLanguage_sys_patch(global_constants=None).base()
79

810
class PatchType(StrEnum):
911
"""
1012
Type of patch
1113
"""
12-
OVERWRITE_SYSTEM_VOLUME = "Overwrite System Volume"
13-
OVERWRITE_DATA_VOLUME = "Overwrite Data Volume"
14-
MERGE_SYSTEM_VOLUME = "Merge System Volume"
15-
MERGE_DATA_VOLUME = "Merge Data Volume"
16-
REMOVE_SYSTEM_VOLUME = "Remove System Volume"
17-
REMOVE_DATA_VOLUME = "Remove Data Volume"
18-
EXECUTE = "Execute"
14+
OVERWRITE_SYSTEM_VOLUME = trans["Overwrite System Volume"]
15+
OVERWRITE_DATA_VOLUME = trans["Overwrite Data Volume"]
16+
MERGE_SYSTEM_VOLUME = trans["Merge System Volume"]
17+
MERGE_DATA_VOLUME = trans["Merge Data Volume"]
18+
REMOVE_SYSTEM_VOLUME = trans["Remove System Volume"]
19+
REMOVE_DATA_VOLUME = trans["Remove Data Volume"]
20+
EXECUTE = trans["Execute"]
1921

2022

2123
class DynamicPatchset(StrEnum):
22-
MetallibSupportPkg = "MetallibSupportPkg"
24+
MetallibSupportPkg = trans["MetallibSupportPkg"]
2325

2426

2527
class BasePatchset:

0 commit comments

Comments
 (0)