|
4 | 4 | import logging |
5 | 5 |
|
6 | 6 | class TranslateLanguage: |
7 | | - def __init__(self, global_constants: Constants) -> None: |
| 7 | + def __init__(self, global_constants: Constants = None) -> None: |
8 | 8 | self.file_name: str = ".com.hackdoc.oclp-r.plist" |
9 | 9 | self.global_settings_folder: str = "/Users/Shared" |
10 | 10 | self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}" |
@@ -1386,6 +1386,11 @@ def gui_macos_installer_download(self): |
1386 | 1386 | "Copy the download link of the selected DMG.":"Copy the download link of the selected DMG.", |
1387 | 1387 | "Create macOS Installer":"Create macOS Installer", |
1388 | 1388 | "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}", |
1389 | 1394 | } |
1390 | 1395 | elif self.language_point=="简体中文": |
1391 | 1396 | trans={ |
@@ -1452,7 +1457,12 @@ def gui_macos_installer_download(self): |
1452 | 1457 | "Finished extracting the installer, would you like to continue and create a macOS installer?":"安装程序提取完成,是否要继续创建 macOS 安装程序?", |
1453 | 1458 | "Create macOS Installer?":"创建 macOS 安装程序?", |
1454 | 1459 | "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}", |
1456 | 1466 | } |
1457 | 1467 | return trans |
1458 | 1468 |
|
@@ -1524,7 +1534,8 @@ def gui_macos_installer_flash(self): |
1524 | 1534 | "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?", |
1525 | 1535 | "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", |
1526 | 1536 | "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:", |
1528 | 1539 | } |
1529 | 1540 | elif self.language_point=="简体中文": |
1530 | 1541 | trans={ |
@@ -1593,7 +1604,8 @@ def gui_macos_installer_flash(self): |
1593 | 1604 | "Successfully created macOS installer":"成功创建 macOS 安装程序", |
1594 | 1605 | "Installer created successfully, would you like to continue and Install OpenCore to this disk?":"安装程序创建成功,是否继续将 OpenCore 安装到此磁盘?", |
1595 | 1606 | "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:":"找到安装程序:", |
1597 | 1609 | } |
1598 | 1610 | return trans |
1599 | 1611 |
|
@@ -2068,12 +2080,16 @@ def gui_settings(self): |
2068 | 2080 | "Updating Local Setting: {variable} = {value}":"Updating Local Setting: {variable} = {value}", |
2069 | 2081 | "Updating Global Setting: {variable} = {value}":"Updating Global Setting: {variable} = {value}", |
2070 | 2082 | "Initializing Settings Frame":"Initializing Settings Frame", |
| 2083 | + "Choose Your Language":"Choose Your Language", |
| 2084 | + "Provide English & Chinese Simplified.":"Provide English & Chinese Simplified.", |
2071 | 2085 | "Updating System Defaults: {variable} = {value} ({value_type})":"Updating System Defaults: {variable} = {value} ({value_type})", |
2072 | 2086 | "Updating System Defaults (root): {variable} = {value} ({value_type})":"Updating System Defaults (root): {variable} = {value} ({value_type})", |
2073 | 2087 | } |
2074 | 2088 | elif self.language_point=="简体中文": |
2075 | 2089 | trans={ |
2076 | 2090 | "Initializing Settings Frame":"初始化设置框架", |
| 2091 | + "Choose Your Language":"选择您的语言", |
| 2092 | + "Provide English & Chinese Simplified.":"提供英文和简体中文", |
2077 | 2093 | "Updating System Defaults (root): {variable} = {value} ({value_type})":"更新系统默认值(root):{variable} = {value} ({value_type})", |
2078 | 2094 | "Updating System Defaults: {variable} = {value} ({value_type})":"更新系统默认值:{variable} = {value} ({value_type})", |
2079 | 2095 | "Updating Global Setting: {variable} = {value}":"更新全局设置:{variable} = {value}", |
@@ -2347,13 +2363,13 @@ def gui_settings(self): |
2347 | 2363 | "menu bar colour will dynamically":"菜单栏颜色将动态变化", |
2348 | 2364 | "Beta Blur":"测试版模糊", |
2349 | 2365 | "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资源", |
2352 | 2368 | "Beta Menu Bar":"测试版菜单栏", |
2353 | 2369 | "Supports dynamic colour changes.":"支持动态颜色变化。", |
2354 | 2370 | "Disable Beta Rim":"禁用测试版边框", |
2355 | 2371 | "Control Window Rim rendering.":"控制窗口边框渲染。", |
2356 | | - "Disable Color Widgets Enforcement":"禁用颜色小组件强制", |
| 2372 | + "Disable Color Widgets Enforcement":"禁用颜色小组件强制执行", |
2357 | 2373 | "Control Color Desktop Widgets Enforcement.":"控制彩色桌面小组件强制。", |
2358 | 2374 | "App":"应用", |
2359 | 2375 | "General":"常规", |
@@ -2652,7 +2668,7 @@ def gui_update(self): |
2652 | 2668 | } |
2653 | 2669 | return trans |
2654 | 2670 | class TranslateLanguage_sys_patch: |
2655 | | - def __init__(self, global_constants: Constants) -> None: |
| 2671 | + def __init__(self, global_constants: Constants = None) -> None: |
2656 | 2672 | self.file_name: str = ".com.hackdoc.oclp-r.plist" |
2657 | 2673 | self.global_settings_folder: str = "/Users/Shared" |
2658 | 2674 | self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}" |
@@ -3095,8 +3111,132 @@ def utilities(self): |
3095 | 3111 | } |
3096 | 3112 | return trans |
3097 | 3113 |
|
| 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 | + |
3098 | 3238 | class TranslateLanguage_efi_builder: |
3099 | | - def __init__(self, global_constants: Constants) -> None: |
| 3239 | + def __init__(self, global_constants: Constants = None) -> None: |
3100 | 3240 | self.file_name: str = ".com.hackdoc.oclp-r.plist" |
3101 | 3241 | self.global_settings_folder: str = "/Users/Shared" |
3102 | 3242 | self.global_settings_plist: str = f"{self.global_settings_folder}/{self.file_name}" |
|
0 commit comments