Skip to content

Commit 246a663

Browse files
author
PeterFujiyu
committed
fix can't fill info to "{}"
1 parent 3002a38 commit 246a663

2 files changed

Lines changed: 40 additions & 40 deletions

File tree

src/i18n/en_us.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,45 @@
2626
"prompt": "Please enter your choice (1-2): "
2727
},
2828
"script_execution": {
29-
"failed_read_info": "Failed to read info.json: {}",
30-
"invalid_json": "Invalid JSON in info.json: {}",
29+
"failed_read_info": "Failed to read info.json: {0}",
30+
"invalid_json": "Invalid JSON in info.json: {0}",
3131
"no_scripts": "No available scripts.",
3232
"available_scripts": "Available scripts:",
33-
"run_prompt": "Enter the number of the script to run (1-{}), or type 'exit' to return: ",
33+
"run_prompt": "Enter the number of the script to run (1-{0}), or type 'exit' to return: ",
3434
"returning": "Returning to main menu.",
35-
"running_script": "Running script `{}`...",
36-
"invalid_choice": "Invalid choice, please enter a number between 1 and {}."
35+
"running_script": "Running script `{0}`...",
36+
"invalid_choice": "Invalid choice, please enter a number between 1 and {0}."
3737
},
3838
"url_script": {
3939
"enter_url": "Enter the URL of the script (or type 'exit' to return): ",
40-
"script_content": "Script content from {}: \n{}",
40+
"script_content": "Script content from {0}: \n{1}",
4141
"executing": "Executing script...",
42-
"failed_create_temp": "Failed to create temporary file: {}",
43-
"failed_write": "Failed to write script to file: {}",
44-
"failed_executable": "Failed to make script executable: {}",
42+
"failed_create_temp": "Failed to create temporary file: {0}",
43+
"failed_write": "Failed to write script to file: {0}",
44+
"failed_executable": "Failed to make script executable: {0}",
4545
"success": "Script executed successfully!",
46-
"failed_status": "Script execution failed with status: {}",
47-
"failed_execute": "Failed to execute script: {}",
48-
"failed_remove_temp": "Warning: Failed to remove temporary file: {}",
49-
"failed_read_content": "Failed to read script content: {}",
50-
"failed_fetch": "Failed to fetch script from URL: {}"
46+
"failed_status": "Script execution failed with status: {0}",
47+
"failed_execute": "Failed to execute script: {0}",
48+
"failed_remove_temp": "Warning: Failed to remove temporary file: {0}",
49+
"failed_read_content": "Failed to read script content: {0}",
50+
"failed_fetch": "Failed to fetch script from URL: {0}"
5151
},
5252
"link_script": {
53-
"failed_read": "Failed to read .link file: {}",
54-
"downloading": "Downloading script from URL: {}"
53+
"failed_read": "Failed to read .link file: {0}",
54+
"downloading": "Downloading script from URL: {0}"
5555
},
5656
"update_menu": {
5757
"title": "=== Version Switch ===",
5858
"latest": "Latest release",
5959
"latest_dev": "Latest dev build",
6060
"other": "Other versions(and dev version)",
6161
"prompt": "Please enter your choice (1-3): ",
62-
"select_prompt": "Select a version (1-{}), or type 'exit' to return: ",
63-
"downloading": "Downloading version {}...",
62+
"select_prompt": "Select a version (1-{0}), or type 'exit' to return: ",
63+
"downloading": "Downloading version {0}...",
6464
"not_found": "No binary available for this platform.",
6565
"no_release": "No release found.",
66-
"download_failed": "Failed to download file: {}",
67-
"replace_failed": "Failed to replace executable: {}",
66+
"download_failed": "Failed to download file: {0}",
67+
"replace_failed": "Failed to replace executable: {0}",
6868
"success": "Update complete. Please restart the program."
6969
},
7070
"main": {

src/i18n/zh_cn.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,45 @@
2626
"prompt": "请输入您的选择 (1-2): "
2727
},
2828
"script_execution": {
29-
"failed_read_info": "读取 info.json 失败:{}",
30-
"invalid_json": "info.json 格式错误:{}",
29+
"failed_read_info": "读取 info.json 失败:{0}",
30+
"invalid_json": "info.json 格式错误:{0}",
3131
"no_scripts": "没有可用脚本。",
3232
"available_scripts": "可用脚本:",
33-
"run_prompt": "输入要运行的脚本编号 (1-{}),或输入 'exit' 返回:",
33+
"run_prompt": "输入要运行的脚本编号 (1-{0}),或输入 'exit' 返回:",
3434
"returning": "返回主菜单。",
35-
"running_script": "正在运行脚本 `{}`…",
36-
"invalid_choice": "无效的选择,请输入 1 到 {} 之间的数字。"
35+
"running_script": "正在运行脚本 `{0}`…",
36+
"invalid_choice": "无效的选择,请输入 1 到 {0} 之间的数字。"
3737
},
3838
"url_script": {
3939
"enter_url": "输入脚本的URL(或输入 'exit' 返回):",
40-
"script_content": "来自 {} 的脚本内容:\n{}",
40+
"script_content": "来自 {0} 的脚本内容:\n{1}",
4141
"executing": "正在执行脚本...",
42-
"failed_create_temp": "创建临时文件失败:{}",
43-
"failed_write": "写入脚本到文件失败:{}",
44-
"failed_executable": "设置脚本可执行权限失败:{}",
42+
"failed_create_temp": "创建临时文件失败:{0}",
43+
"failed_write": "写入脚本到文件失败:{0}",
44+
"failed_executable": "设置脚本可执行权限失败:{0}",
4545
"success": "脚本执行成功!",
46-
"failed_status": "脚本执行失败,状态码:{}",
47-
"failed_execute": "执行脚本失败:{}",
48-
"failed_remove_temp": "警告:删除临时文件失败:{}",
49-
"failed_read_content": "读取脚本内容失败:{}",
50-
"failed_fetch": "从URL获取脚本失败:{}"
46+
"failed_status": "脚本执行失败,状态码:{0}",
47+
"failed_execute": "执行脚本失败:{0}",
48+
"failed_remove_temp": "警告:删除临时文件失败:{0}",
49+
"failed_read_content": "读取脚本内容失败:{0}",
50+
"failed_fetch": "从URL获取脚本失败:{0}"
5151
},
5252
"link_script": {
53-
"failed_read": "读取 .link 文件失败:{}",
54-
"downloading": "正在从URL下载脚本:{}"
53+
"failed_read": "读取 .link 文件失败:{0}",
54+
"downloading": "正在从URL下载脚本:{0}"
5555
},
5656
"update_menu": {
5757
"title": "=== 版本更换 ===",
5858
"latest": "最新正式版",
5959
"latest_dev": "最新开发版",
6060
"other": "其他版本(包含开发版)",
6161
"prompt": "请输入您的选择 (1-3): ",
62-
"select_prompt": "请选择一个版本 (1-{}), 或输入 'exit' 返回:",
63-
"downloading": "正在下载版本 {}...",
62+
"select_prompt": "请选择一个版本 (1-{0}), 或输入 'exit' 返回:",
63+
"downloading": "正在下载版本 {0}...",
6464
"not_found": "未找到适合此平台的构建。",
6565
"no_release": "没有可用的正式版本。",
66-
"download_failed": "下载文件失败:{}",
67-
"replace_failed": "替换可执行文件失败:{}",
66+
"download_failed": "下载文件失败:{0}",
67+
"replace_failed": "替换可执行文件失败:{0}",
6868
"success": "更新完成,请重新启动程序。"
6969
},
7070
"main": {

0 commit comments

Comments
 (0)