asxez / DDCS

Docker汉化脚本 DockerDesktop汉化脚本 Docker汉化 Docker Windows Docker MAC
GNU General Public License v3.0
38 stars 6 forks source link

是不是漏了几个文件没成功打包? #2

Closed dengcb closed 3 weeks ago

dengcb commented 1 month ago

我修改汉化字典,多次运行脚本,发现总有几个字符串反复替换,是不是说明这几个文件没有成功打包替换?

2024-08-17 12:49:17 : 解包成功
2024-08-17 12:49:17 : 汉化开始
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:label:"Add the *.docker.internal names to the host's /etc/hosts file (Requires password)" -> label:"将 *.docker.internal 名称添加到主机的 /etc/hosts 文件(需要密码)"
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:Lets you resolve *.docker.internal DNS names from both the host and your containers. -> 允许您主机和容器中解析 *.docker.internal DNS 名称。
2024-08-17 12:49:22 : 文件./app/build/desktop-ui-build/8321.bundle.js:children:"Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets)." -> children:"发送错误报告、系统版本和语言以及 Docker Desktop 生命周期信息(例如,启动、停止、重置)。"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:helperText:"Example: registry-1.docker.com,*.docker.com,10.0.0.0/8" -> helperText:"示例:registry-1.docker.com,*.docker.com,10.0.0.0/8"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Web Server (HTTP)" -> label:"Web 服务器 (HTTP)"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Secure Web Server (HTTPS)" -> label:"安全的 Web 服务器 (HTTPS)"
2024-08-17 12:49:24 : 文件./app/build/desktop-ui-build/400.bundle.js:label:"Show system containers (advanced)" -> label:"显示系统容器(高级)"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"What is a container?" -> title:"什么是容器?"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"How do I run a container?" -> title:"如何运行容器?"
2024-08-17 12:49:28 : 开始打包...
2024-08-17 12:49:29 : 打包成功
2024-08-17 12:49:29 : 正在替换文件...
2024-08-17 12:49:29 : 汉化完成
2024-08-17 12:49:29 : 共耗时:13.88485587s
asxez commented 1 month ago

我修改汉化字典,多次运行脚本,发现总有几个字符串反复替换,是不是说明这几个文件没有成功打包替换?

2024-08-17 12:49:17 : 解包成功
2024-08-17 12:49:17 : 汉化开始
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:label:"Add the *.docker.internal names to the host's /etc/hosts file (Requires password)" -> label:"将 *.docker.internal 名称添加到主机的 /etc/hosts 文件(需要密码)"
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:Lets you resolve *.docker.internal DNS names from both the host and your containers. -> 允许您主机和容器中解析 *.docker.internal DNS 名称。
2024-08-17 12:49:22 : 文件./app/build/desktop-ui-build/8321.bundle.js:children:"Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets)." -> children:"发送错误报告、系统版本和语言以及 Docker Desktop 生命周期信息(例如,启动、停止、重置)。"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:helperText:"Example: registry-1.docker.com,*.docker.com,10.0.0.0/8" -> helperText:"示例:registry-1.docker.com,*.docker.com,10.0.0.0/8"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Web Server (HTTP)" -> label:"Web 服务器 (HTTP)"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Secure Web Server (HTTPS)" -> label:"安全的 Web 服务器 (HTTPS)"
2024-08-17 12:49:24 : 文件./app/build/desktop-ui-build/400.bundle.js:label:"Show system containers (advanced)" -> label:"显示系统容器(高级)"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"What is a container?" -> title:"什么是容器?"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"How do I run a container?" -> title:"如何运行容器?"
2024-08-17 12:49:28 : 开始打包...
2024-08-17 12:49:29 : 打包成功
2024-08-17 12:49:29 : 正在替换文件...
2024-08-17 12:49:29 : 汉化完成
2024-08-17 12:49:29 : 共耗时:13.88485587s

对的,是替换函数(process_file)的实现存在一些问题。

dengcb commented 1 month ago

我修改汉化字典,多次运行脚本,发现总有几个字符串反复替换,是不是说明这几个文件没有成功打包替换?

2024-08-17 12:49:17 : 解包成功
2024-08-17 12:49:17 : 汉化开始
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:label:"Add the *.docker.internal names to the host's /etc/hosts file (Requires password)" -> label:"将 *.docker.internal 名称添加到主机的 /etc/hosts 文件(需要密码)"
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:Lets you resolve *.docker.internal DNS names from both the host and your containers. -> 允许您主机和容器中解析 *.docker.internal DNS 名称。
2024-08-17 12:49:22 : 文件./app/build/desktop-ui-build/8321.bundle.js:children:"Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets)." -> children:"发送错误报告、系统版本和语言以及 Docker Desktop 生命周期信息(例如,启动、停止、重置)。"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:helperText:"Example: registry-1.docker.com,*.docker.com,10.0.0.0/8" -> helperText:"示例:registry-1.docker.com,*.docker.com,10.0.0.0/8"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Web Server (HTTP)" -> label:"Web 服务器 (HTTP)"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Secure Web Server (HTTPS)" -> label:"安全的 Web 服务器 (HTTPS)"
2024-08-17 12:49:24 : 文件./app/build/desktop-ui-build/400.bundle.js:label:"Show system containers (advanced)" -> label:"显示系统容器(高级)"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"What is a container?" -> title:"什么是容器?"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"How do I run a container?" -> title:"如何运行容器?"
2024-08-17 12:49:28 : 开始打包...
2024-08-17 12:49:29 : 打包成功
2024-08-17 12:49:29 : 正在替换文件...
2024-08-17 12:49:29 : 汉化完成
2024-08-17 12:49:29 : 共耗时:13.88485587s

对的,是替换函数(process_file)的实现存在一些问题。

貌似,替换函数对于括号的转义没做好,其实没替换成功

asxez commented 1 month ago

我修改汉化字典,多次运行脚本,发现总有几个字符串反复替换,是不是说明这几个文件没有成功打包替换?

2024-08-17 12:49:17 : 解包成功
2024-08-17 12:49:17 : 汉化开始
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:label:"Add the *.docker.internal names to the host's /etc/hosts file (Requires password)" -> label:"将 *.docker.internal 名称添加到主机的 /etc/hosts 文件(需要密码)"
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:Lets you resolve *.docker.internal DNS names from both the host and your containers. -> 允许您主机和容器中解析 *.docker.internal DNS 名称。
2024-08-17 12:49:22 : 文件./app/build/desktop-ui-build/8321.bundle.js:children:"Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets)." -> children:"发送错误报告、系统版本和语言以及 Docker Desktop 生命周期信息(例如,启动、停止、重置)。"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:helperText:"Example: registry-1.docker.com,*.docker.com,10.0.0.0/8" -> helperText:"示例:registry-1.docker.com,*.docker.com,10.0.0.0/8"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Web Server (HTTP)" -> label:"Web 服务器 (HTTP)"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Secure Web Server (HTTPS)" -> label:"安全的 Web 服务器 (HTTPS)"
2024-08-17 12:49:24 : 文件./app/build/desktop-ui-build/400.bundle.js:label:"Show system containers (advanced)" -> label:"显示系统容器(高级)"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"What is a container?" -> title:"什么是容器?"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"How do I run a container?" -> title:"如何运行容器?"
2024-08-17 12:49:28 : 开始打包...
2024-08-17 12:49:29 : 打包成功
2024-08-17 12:49:29 : 正在替换文件...
2024-08-17 12:49:29 : 汉化完成
2024-08-17 12:49:29 : 共耗时:13.88485587s

对的,是替换函数(process_file)的实现存在一些问题。

貌似,替换函数对于括号的转义没做好,其实没替换成功

应该不是转义的问题,例如 title:"What is a container?" -> title:"什么是容器?" 就没有需要转义的字符。

dengcb commented 1 month ago

我修改汉化字典,多次运行脚本,发现总有几个字符串反复替换,是不是说明这几个文件没有成功打包替换?

2024-08-17 12:49:17 : 解包成功
2024-08-17 12:49:17 : 汉化开始
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:label:"Add the *.docker.internal names to the host's /etc/hosts file (Requires password)" -> label:"将 *.docker.internal 名称添加到主机的 /etc/hosts 文件(需要密码)"
2024-08-17 12:49:21 : 文件./app/build/desktop-ui-build/8321.bundle.js:Lets you resolve *.docker.internal DNS names from both the host and your containers. -> 允许您主机和容器中解析 *.docker.internal DNS 名称。
2024-08-17 12:49:22 : 文件./app/build/desktop-ui-build/8321.bundle.js:children:"Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets)." -> children:"发送错误报告、系统版本和语言以及 Docker Desktop 生命周期信息(例如,启动、停止、重置)。"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:helperText:"Example: registry-1.docker.com,*.docker.com,10.0.0.0/8" -> helperText:"示例:registry-1.docker.com,*.docker.com,10.0.0.0/8"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Web Server (HTTP)" -> label:"Web 服务器 (HTTP)"
2024-08-17 12:49:23 : 文件./app/build/desktop-ui-build/9511.bundle.js:label:"Secure Web Server (HTTPS)" -> label:"安全的 Web 服务器 (HTTPS)"
2024-08-17 12:49:24 : 文件./app/build/desktop-ui-build/400.bundle.js:label:"Show system containers (advanced)" -> label:"显示系统容器(高级)"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"What is a container?" -> title:"什么是容器?"
2024-08-17 12:49:25 : 文件./app/build/desktop-ui-build/main.js:title:"How do I run a container?" -> title:"如何运行容器?"
2024-08-17 12:49:28 : 开始打包...
2024-08-17 12:49:29 : 打包成功
2024-08-17 12:49:29 : 正在替换文件...
2024-08-17 12:49:29 : 汉化完成
2024-08-17 12:49:29 : 共耗时:13.88485587s

对的,是替换函数(process_file)的实现存在一些问题。

貌似,替换函数对于括号的转义没做好,其实没替换成功

应该不是转义的问题,例如 title:"What is a container?" -> title:"什么是容器?" 就没有需要转义的字符。

带括号和问号的,就不行。我这翻译增加到一千多行了,提交一下试试