From f1498a376b4dc88aded948324cdacf439f04cb64 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sun, 26 Nov 2023 14:34:08 +0800 Subject: [PATCH] Add some mainwindow translate --- LANG/deepin-wine-runner-en_US.ts | 983 ++++++++++++++++++++----------- mainwindow.py | 463 +++++++-------- 2 files changed, 884 insertions(+), 562 deletions(-) diff --git a/LANG/deepin-wine-runner-en_US.ts b/LANG/deepin-wine-runner-en_US.ts index 7f59398..2566687 100755 --- a/LANG/deepin-wine-runner-en_US.ts +++ b/LANG/deepin-wine-runner-en_US.ts @@ -4,847 +4,1168 @@ U - + Wine(&W) Wine(&W) - + VIRUSTOTAL VIRUSTOTAL - + RegShot - + MD5(&M) - + SHA1(&M) - + SHA256(&S) - + SHA512(&S) - + Gitee - + Github - - Gitlink - - - - + Gitlab - + 确定 - + OK - + 如果安装字体?只需要把字体文件复制到此字体目录 按下“OK”按钮可以打开字体目录 - + You need copy the fonts file to the font file if you want to install the font +Press "OK" button to open the font folder - - 更新(更新过程中会关闭所有Python应用,包括这个应用) - - - - - 此为最新版本,无需更新 - - - - + 错误 - + Error - - 无法连接服务器! - - - - + 检查更新 - + Check update - + ISO镜像: - + ISO File: - + 浏览 - + Browser - + 读取/挂载ISO镜像 - + Read/Mount ISO Image - + 关闭/卸载ISO镜像 - + Close/Umount ISO Image - + 查找 - + Search - + 保存到 wine 容器中 - + Save file in wine bottle - + 设置 wine 容器 - + Set wine bottle - + 查找DLL (为空则代表不查找, 将显示全部内容): - + Search DLL - + 提示 - + Tips - + 关闭/卸载成功! - + Umount successful - + 点此上传运行情况 - + Upload program running status - + 综合评价: - + Score: - + 上传 - + Upload - + 如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可 - + - + 程序名: - + Program Name: - + 评分: - + Score: - + 上传程序运行情况 - + Upload running status - + 数据上传失败! - + Upload error! - + 选择 Wine 容器版本: - + Choose wine bottle version: - + wine DEBUG 信息输出: - + Wine DEBUG Information Print: - + 默认 Wine: - + Default Wine: - + 默认 Wine 容器: - + Default Wine Bottle: - + 使用终端打开: - + Open With Terminal: - + 自定义 wine 参数: - + Wine Option: - + 程序主题: - + Runner Theme: - + Wine 默认 Mono 和 Gecko 安装器: - + Default Mono and Gecko Installer: - + 忽略未安装的 Wine: - + Untips Uninstall Wine: - + 下载缓存: - + Download Cache: - + 图标生成: - + Icon name: - + 自动根据EXE名称生成路径: - + Auto Set Path: - + 开启 DEBUG 输出 - + Enable DEBUG print - + 保存 - + Save - + 测试(重启后变回设置的主题) - + Test - + 使用终端打开(deepin 终端) - + Enable opening with terminal - + 屏蔽 Wine 默认 Mono 和 Gecko 安装器 - + Disabled mono and gecko installer - + 不显示未检测到的 Wine - + Untips wine without installing - + 开启下载缓存 - + Enable download cache - + 本软件构建的图标后面添加容器名 - + Add bottle name after icon name - - 自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启后生效) - - - - + 选择 Wine 容器 - + Choose Wine Bottle - + 快速启动 - + Easy - + 请选择容器路径: - + Wine Bottle: - + 请选择要执行的程序(EXE、MSI或者命令): - + Program Path (exe, msi or command): - + 请选择WINE版本: - + Wine: - + 高级功能 - + Advanced Option - + 创建快捷方式(Desktop文件): - + Create desktop icon: - + 名称: - + Name: - + 创建到桌面 - + Create to desktop - + 创建到开始菜单 - + Create to launcher - + 程序管理: - + Program Manager: - + 提取图标 - + Export exe icon - + 窗口透明工具 - + Window Transparent Tool - + 卸载程序 - + Remove Program - + 微型应用商店 - + Mini App Store - + 获取该程序运行情况 - + Get Running Status - + WINE配置: - + Wine Config: - + 配置容器 - + Bottle Config - + 字体商店 - + Font Store - + 星火wine配置 - + Spark Wine Config - + 自动/手动配置 Wine 容器 - + Auto Wine Config - + 在此可以看到wine安装应用时的终端输出内容 - + You can see wine debug information in it - + 运行程序 - + Run - + 终止程序 - + Stop - + 终止指定容器的程序 - + Stop all program in wine bottle - + 程序(&P) - + Program(&P) - + 安装 wine(&I) - + Install Wine(&I) - - 安装 wine(只限Deepin23) - - - - - 安装 WineHQ - - - - - 安装更多 Wine - - - - + 设置程序(&S) - + Setting(&S) - + 清空软件历史记录(&C) - + Clean Program History(&C) - + 清空软件缓存 - + Clean Program Cache - + 删除程序组件 - + Delete program section - + 退出程序(&E) - + Exit(&E) - + 打开 Wine 容器目录 - + Open Wine Bottle Folder - + 安装常见字体 - + Install Font - + 安装自定义字体 - + Install More Font - + 删除选择的 Wine 容器 - + Delete Wine Bottle - + 清理 Wine 容器(基于 Wine 适配活动脚本) - + Clean Wine Bottle - + Wine 快捷键映射 - + Wine Keyboard Map - - 打包 wine 应用 - - - - + 使用官方 Wine 适配活动的脚本进行打包 - + Build Wine Program Package With Deepin/UOS Packager - + 从互联网获取DLL - + Get DLL From Internet - + 从镜像获取DLL(只支持官方安装镜像,DOS内核如 Windows 95 暂不支持) - + Get DLL From ISO - + 从 Geek Uninstaller 官网升级程序 - + Update Geek Uninstaller - + 删除所有 Wine 程序在启动器的快捷方式 - + Delete All Wine Lnk In Launcher - + 在指定 Wine、容器安装组件 - + Install Wine Section - + 在指定wine、指定容器安装 .net framework - + Install .net framework - + 在指定wine、指定容器安装 Visual Studio C++ - + Install VIsual Studio C++ - + 在指定wine、指定容器安装 MSXML - + Install MSXML - + 在指定wine、指定容器安装 gecko - + Install gecko - + 在指定wine、指定容器安装 mono - + Install mono - + 在指定wine、指定容器安装 Visual Basic Runtime - + Install Visual Basic Runtime - + 在指定wine、指定容器安装其它运行库 - + Install More - + 在指定 Wine、容器运行基础应用 - + Run Base Program - + 打开指定wine、指定容器的控制面板 - + Run Wine Control - + 打开指定wine、指定容器的浏览器 - + Run Wine Web Browser - + 打开指定wine、指定容器的注册表 - + Run Wine Regedit - + 打开指定wine、指定容器的任务管理器 - + Run Wine Taskmgr - + 打开指定wine、指定容器的资源管理器 - + Run Wine Explorer - + 打开指定wine、指定容器的关于 wine - + Run "About Wine" - + 设置 run_v3.sh 的文管为 Deepin 默认文管 - + Set "run_v3.sh" File Manager To Deepin File Manager - + 设置 run_v3.sh 的文管为 Wine 默认文管 - + Set "run_v3.sh" File Manager To Wine Default File Manager - + 重新安装 deepin-wine-helper - + Reinstall deepin-wine-helper - + 使用winetricks打开指定容器 - + Run Winetricks - + 启用/禁用 opengl - + Enable/Disable OpenGL - + 开启 opengl - + Enable - + 禁用 opengl - + Disable - + 安装/卸载 winbind - + Install/Remove WinBind - + 安装 winbind - + Install - + 卸载 winbind - + Remove - + 安装/卸载 DXVK - + Install/Remove DXVK - + 安装 DXVK - + Install - + 卸载 DXVK - + Remove - - 允许/禁止指定 wine 容器生成快捷方式 - - - - + 允许指定 wine 容器生成快捷方式 - + Allow Build Wine Lnk - + 禁止指定 wine 容器生成快捷方式 - + Don't Allow Build Wine Lnk - + 启用/禁用指定 wine 容器崩溃提示窗口 - + 禁用指定 wine 容器崩溃提示窗口 - + 启用指定 wine 容器崩溃提示窗口 - + 设置指定 Wine 容器代理 - + 设置指定 wine 容器的代理 - + 禁用指定 wine 容器的代理 - + 函数顶替库列表 - + 导出函数顶替列表 - + 导入函数顶替列表 - + 编辑函数顶替库列表 - + 虚拟机(&V) - - 使用 Virtualbox 虚拟机运行 Windows 应用 - - - - + 校验值计算(&S) - + Base64(建议小文件)(&B) - + 云沙箱(&C) - + 360 沙箱云 - + 微步云沙箱 - + 帮助(&H) - + 查询程序在 Wine 的运行情况 - + 程序官网 - + 小提示 - + 更新内容 - - 谢明名单 - - - - + 更新这个程序 - + 反馈这个程序的建议和问题 - + 关于这个程序 - + 关于 Qt - + 作者个人站 - + 极狐 - + 程序 Wiki - + 视频教程 - + 更多生态适配应用 - + 运行 Android 应用:UEngine 运行器 + + + 更新(更新时会自动关闭 Wine 运行器) + + + + + 提示: + 目前本提取功能暂只支持 NT 内核系统的官方安装镜像,不支持读取 ghost 等第三方封装方式的安装镜像 + 以及不要拷贝/替换太多的 dll,否则可能会导致 wine 容器异常,以及不要替换 Wine 的核心 dll + 最后,拷贝/替换 dll 后,建议点击下面“设置 wine 容器”按钮==》函数库 进行设置 +当前选择的 Wine 容器:{GetDllFromWindowsISO.wineBottonPath} + + + + + Qemu + Chroot 挂载用户目录: + + + + + 程序翻译: + + + + + 字体缩小比例(数值越大字体越小,默认为 1): + + + + + 自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启程序后生效) + + + + + 使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效) + + + + + 禁用程序界面翻译 + + + + + 常见 Linux 发行版 + + + + + &lt;h4&gt;提示:&lt;/h4&gt; +1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错; +2、wine 32 位和 64 位的容器互不兼容; +3、所有的 wine 和 winetricks 均需要自行安装(可以从 菜单栏=&gt;程序 里面进行安装); +4、本程序支持带参数运行 wine 程序(之前版本也可以),只需要按以下格式即可: +exe路径' 参数 ' +即可(单引号需要输入); +5、wine 容器如果没有指定,则会默认为 ~/.wine; +6、如果可执行文件比较大的话,会出现点击“获取该程序运行情况”出现假死的情况,因为正在后台读取 SHA1,只需要等一下即可(读取速度依照您电脑处理速度、读写速度、可执行文件大小等有关); +7、如果非 X86 的用户的 UOS 专业版用户想要使用的话,只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序; + + + + + &lt;b&gt;3.5.0 更新内容:&lt;/b&gt; +※1、虚拟机工具支持 kvm 检测 +※2、修改虚拟机工具提示文本,新增对 UOS 3a4000 用户无法正常使用 Qemu 的解决方案 +※3、在主界面点击“安装”按钮后自动切换至帮助页面 +※4、新增虚拟机日志输出和读取功能 +※5、新增Qemu测试测试功能 +※6、虚拟机工具支持安装/运行 arm32、arm64 架构的系统 +※7、修复虚拟机工具在系统版本选择第 5 项及以后出现不会挂载 ISO 的问题(使用 Qemu 的情况下) +※8、修复简易打包器无法打开的问题 https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I85F9M +※9、生态适配脚本打包器支持正确根据打包结果显示打包成功/失败 https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I7D83Z +10、生态适配脚本打包器设置使用 xz 格式打包 deb +11、新增 ace 包 +12、虚拟机工具支持强制关闭 VirtualBox/Qemu,并增加了对 Windows 7 安装脚本的检测 +13、新增 lat 翻译器安装选项 + + + + + &lt;p&gt;Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。&lt;/p&gt; +&lt;p&gt;它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。&lt;/p&gt; +&lt;p&gt;而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。&lt;/p&gt; +&lt;p&gt;且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式&lt;/p&gt; +&lt;pre&gt; + + + + + 检测静态下程序缺少DLL + + + + + 重启指定Wine容器 + + + + + 安装 wine(只限Deepin23 Preview) + + + + + 安装 wine(只限Deepin23 Alpha) + + + + + 安装 WineHQ(官方源) + + + + + 安装 WineHQ(国内清华大学镜像源) + + + + + 安装更多 Wine(Wine 下载工具,推荐) + + + + + 下载 Chroot 容器 + + + + + 安装 Box86/Box64 日构建(国内源) + + + + + 安装 Box86/Box64 日构建(国外 Github 源) + + + + + 安装 Box86/Box64(使用自建源,支持 riscv64) + + + + + 安装 lat(只限 Loongarch64 架构) + + + + + 添加 Wine 运行器源以安装较新版本的 WineHQ(支持 Deepin20/Debian10) + + + + + 强制启用所有被禁用的组件(不推荐) + + + + + 临时设置小字体 + + + + + 临时设置很小的字体 + + + + + 临时设置默认字体 + + + + + 打包 wine 应用(专业用户使用) + + + + + 使用简易打包器进行打包(小白且无特殊需求建议使用这个) + + + + + 快捷方式管理工具 + + + + + 在指定wine、指定容器安装 Visual FoxPro + + + + + run_v3.sh 管理 + + + + + 使用winetricks打开指定容器(使用Wine运行器运行库) + + + + + 组件功能测试 + + + + + 测试 Visual Basic 6 程序 + + + + + 测试 .net framework 程序 + + + + + 测试 .net framework + Internet Explorer 程序 + + + + + 启用/禁用功能 + + + + + 安装/卸载 Vkd3d + + + + + 安装 Vkd3d + + + + + 卸载 Vkd3d + + + + + 启用/禁止指定 wine 容器生成快捷方式 + + + + + 启用/禁止指定 wine 容器创建文件关联 + + + + + 允许指定 wine 容器创建文件关联 + + + + + 禁止指定 wine 容器创建文件关联 + + + + + 使用虚拟机运行 Windows 应用 + + + + + 计算机病毒防御技术国家工程实验室 + + + + + 日志(&L) + + + + + 查询 Dll + + + + + 日志分析 + + + + + 另存为日志 + + + + + 翻译日志(翻译后日志分析功能会故障) + + + + + 上传日志 + + + + + 应用运行库(&R) + + + + + Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine) + + + + + 安装 Qemu User + + + + + 卸载 Qemu User + + + + + 安装 {os.path.splitext(i)[0]} 运行库 + + + + + 卸载 {os.path.splitext(i)[0]} 运行库 + + + + + 运行库 {os.path.splitext(i)[0]} + + + + + 容器(&C) + + + + + 解包 deb 提取容器 + + + + + 配置指定 Chroot 容器 + + + + + 视频教程(&V) + + + + + Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙 + + + + + 鸣谢名单 + + + + + 获取程序公告(也可以在这里看程序安装/打开量) + + + + + 程序评分 + + diff --git a/mainwindow.py b/mainwindow.py index dcfbcc6..128feea 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -423,7 +423,7 @@ def about_this_program()->"显示“关于这个程序”窗口": aboutInfo.setHtml(about) aboutInfo.setOpenExternalLinks(False) messageLayout.addWidget(aboutInfo, 0, 1, 1, 1) - ok = QtWidgets.QPushButton(transeObject.tr("确定")) + ok = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "确定")) ok.clicked.connect(QT.message.close) messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight) messageWidget.setLayout(messageLayout) @@ -696,7 +696,7 @@ def OpenWineFontPath(): wineBottonPath = setting["DefultBotton"] else: wineBottonPath = e1.currentText() - QtWidgets.QMessageBox.information(widget, "提示", transeObject.tr("如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录")) + QtWidgets.QMessageBox.information(widget, "提示", QtCore.QCoreApplication.translate("U", "如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录")) os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "/drive_c/windows/Fonts\"") def GetLoseDll(): @@ -1198,7 +1198,7 @@ class UpdateWindow(): updateText = QtWidgets.QTextBrowser() updateText.anchorClicked.connect(OpenUrl) updateText.setOpenExternalLinks(False) - ok = QtWidgets.QPushButton(transeObject.tr("更新(更新时会自动关闭 Wine 运行器)")) + ok = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "更新(更新时会自动关闭 Wine 运行器)")) ok.clicked.connect(UpdateWindow.Update) cancel = QtWidgets.QPushButton("取消") cancel.clicked.connect(UpdateWindow.update.close) @@ -1240,7 +1240,7 @@ class UpdateWindow(): updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1) updateWidget.setLayout(updateWidgetLayout) UpdateWindow.update.setCentralWidget(updateWidget) - UpdateWindow.update.setWindowTitle(transeObject.tr("检查更新")) + UpdateWindow.update.setWindowTitle(QtCore.QCoreApplication.translate("U", "检查更新")) UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5)) UpdateWindow.update.show() @@ -1291,27 +1291,27 @@ class GetDllFromWindowsISO: widgetLayout = QtWidgets.QGridLayout() if not e1.currentText() == "": GetDllFromWindowsISO.wineBottonPath = e1.currentText() - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr(f"""提示: + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", f"""提示: 目前本提取功能暂只支持 NT 内核系统的官方安装镜像,不支持读取 ghost 等第三方封装方式的安装镜像 以及不要拷贝/替换太多的 dll,否则可能会导致 wine 容器异常,以及不要替换 Wine 的核心 dll 最后,拷贝/替换 dll 后,建议点击下面“设置 wine 容器”按钮==》函数库 进行设置 当前选择的 Wine 容器:{GetDllFromWindowsISO.wineBottonPath}""")), 0, 0, 1, 5) - isoLabel = QtWidgets.QLabel(transeObject.tr("ISO镜像:")) + isoLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "ISO镜像:")) GetDllFromWindowsISO.isoPath = QtWidgets.QComboBox() - GetDllFromWindowsISO.browser = QtWidgets.QPushButton(transeObject.tr("浏览")) + GetDllFromWindowsISO.browser = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览")) isoControl = QtWidgets.QWidget() isoControlLayout = QtWidgets.QHBoxLayout() isoControl.setLayout(isoControlLayout) dllControl = QtWidgets.QWidget() dllControlLayout = QtWidgets.QHBoxLayout() dllControl.setLayout(dllControlLayout) - GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(transeObject.tr("读取/挂载ISO镜像")) - umountButton = QtWidgets.QPushButton(transeObject.tr("关闭/卸载ISO镜像")) + GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "读取/挂载ISO镜像")) + umountButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "关闭/卸载ISO镜像")) GetDllFromWindowsISO.dllFound = QtWidgets.QComboBox() - GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(transeObject.tr("查找")) + GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "查找")) GetDllFromWindowsISO.dllList = QtWidgets.QListView() - GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(transeObject.tr("保存到 wine 容器中")) - GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(transeObject.tr("设置 wine 容器")) + GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "保存到 wine 容器中")) + GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "设置 wine 容器")) isoLabel.setSizePolicy(size) GetDllFromWindowsISO.isoPath.setEditable(True) GetDllFromWindowsISO.isoPath.addItems(isoPath) @@ -1333,7 +1333,7 @@ class GetDllFromWindowsISO: widgetLayout.addWidget(GetDllFromWindowsISO.isoPath, 1, 1, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.browser, 1, 2, 1, 1) widgetLayout.addWidget(isoControl, 2, 1, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.dllFound, 3, 1, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.foundButton, 3, 2, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.dllList, 4, 1, 1, 1) @@ -1518,12 +1518,12 @@ class GetDllFromWindowsISO: os.system("rm -rf /tmp/wine-runner-getdll-wim") except: traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transeObject.tr("错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}") + QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, QtCore.QCoreApplication.translate("U", "错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}") return GetDllFromWindowsISO.DisbledDown(True) GetDllFromWindowsISO.DisbledUp(False) GetDllFromWindowsISO.mount = False - QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, transeObject.tr("提示"), transeObject.tr("关闭/卸载成功!")) + QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, QtCore.QCoreApplication.translate("U", "提示"), QtCore.QCoreApplication.translate("U", "关闭/卸载成功!")) def CopyDll(): choose = GetDllFromWindowsISO.dllList.selectionModel().selectedIndexes()[0].data() @@ -1615,9 +1615,9 @@ class ProgramRunStatusShow(): msgWidget = QtWidgets.QWidget() msgWidgetLayout = QtWidgets.QGridLayout() starLayout = QtWidgets.QHBoxLayout() - uploadButton = QtWidgets.QPushButton(transeObject.tr("点此上传运行情况")) + uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况")) uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(sha, title)) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("综合评价:")), 0, 0) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0) msgWidgetLayout.addLayout(starLayout, 0, 1) msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2) msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2) @@ -1666,7 +1666,7 @@ class ProgramRunStatusUpload(): ProgramRunStatusUpload.programName = QtWidgets.QLineEdit() ProgramRunStatusUpload.fen = QtWidgets.QComboBox() ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout() - upload = QtWidgets.QPushButton(transeObject.tr("上传")) + upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) upload.clicked.connect(ProgramRunStatusUpload.Upload) if title != "": ProgramRunStatusUpload.programName.setText(title) @@ -1676,7 +1676,7 @@ class ProgramRunStatusUpload(): ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"")) ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) - ProgramRunStatusUpload.programName.setPlaceholderText(transeObject.tr("如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")) + ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")) ProgramRunStatusUpload.fen.addItems(["0分:无法运行并且也没有报错,自己无法解决", "1分:无法运行但有报错,自己无法解决", "2分:可以运行但是效果很差,几乎无法使用", @@ -1687,15 +1687,15 @@ class ProgramRunStatusUpload(): "含有病毒、木马等对计算机有害的软件"]) ProgramRunStatusUpload.fen.setCurrentIndex(4) ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序名:")), 0, 0) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("评分:")), 1, 0) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0) + msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1) msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1) msgWidgetLayout.addWidget(upload, 3, 1) msgWidget.setLayout(msgWidgetLayout) ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget) - ProgramRunStatusUpload.msgWindow.setWindowTitle(transeObject.tr("上传程序运行情况")) + ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况")) ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) ProgramRunStatusUpload.msgWindow.show() @@ -1709,7 +1709,7 @@ class ProgramRunStatusUpload(): try: if ProgramRunStatusUpload.sha1Value == "": ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText()) - QtWidgets.QMessageBox.information(None, transeObject.tr("提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), { + QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), { "SHA1": ProgramRunStatusUpload.sha1Value, "Name": ProgramRunStatusUpload.programName.text(), "Fen": ProgramRunStatusUpload.fen.currentIndex(), @@ -1717,7 +1717,7 @@ class ProgramRunStatusUpload(): }).text)["Error"]) except: traceback.print_exc() - QtWidgets.QMessageBox.critical(None, transeObject.tr("错误"), transeObject.tr("数据上传失败!")) + QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) def GetSHA1(filePath): sha1 = hashlib.sha1() @@ -1753,43 +1753,43 @@ class ProgramSetting(): ProgramSetting.message = QtWidgets.QMainWindow() widget = QtWidgets.QWidget() widgetLayout = QtWidgets.QGridLayout() - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("选择 Wine 容器版本:")), 0, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("wine DEBUG 信息输出:")), 1, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("默认 Wine:")), 2, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("默认 Wine 容器:")), 3, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("使用终端打开:")), 4, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("自定义 wine 参数:")), 5, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序主题:")), 6, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("忽略未安装的 Wine:")), 8, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("下载缓存:")), 9, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("图标生成:")), 10, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("自动根据EXE名称生成路径:")), 11, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("Qemu + Chroot 挂载用户目录:")), 12, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序翻译:")), 13, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("字体缩小比例(数值越大字体越小,默认为 1):")), 14, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "选择 Wine 容器版本:")), 0, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "wine DEBUG 信息输出:")), 1, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "默认 Wine:")), 2, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "默认 Wine 容器:")), 3, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "使用终端打开:")), 4, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "自定义 wine 参数:")), 5, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序主题:")), 6, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "忽略未安装的 Wine:")), 8, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "下载缓存:")), 9, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "图标生成:")), 10, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "自动根据EXE名称生成路径:")), 11, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "Qemu + Chroot 挂载用户目录:")), 12, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序翻译:")), 13, 0, 1, 1) + widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "字体缩小比例(数值越大字体越小,默认为 1):")), 14, 0, 1, 1) ProgramSetting.wineBottonA = QtWidgets.QComboBox() - ProgramSetting.wineDebug = QtWidgets.QCheckBox(transeObject.tr("开启 DEBUG 输出")) + ProgramSetting.wineDebug = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "开启 DEBUG 输出")) ProgramSetting.defultWine = QtWidgets.QComboBox() ProgramSetting.defultBotton = QtWidgets.QLineEdit() ProgramSetting.theme = QtWidgets.QComboBox() ProgramSetting.theme.addItems(QtWidgets.QStyleFactory.keys()) ProgramSetting.theme.setCurrentText(setting["Theme"]) - save = QtWidgets.QPushButton(transeObject.tr("保存")) + save = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "保存")) save.clicked.connect(ProgramSetting.Save) - defultBottonButton = QtWidgets.QPushButton(transeObject.tr("浏览")) + defultBottonButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览")) defultBottonButton.clicked.connect(ProgramSetting.Browser) - themeTry = QtWidgets.QPushButton(transeObject.tr("测试(重启后变回设置的主题)")) + themeTry = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "测试(重启后变回设置的主题)")) themeTry.clicked.connect(ProgramSetting.Try) - ProgramSetting.terminalOpen = QtWidgets.QCheckBox(transeObject.tr("使用终端打开(deepin 终端)")) + ProgramSetting.terminalOpen = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "使用终端打开(deepin 终端)")) ProgramSetting.wineOption = QtWidgets.QLineEdit() - ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(transeObject.tr("屏蔽 Wine 默认 Mono 和 Gecko 安装器")) - ProgramSetting.autoWine = QtWidgets.QCheckBox(transeObject.tr("不显示未检测到的 Wine")) - ProgramSetting.runtimeCache = QtWidgets.QCheckBox(transeObject.tr("开启下载缓存")) - ProgramSetting.buildByBottleName = QtWidgets.QCheckBox(transeObject.tr("本软件构建的图标后面添加容器名")) - ProgramSetting.autoPath = QtWidgets.QCheckBox(transeObject.tr("自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启程序后生效)")) - ProgramSetting.qemuUnmountHome = QtWidgets.QCheckBox(transeObject.tr("使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)")) - ProgramSetting.chineseLanguage = QtWidgets.QCheckBox(transeObject.tr("禁用程序界面翻译")) + ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "屏蔽 Wine 默认 Mono 和 Gecko 安装器")) + ProgramSetting.autoWine = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "不显示未检测到的 Wine")) + ProgramSetting.runtimeCache = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "开启下载缓存")) + ProgramSetting.buildByBottleName = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "本软件构建的图标后面添加容器名")) + ProgramSetting.autoPath = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启程序后生效)")) + ProgramSetting.qemuUnmountHome = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)")) + ProgramSetting.chineseLanguage = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "禁用程序界面翻译")) ProgramSetting.fontSize = QtWidgets.QDoubleSpinBox() ProgramSetting.wineBottonA.addItems(["Auto", "win32", "win64"]) ProgramSetting.wineBottonA.setCurrentText(setting["Architecture"]) @@ -1833,7 +1833,7 @@ class ProgramSetting(): ProgramSetting.message.show() def Browser(): - path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, transeObject.tr("选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"]) + path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, QtCore.QCoreApplication.translate("U", "选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"]) if path == "" or path == None or path == "()" or path == (): return ProgramSetting.defultBotton.setText(path) @@ -2521,23 +2521,24 @@ print(wine) # 程序信息 ########################### app = QtWidgets.QApplication(sys.argv) -transe = QtCore.QTranslator() +trans = QtCore.QTranslator() transeObject = QtCore.QObject() +transla = QtCore.QCoreApplication.translate #transeObject.tr("") # 语言载入 if not "zh_CN".lower() in get_now_lang().lower() and not setting["Chinese"]: - transe.load() + trans.load() else: pass -app.installTranslator(transe) +app.installTranslator(trans) iconPath = "{}/deepin-wine-runner.svg".format(programPath) #iconPath = "{}/Icon/Program/wine运行器.png".format(programPath) programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner\nhttps://github.com/gfdgd-xi/deep-wine-runner\nhttps://gfdgd-xi.github.io" information = json.loads(readtxt(f"{programPath}/information.json")) version = information["Version"] -goodRunSystem = transeObject.tr("常见 Linux 发行版") +goodRunSystem = QtCore.QCoreApplication.translate("U", "常见 Linux 发行版") thankText = "" -tips = transeObject.tr('''

提示:

+tips = QtCore.QCoreApplication.translate("U", '''

提示:

1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错; 2、wine 32 位和 64 位的容器互不兼容; 3、所有的 wine 和 winetricks 均需要自行安装(可以从 菜单栏=>程序 里面进行安装); @@ -2547,7 +2548,7 @@ exe路径\' 参数 \' 5、wine 容器如果没有指定,则会默认为 ~/.wine; 6、如果可执行文件比较大的话,会出现点击“获取该程序运行情况”出现假死的情况,因为正在后台读取 SHA1,只需要等一下即可(读取速度依照您电脑处理速度、读写速度、可执行文件大小等有关); 7、如果非 X86 的用户的 UOS 专业版用户想要使用的话,只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序;''') -updateThingsString = transeObject.tr('''3.5.0 更新内容: +updateThingsString = QtCore.QCoreApplication.translate("U", '''3.5.0 更新内容: ※1、虚拟机工具支持 kvm 检测 ※2、修改虚拟机工具提示文本,新增对 UOS 3a4000 用户无法正常使用 Qemu 的解决方案 ※3、在主界面点击“安装”按钮后自动切换至帮助页面 @@ -2564,7 +2565,7 @@ updateThingsString = transeObject.tr('''3.5.0 更新内容: for i in information["Thank"]: thankText += f"{i}\n" updateTime = "2023年11月17日" -aboutProgram = transeObject.tr("""

Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。

+aboutProgram = QtCore.QCoreApplication.translate("U", """

Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。

它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。

而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。

且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式

@@ -2653,27 +2654,27 @@ leftUp = QtWidgets.QWidget() mainLayout.addWidget(leftUp, 0, 0, 1, 1) leftUpLayout = QtWidgets.QGridLayout() leftUp.setLayout(leftUpLayout) -fastLabel = QtWidgets.QLabel(transeObject.tr("快速启动")) +fastLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "快速启动")) fastLabel.setStyleSheet("font: 30px;") leftUpLayout.addWidget(fastLabel, 0, 0, 1, 2) leftUpLayout.addWidget(QtWidgets.QLabel("
"), 1, 0, 1, 2) -leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择容器路径:")), 2, 0, 1, 1) +leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择容器路径:")), 2, 0, 1, 1) e1 = QtWidgets.QComboBox() e1.setEditable(True) leftUpLayout.addWidget(e1, 3, 0, 1, 1) button1 = QtWidgets.QPushButton("浏览") button1.clicked.connect(liulanbutton) leftUpLayout.addWidget(button1, 3, 1, 1, 1) -leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择要执行的程序(EXE、MSI或者命令):")), 4, 0, 1, 1) +leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择要执行的程序(EXE、MSI或者命令):")), 4, 0, 1, 1) e2 = QtWidgets.QComboBox() if setting["AutoPath"]: e2.editTextChanged.connect(ChangePath) e2.setEditable(True) leftUpLayout.addWidget(e2, 5, 0, 1, 1) -button2 = QtWidgets.QPushButton(transeObject.tr("浏览")) +button2 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览")) button2.clicked.connect(liulanexebutton) leftUpLayout.addWidget(button2, 5, 1, 1, 1) -leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择WINE版本:")), 6, 0, 1, 1) +leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择WINE版本:")), 6, 0, 1, 1) o1 = QtWidgets.QComboBox() leftUpLayout.addWidget(o1, 7, 0, 1, 1) # 设置空间权重 @@ -2685,68 +2686,68 @@ leftDown = QtWidgets.QWidget() mainLayout.addWidget(leftDown, 1, 0, 1, 1) leftDownLayout = QtWidgets.QVBoxLayout() leftDown.setLayout(leftDownLayout) -highLabel = QtWidgets.QLabel(transeObject.tr("高级功能")) +highLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "高级功能")) highLabel.setStyleSheet("font: 30px;") leftDownLayout.addWidget(highLabel) leftDownLayout.addWidget(QtWidgets.QLabel("
")) -leftDownLayout.addWidget(QtWidgets.QLabel(transeObject.tr("创建快捷方式(Desktop文件):"))) +leftDownLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "创建快捷方式(Desktop文件):"))) createDesktopLink = QtWidgets.QHBoxLayout() -label_r_2 = QtWidgets.QLabel(transeObject.tr("名称:")) +label_r_2 = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "名称:")) createDesktopLink.addWidget(label_r_2) combobox1 = QtWidgets.QComboBox() combobox1.setEditable(True) createDesktopLink.addWidget(combobox1) -button5 = QtWidgets.QPushButton(transeObject.tr("创建到桌面")) +button5 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "创建到桌面")) button5.clicked.connect(make_desktop_on_desktop) createDesktopLink.addWidget(button5) -saveDesktopFileOnLauncher = QtWidgets.QPushButton(transeObject.tr("创建到开始菜单")) +saveDesktopFileOnLauncher = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "创建到开始菜单")) saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher) createDesktopLink.addWidget(saveDesktopFileOnLauncher) leftDownLayout.addLayout(createDesktopLink) programManager = QtWidgets.QGridLayout() leftDownLayout.addLayout(programManager) -programManager.addWidget(QtWidgets.QLabel(transeObject.tr("程序管理:")), 0, 0, 1, 1) -getProgramIcon = QtWidgets.QPushButton(transeObject.tr("提取图标")) +programManager.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序管理:")), 0, 0, 1, 1) +getProgramIcon = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "提取图标")) getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' '{e2.currentText()}" if e2.currentText()[:2].upper() == "C:" else f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}")) programManager.addWidget(getProgramIcon, 1, 0, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 1, 1, 1) -trasButton = QtWidgets.QPushButton(transeObject.tr("窗口透明工具")) +trasButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "窗口透明工具")) trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe")) programManager.addWidget(trasButton, 1, 2, 1, 1) -uninstallProgram = QtWidgets.QPushButton(transeObject.tr("卸载程序")) +uninstallProgram = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "卸载程序")) uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe")) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 3, 1, 1) programManager.addWidget(uninstallProgram, 1, 4, 1, 1) -miniAppStore = QtWidgets.QPushButton(transeObject.tr("微型应用商店")) +miniAppStore = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "微型应用商店")) miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start()) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 5, 1, 1) programManager.addWidget(miniAppStore, 1, 6, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 7, 1, 1) -getProgramStatus = QtWidgets.QPushButton(transeObject.tr("获取该程序运行情况")) +getProgramStatus = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "获取该程序运行情况")) getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow) programManager.addWidget(getProgramStatus, 1, 8, 1, 1) -getLoseDll = QtWidgets.QPushButton(transeObject.tr("检测静态下程序缺少DLL")) +getLoseDll = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "检测静态下程序缺少DLL")) getLoseDll.clicked.connect(GetLoseDll) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 9, 1, 1) programManager.addWidget(getLoseDll, 1, 10, 1, 1) programManager.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum), 1, 11, 1, 1) -programManager.addWidget(QtWidgets.QLabel(transeObject.tr("WINE配置:")), 2, 0, 1, 1) -wineConfig = QtWidgets.QPushButton(transeObject.tr("配置容器")) +programManager.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "WINE配置:")), 2, 0, 1, 1) +wineConfig = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "配置容器")) wineConfig.clicked.connect(lambda: RunWineProgram("winecfg")) programManager.addWidget(wineConfig, 3, 0, 1, 1) -fontAppStore = QtWidgets.QPushButton(transeObject.tr("字体商店")) +fontAppStore = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "字体商店")) fontAppStore.clicked.connect(FontAppStore) programManager.addWidget(fontAppStore, 3, 2, 1, 1) -button_r_6 = QtWidgets.QPushButton(transeObject.tr("RegShot")) +button_r_6 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "RegShot")) button_r_6.clicked.connect(lambda: RunWineProgram(f"{programPath}/RegShot/regshot.exe")) programManager.addWidget(button_r_6, 3, 4, 1, 1) -sparkWineSetting = QtWidgets.QPushButton(transeObject.tr("星火wine配置")) +sparkWineSetting = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "星火wine配置")) sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["bash /opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start()) programManager.addWidget(sparkWineSetting, 3, 6, 1, 1) -wineAutoConfig = QtWidgets.QPushButton(transeObject.tr("自动/手动配置 Wine 容器")) +wineAutoConfig = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "自动/手动配置 Wine 容器")) wineAutoConfig.clicked.connect(WineBottonAutoConfig) programManager.addWidget(wineAutoConfig, 3, 8, 1, 1) -wineBottleReboot = QtWidgets.QPushButton(transeObject.tr("重启指定Wine容器")) +wineBottleReboot = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "重启指定Wine容器")) wineBottleReboot.clicked.connect(lambda: RunWineProgram(f"wineboot' '-k")) programManager.addWidget(wineBottleReboot, 3, 10, 1, 1) # 权重 @@ -2763,7 +2764,7 @@ returnText.setStyleSheet(""" background-color: black; color: white; """) -returnText.setText(transeObject.tr("在此可以看到wine安装应用时的终端输出内容")) +returnText.setText(QtCore.QCoreApplication.translate("U", "在此可以看到wine安装应用时的终端输出内容")) mainLayout.setRowStretch(0, 2) mainLayout.setRowStretch(1, 1) mainLayout.setColumnStretch(0, 2) @@ -2781,41 +2782,41 @@ programRun = QtWidgets.QWidget() programRunLayout = QtWidgets.QHBoxLayout() programRun.setLayout(programRunLayout) programRunLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) -button3 = QtWidgets.QPushButton(transeObject.tr("运行程序")) +button3 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "运行程序")) button3.clicked.connect(runexebutton) programRunLayout.addWidget(button3) -killProgram = QtWidgets.QPushButton(transeObject.tr("终止程序")) +killProgram = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "终止程序")) killProgram.clicked.connect(KillProgram) programRunLayout.addWidget(killProgram) -killBottonProgram = QtWidgets.QPushButton(transeObject.tr("终止指定容器的程序")) +killBottonProgram = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "终止指定容器的程序")) killBottonProgram.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/kill.sh' '{os.path.basename(e1.currentText())}'"]).start()) programRunLayout.addWidget(killBottonProgram) mainLayout.addWidget(programRun, 2, 1, 1, 1) # 菜单栏 menu = window.menuBar() -programmenu = menu.addMenu(transeObject.tr("程序(&P)")) -p1 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 wine(&I)")) -installWineOnDeepin23 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23P.png"), transeObject.tr("安装 wine(只限Deepin23 Preview)")) -installWineOnDeepin23Alpha = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23A.png"), transeObject.tr("安装 wine(只限Deepin23 Alpha)")) -installWineHQOrg = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 WineHQ(官方源)")) -installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 WineHQ(国内清华大学镜像源)")) -installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), transeObject.tr("安装更多 Wine(Wine 下载工具,推荐)")) -downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transeObject.tr("下载 Chroot 容器")) -installBox86CN = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64 日构建(国内源)")) -installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64 日构建(国外 Github 源)")) -installBox86Own = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64(使用自建源,支持 riscv64)")) -installLat = QtWidgets.QAction(transeObject.tr("安装 lat(只限 Loongarch64 架构)")) -addWineDebMirrorForDeepin20 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("添加 Wine 运行器源以安装较新版本的 WineHQ(支持 Deepin20/Debian10)")) -p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), transeObject.tr("设置程序(&S)")) -enabledAll = QtWidgets.QAction(transeObject.tr("强制启用所有被禁用的组件(不推荐)")) -setMiniFont = QtWidgets.QAction(transeObject.tr("临时设置小字体")) -setTinyFont = QtWidgets.QAction(transeObject.tr("临时设置很小的字体")) -setDefaultFont = QtWidgets.QAction(transeObject.tr("临时设置默认字体")) -p3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("清空软件历史记录(&C)")) -cleanCache = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("清空软件缓存")) -cleanProgramUnuse = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("删除程序组件")) -p4 = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), transeObject.tr("退出程序(&E)")) +programmenu = menu.addMenu(QtCore.QCoreApplication.translate("U", "程序(&P)")) +p1 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), QtCore.QCoreApplication.translate("U", "安装 wine(&I)")) +installWineOnDeepin23 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23P.png"), QtCore.QCoreApplication.translate("U", "安装 wine(只限Deepin23 Preview)")) +installWineOnDeepin23Alpha = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23A.png"), QtCore.QCoreApplication.translate("U", "安装 wine(只限Deepin23 Alpha)")) +installWineHQOrg = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), QtCore.QCoreApplication.translate("U", "安装 WineHQ(官方源)")) +installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), QtCore.QCoreApplication.translate("U", "安装 WineHQ(国内清华大学镜像源)")) +installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), QtCore.QCoreApplication.translate("U", "安装更多 Wine(Wine 下载工具,推荐)")) +downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), QtCore.QCoreApplication.translate("U", "下载 Chroot 容器")) +installBox86CN = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), QtCore.QCoreApplication.translate("U", "安装 Box86/Box64 日构建(国内源)")) +installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), QtCore.QCoreApplication.translate("U", "安装 Box86/Box64 日构建(国外 Github 源)")) +installBox86Own = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), QtCore.QCoreApplication.translate("U", "安装 Box86/Box64(使用自建源,支持 riscv64)")) +installLat = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 lat(只限 Loongarch64 架构)")) +addWineDebMirrorForDeepin20 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), QtCore.QCoreApplication.translate("U", "添加 Wine 运行器源以安装较新版本的 WineHQ(支持 Deepin20/Debian10)")) +p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), QtCore.QCoreApplication.translate("U", "设置程序(&S)")) +enabledAll = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "强制启用所有被禁用的组件(不推荐)")) +setMiniFont = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "临时设置小字体")) +setTinyFont = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "临时设置很小的字体")) +setDefaultFont = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "临时设置默认字体")) +p3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), QtCore.QCoreApplication.translate("U", "清空软件历史记录(&C)")) +cleanCache = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), QtCore.QCoreApplication.translate("U", "清空软件缓存")) +cleanProgramUnuse = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), QtCore.QCoreApplication.translate("U", "删除程序组件")) +p4 = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), QtCore.QCoreApplication.translate("U", "退出程序(&E)")) programmenu.addAction(p1) programmenu.addAction(installWineOnDeepin23) programmenu.addAction(installWineOnDeepin23Alpha) @@ -2873,21 +2874,21 @@ cleanCache.triggered.connect(CleanProgramCache) cleanProgramUnuse.triggered.connect(CleanProgram) p4.triggered.connect(window.close) -wineOption = menu.addMenu(transeObject.tr("Wine(&W)")) -w1 = QtWidgets.QAction(transeObject.tr("打开 Wine 容器目录")) -w2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transeObject.tr("安装常见字体")) -w3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transeObject.tr("安装自定义字体")) -w4 = QtWidgets.QAction(transeObject.tr("删除选择的 Wine 容器")) -cleanBottonUOS = QtWidgets.QAction(transeObject.tr("清理 Wine 容器(基于 Wine 适配活动脚本)")) -wineKeyboardLnk = QtWidgets.QAction(transeObject.tr("Wine 快捷键映射")) -w5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("打包 wine 应用(专业用户使用)")) -w6 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("使用官方 Wine 适配活动的脚本进行打包")) -easyPackager = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("使用简易打包器进行打包(小白且无特殊需求建议使用这个)")) -getDllOnInternet = QtWidgets.QAction(QtGui.QIcon.fromTheme("1CD8_rundll32.0"), transeObject.tr("从互联网获取DLL")) -w7 = QtWidgets.QAction(transeObject.tr("从镜像获取DLL(只支持官方安装镜像,DOS内核如 Windows 95 暂不支持)")) -updateGeek = QtWidgets.QAction(transeObject.tr("从 Geek Uninstaller 官网升级程序")) -deletePartIcon = QtWidgets.QAction(transeObject.tr("快捷方式管理工具")) -deleteDesktopIcon = QtWidgets.QAction(transeObject.tr("删除所有 Wine 程序在启动器的快捷方式")) +wineOption = menu.addMenu(QtCore.QCoreApplication.translate("U", "Wine(&W)")) +w1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开 Wine 容器目录")) +w2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), QtCore.QCoreApplication.translate("U", "安装常见字体")) +w3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), QtCore.QCoreApplication.translate("U", "安装自定义字体")) +w4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除选择的 Wine 容器")) +cleanBottonUOS = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "清理 Wine 容器(基于 Wine 适配活动脚本)")) +wineKeyboardLnk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "Wine 快捷键映射")) +w5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), QtCore.QCoreApplication.translate("U", "打包 wine 应用(专业用户使用)")) +w6 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), QtCore.QCoreApplication.translate("U", "使用官方 Wine 适配活动的脚本进行打包")) +easyPackager = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), QtCore.QCoreApplication.translate("U", "使用简易打包器进行打包(小白且无特殊需求建议使用这个)")) +getDllOnInternet = QtWidgets.QAction(QtGui.QIcon.fromTheme("1CD8_rundll32.0"), QtCore.QCoreApplication.translate("U", "从互联网获取DLL")) +w7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "从镜像获取DLL(只支持官方安装镜像,DOS内核如 Windows 95 暂不支持)")) +updateGeek = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "从 Geek Uninstaller 官网升级程序")) +deletePartIcon = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "快捷方式管理工具")) +deleteDesktopIcon = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除所有 Wine 程序在启动器的快捷方式")) wineOption.addAction(w1) wineOption.addAction(w2) wineOption.addAction(w3) @@ -2906,15 +2907,15 @@ wineOption.addAction(w7) wineOption.addSeparator() wineOption.addAction(updateGeek) wineOption.addSeparator() -wm1 = wineOption.addMenu(transeObject.tr("在指定 Wine、容器安装组件")) -wm1_1 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 .net framework")) -wm1_2 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual Studio C++")) -wm1_8 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual FoxPro")) -wm1_3 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 MSXML")) -wm1_4 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 gecko")) -wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), transeObject.tr("在指定wine、指定容器安装 mono")) -wm1_7 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual Basic Runtime")) -wm1_6 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装其它运行库")) +wm1 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器安装组件")) +wm1_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 .net framework")) +wm1_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual Studio C++")) +wm1_8 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual FoxPro")) +wm1_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 MSXML")) +wm1_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 gecko")) +wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 mono")) +wm1_7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual Basic Runtime")) +wm1_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装其它运行库")) wm1.addAction(wm1_1) wm1.addAction(wm1_2) wm1.addAction(wm1_8) @@ -2923,13 +2924,13 @@ wm1.addAction(wm1_4) wm1.addAction(wm1_5) wm1.addAction(wm1_7) wm1.addAction(wm1_6) -wm2 = wineOption.addMenu(transeObject.tr("在指定 Wine、容器运行基础应用")) -wm2_1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("control-center2"), transeObject.tr("打开指定wine、指定容器的控制面板")) -wm2_2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("web-browser"), transeObject.tr("打开指定wine、指定容器的浏览器")) -wm2_3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("regedit"), transeObject.tr("打开指定wine、指定容器的注册表")) -wm2_4 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的任务管理器")) -wm2_5 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的资源管理器")) -wm2_6 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的关于 wine")) +wm2 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器运行基础应用")) +wm2_1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("control-center2"), QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的控制面板")) +wm2_2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("web-browser"), QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的浏览器")) +wm2_3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("regedit"), QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的注册表")) +wm2_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的任务管理器")) +wm2_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的资源管理器")) +wm2_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的关于 wine")) wm2.addAction(wm2_1) wm2.addAction(wm2_2) wm2.addAction(wm2_3) @@ -2937,12 +2938,12 @@ wm2.addAction(wm2_4) wm2.addAction(wm2_5) wm2.addAction(wm2_6) wineOption.addSeparator() -settingRunV3Sh = wineOption.addMenu(transeObject.tr("run_v3.sh 管理")) -w8 = QtWidgets.QAction(transeObject.tr("设置 run_v3.sh 的文管为 Deepin 默认文管")) -w9 = QtWidgets.QAction(transeObject.tr("设置 run_v3.sh 的文管为 Wine 默认文管")) -w10 = QtWidgets.QAction(transeObject.tr("重新安装 deepin-wine-helper")) -w11 = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transeObject.tr("使用winetricks打开指定容器")) -w11WithWineLib = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transeObject.tr("使用winetricks打开指定容器(使用Wine运行器运行库)")) +settingRunV3Sh = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "run_v3.sh 管理")) +w8 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置 run_v3.sh 的文管为 Deepin 默认文管")) +w9 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置 run_v3.sh 的文管为 Wine 默认文管")) +w10 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "重新安装 deepin-wine-helper")) +w11 = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), QtCore.QCoreApplication.translate("U", "使用winetricks打开指定容器")) +w11WithWineLib = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), QtCore.QCoreApplication.translate("U", "使用winetricks打开指定容器(使用Wine运行器运行库)")) w11WithWineLib.setDisabled(True) settingRunV3Sh.addAction(w8) settingRunV3Sh.addAction(w9) @@ -2951,62 +2952,62 @@ wineOption.addSeparator() wineOption.addAction(w11) #wineOption.addAction(w11WithWineLib) wineOption.addSeparator() -optionCheckDemo = wineOption.addMenu(transeObject.tr("组件功能测试")) -vbDemo = QtWidgets.QAction(transeObject.tr("测试 Visual Basic 6 程序")) -netDemo = QtWidgets.QAction(transeObject.tr("测试 .net framework 程序")) -netIEDemo = QtWidgets.QAction(transeObject.tr("测试 .net framework + Internet Explorer 程序")) +optionCheckDemo = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "组件功能测试")) +vbDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 Visual Basic 6 程序")) +netDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 .net framework 程序")) +netIEDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 .net framework + Internet Explorer 程序")) optionCheckDemo.addAction(vbDemo) optionCheckDemo.addAction(netDemo) optionCheckDemo.addAction(netIEDemo) wineOption.addSeparator() -wm3 = wineOption.addMenu(transeObject.tr("启用/禁用功能")) -ed1 = wm3.addMenu(transeObject.tr("启用/禁用 opengl")) -wm3_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("开启 opengl")) -wm3_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用 opengl")) +wm3 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用功能")) +ed1 = wm3.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用 opengl")) +wm3_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "开启 opengl")) +wm3_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "禁用 opengl")) ed1.addAction(wm3_1) ed1.addAction(wm3_2) -ed2 = wm3.addMenu(transeObject.tr("安装/卸载 winbind")) -wm4_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 winbind")) -wm4_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 winbind")) +ed2 = wm3.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 winbind")) +wm4_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "安装 winbind")) +wm4_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "卸载 winbind")) ed2.addAction(wm4_1) ed2.addAction(wm4_2) -dxvkMenu = wm3.addMenu(transeObject.tr("安装/卸载 DXVK")) -installDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 DXVK")) -uninstallDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 DXVK")) +dxvkMenu = wm3.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 DXVK")) +installDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "安装 DXVK")) +uninstallDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "卸载 DXVK")) dxvkMenu.addAction(installDxvk) dxvkMenu.addAction(uninstallDxvk) -vkd3dMenu = wm3.addMenu(transeObject.tr("安装/卸载 Vkd3d")) -installvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 Vkd3d")) -uninstallvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 Vkd3d")) +vkd3dMenu = wm3.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 Vkd3d")) +installvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "安装 Vkd3d")) +uninstallvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "卸载 Vkd3d")) vkd3dMenu.addAction(installvkd3d) vkd3dMenu.addAction(uninstallvkd3d) wineOption.addSeparator() wineOption.addAction(deleteDesktopIcon) wineOption.addSeparator() -settingWineBottleCreateLink = wm3.addMenu(transeObject.tr("启用/禁止指定 wine 容器生成快捷方式")) -enabledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("允许指定 wine 容器生成快捷方式")) -disbledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁止指定 wine 容器生成快捷方式")) +settingWineBottleCreateLink = wm3.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁止指定 wine 容器生成快捷方式")) +enabledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "允许指定 wine 容器生成快捷方式")) +disbledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式")) settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) -settingWineCrashDialog = wm3.addMenu(transeObject.tr("启用/禁用指定 wine 容器崩溃提示窗口")) -disbledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用指定 wine 容器崩溃提示窗口")) -enabledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("启用指定 wine 容器崩溃提示窗口")) +settingWineCrashDialog = wm3.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用指定 wine 容器崩溃提示窗口")) +disbledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器崩溃提示窗口")) +enabledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "启用指定 wine 容器崩溃提示窗口")) settingWineCrashDialog.addAction(enabledWineCrashDialog) settingWineCrashDialog.addAction(disbledWineCrashDialog) -settingOpenProgram = wm3.addMenu(transeObject.tr("启用/禁止指定 wine 容器创建文件关联")) -enabledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("允许指定 wine 容器创建文件关联")) -disbledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁止指定 wine 容器创建文件关联")) +settingOpenProgram = wm3.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁止指定 wine 容器创建文件关联")) +enabledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), QtCore.QCoreApplication.translate("U", "允许指定 wine 容器创建文件关联")) +disbledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器创建文件关联")) settingOpenProgram.addAction(enabledOpenProgram) settingOpenProgram.addAction(disbledOpenProgram) -settingHttpProxy = wineOption.addMenu(transeObject.tr("设置指定 Wine 容器代理")) -enabledHttpProxy = QtWidgets.QAction(transeObject.tr("设置指定 wine 容器的代理")) -disbledHttpProxy = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用指定 wine 容器的代理")) +settingHttpProxy = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "设置指定 Wine 容器代理")) +enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置指定 wine 容器的代理")) +disbledHttpProxy = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理")) settingHttpProxy.addAction(enabledHttpProxy) settingHttpProxy.addAction(disbledHttpProxy) -dllOver = wineOption.addMenu(transeObject.tr("函数顶替库列表")) -saveDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(43), transeObject.tr("导出函数顶替列表")) -addDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("导入函数顶替列表")) -editDllOver = QtWidgets.QAction(transeObject.tr("编辑函数顶替库列表")) +dllOver = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "函数顶替库列表")) +saveDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(43), QtCore.QCoreApplication.translate("U", "导出函数顶替列表")) +addDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "导入函数顶替列表")) +editDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "编辑函数顶替库列表")) dllOver.addAction(saveDllOver) dllOver.addAction(addDllOver) dllOver.addAction(editDllOver) @@ -3066,17 +3067,17 @@ vbDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/vb.exe")) netDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/net.exe")) netIEDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/netandie.exe")) -virtualMachine = menu.addMenu(transeObject.tr("虚拟机(&V)")) -v1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("virtualbox"), transeObject.tr("使用虚拟机运行 Windows 应用")) +virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) +v1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("virtualbox"), QtCore.QCoreApplication.translate("U", "使用虚拟机运行 Windows 应用")) virtualMachine.addAction(v1) v1.triggered.connect(RunVM) -checkValue = menu.addMenu(transeObject.tr("校验值计算(&S)")) -md5Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("MD5(&M)")) -sha1Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA1(&M)")) -base64Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("Base64(建议小文件)(&B)")) -sha256Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA256(&S)")) -sha512Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA512(&S)")) +checkValue = menu.addMenu(QtCore.QCoreApplication.translate("U", "校验值计算(&S)")) +md5Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "MD5(&M)")) +sha1Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "SHA1(&M)")) +base64Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "Base64(建议小文件)(&B)")) +sha256Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "SHA256(&S)")) +sha512Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "SHA512(&S)")) md5Value.triggered.connect(lambda: ValueCheck().Get("MD5")) sha1Value.triggered.connect(lambda: ValueCheck().Get("SHA1")) base64Value.triggered.connect(lambda: ValueCheck().Get("BASE64")) @@ -3089,11 +3090,11 @@ checkValue.addAction(sha256Value) checkValue.addAction(sha512Value) -safeWebsize = menu.addMenu(transeObject.tr("云沙箱(&C)")) -s1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("360 沙箱云")) -s2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("微步云沙箱")) -s3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("VIRUSTOTAL")) -s4 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("计算机病毒防御技术国家工程实验室")) +safeWebsize = menu.addMenu(QtCore.QCoreApplication.translate("U", "云沙箱(&C)")) +s1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "360 沙箱云")) +s2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "微步云沙箱")) +s3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "VIRUSTOTAL")) +s4 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "计算机病毒防御技术国家工程实验室")) safeWebsize.addAction(s1) safeWebsize.addAction(s2) safeWebsize.addAction(s3) @@ -3103,12 +3104,12 @@ s2.triggered.connect(lambda: webbrowser.open_new_tab("https://s.threatbook.cn/") s3.triggered.connect(lambda: webbrowser.open_new_tab("https://www.virustotal.com/")) s4.triggered.connect(lambda: webbrowser.open_new_tab("https://cloud.vdnel.cn/")) -log = menu.addMenu(transeObject.tr("日志(&L)")) -getDllInfo = QtWidgets.QAction(transeObject.tr("查询 Dll")) -checkLogText = QtWidgets.QAction(transeObject.tr("日志分析")) -saveLogText = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(16), transeObject.tr("另存为日志")) -transLogText = QtWidgets.QAction(transeObject.tr("翻译日志(翻译后日志分析功能会故障)")) -uploadLogText = QtWidgets.QAction(transeObject.tr("上传日志")) +log = menu.addMenu(QtCore.QCoreApplication.translate("U", "日志(&L)")) +getDllInfo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "查询 Dll")) +checkLogText = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "日志分析")) +saveLogText = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(16), QtCore.QCoreApplication.translate("U", "另存为日志")) +transLogText = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "翻译日志(翻译后日志分析功能会故障)")) +uploadLogText = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "上传日志")) getDllInfo.triggered.connect(DllWindow.ShowWindow) checkLogText.triggered.connect(LogChecking.ShowWindow) saveLogText.triggered.connect(SaveLog) @@ -3129,8 +3130,8 @@ def AddLib(install: QtWidgets.QAction, uninstall, menu, info): menu.addAction(install) menu.addAction(uninstall) -installLib = menu.addMenu(transeObject.tr("应用运行库(&R)")) -howtouseQemuUser = QtWidgets.QAction(transeObject.tr("Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine)")) +installLib = menu.addMenu(QtCore.QCoreApplication.translate("U", "应用运行库(&R)")) +howtouseQemuUser = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine)")) howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/read/cv23185651")) runnerlibinfo = QtWidgets.QAction("只在运行器使用的运行库(不与其他运行库以及兼容层冲突)") installRunnerLib = QtWidgets.QAction("安装运行库") @@ -3191,9 +3192,9 @@ if os.path.exists(f"{programPath}/InstallRuntime"): systemalllibinfo = QtWidgets.QAction("全局运行库(与其他运行库以及部分兼容层冲突)") systemalllibinfo.setDisabled(True) installLib.addAction(systemalllibinfo) - installQemuMenu = installLib.addMenu(transeObject.tr("安装 Qemu User")) - installQemu = QtWidgets.QAction(transeObject.tr("安装 Qemu User")) - removeQemu = QtWidgets.QAction(transeObject.tr("卸载 Qemu User")) + installQemuMenu = installLib.addMenu(QtCore.QCoreApplication.translate("U", "安装 Qemu User")) + installQemu = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 Qemu User")) + removeQemu = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 Qemu User")) installQemuMenu.addAction(installQemu) installQemuMenu.addAction(removeQemu) installQemu.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallQemuUser.sh'")) @@ -3204,43 +3205,43 @@ if os.path.exists(f"{programPath}/InstallRuntime"): if i[-3:] == ".sh": print(f"检测到库 {os.path.splitext(i)[0]}") - AddLib(QtWidgets.QAction(transeObject.tr(f"安装 {os.path.splitext(i)[0]} 运行库")), QtWidgets.QAction(transeObject.tr(f"卸载 {os.path.splitext(i)[0]} 运行库")), installLib.addMenu(transeObject.tr(f"运行库 {os.path.splitext(i)[0]}")), i) + AddLib(QtWidgets.QAction(QtCore.QCoreApplication.translate("U", f"安装 {os.path.splitext(i)[0]} 运行库")), QtWidgets.QAction(QtCore.QCoreApplication.translate("U", f"卸载 {os.path.splitext(i)[0]} 运行库")), installLib.addMenu(QtCore.QCoreApplication.translate("U", f"运行库 {os.path.splitext(i)[0]}")), i) -qemuMenu = menu.addMenu(transeObject.tr("容器(&C)")) -unpackDeb = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("解包 deb 提取容器")) +qemuMenu = menu.addMenu(QtCore.QCoreApplication.translate("U", "容器(&C)")) +unpackDeb = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), QtCore.QCoreApplication.translate("U", "解包 deb 提取容器")) qemuMenu.addAction(unpackDeb) unpackDeb.triggered.connect(UnPackage) if len(qemuBottleList) >= 1: - configMenu = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transeObject.tr("配置指定 Chroot 容器")) + configMenu = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), QtCore.QCoreApplication.translate("U", "配置指定 Chroot 容器")) qemuMenu.addAction(configMenu) configMenu.triggered.connect(ConfigQemu) print(qemuBottleList) -videoHelp = menu.addMenu(transeObject.tr("视频教程(&V)")) -videoHelpAction = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("视频教程")) +videoHelp = menu.addMenu(QtCore.QCoreApplication.translate("U", "视频教程(&V)")) +videoHelpAction = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "视频教程")) videoHelpAction.triggered.connect(lambda: webbrowser.open_new_tab("https://space.bilibili.com/695814694/channel/collectiondetail?sid=1610353")) videoHelp.addAction(videoHelpAction) -help = menu.addMenu(transeObject.tr("帮助(&H)")) -runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("查询程序在 Wine 的运行情况")) -h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("程序官网")) -h2 = QtWidgets.QAction(transeObject.tr("小提示")) -wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙")) -h3 = QtWidgets.QAction(transeObject.tr("更新内容")) -h4 = QtWidgets.QAction(transeObject.tr("鸣谢名单")) -h5 = QtWidgets.QAction(transeObject.tr("更新这个程序")) -programInformation = QtWidgets.QAction(transeObject.tr("获取程序公告(也可以在这里看程序安装/打开量)")) -h6 = QtWidgets.QAction(transeObject.tr("反馈这个程序的建议和问题")) -fenUpload = QtWidgets.QAction(transeObject.tr("程序评分")) -h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("关于这个程序")) -h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("关于 Qt")) -gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("作者个人站")) -gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Gitee")) -github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Github")) -gitlab = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Gitlab")) -jihu = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("极狐")) +help = menu.addMenu(QtCore.QCoreApplication.translate("U", "帮助(&H)")) +runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "查询程序在 Wine 的运行情况")) +h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "程序官网")) +h2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "小提示")) +wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙")) +h3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "更新内容")) +h4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "鸣谢名单")) +h5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "更新这个程序")) +programInformation = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "获取程序公告(也可以在这里看程序安装/打开量)")) +h6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "反馈这个程序的建议和问题")) +fenUpload = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "程序评分")) +h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "关于这个程序")) +h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), QtCore.QCoreApplication.translate("U", "关于 Qt")) +gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "作者个人站")) +gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "Gitee")) +github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "Github")) +gitlab = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "Gitlab")) +jihu = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "极狐")) h1.addAction(gfdgdxiio) h1.addAction(gitee) h1.addAction(github) @@ -3255,9 +3256,9 @@ help.addAction(h3) help.addAction(h4) help.addSeparator() -wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("程序 Wiki")) +wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "程序 Wiki")) help.addAction(wikiHelp) -videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("视频教程")) +videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), QtCore.QCoreApplication.translate("U", "视频教程")) videoHelp.addAction(videoHelpAction) help.addSeparator() help.addAction(h5) @@ -3267,8 +3268,8 @@ help.addAction(programInformation) help.addAction(h7) help.addAction(h8) help.addSeparator() -hm1 = help.addMenu(transeObject.tr("更多生态适配应用")) -hm1_1 = QtWidgets.QAction(transeObject.tr("运行 Android 应用:UEngine 运行器")) +hm1 = help.addMenu(QtCore.QCoreApplication.translate("U", "更多生态适配应用")) +hm1_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "运行 Android 应用:UEngine 运行器")) hm1.addAction(hm1_1) gfdgdxiio.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io")) gitee.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner"))