Update Chinese usage

This commit is contained in:
Aoran Zeng 2025-07-22 10:40:20 +08:00
parent c058c91a83
commit 63f678d1a6
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -31,7 +31,7 @@
* | Rui Yang <techoc@foxmail.com>
* |
* Created On : <2023-08-28>
* Last Modified : <2025-07-21>
* Last Modified : <2025-07-22>
*
* chsrc: Change Source
* ------------------------------------------------------------*/
@ -141,39 +141,48 @@
static const char *
Chsrc_Usage[] = {
"使用: chsrc <command> [options] [target] [mirror]",
"help 打印此帮助,或 h, -h, --help",
"issue 查看相关issue\n",
USAGE_CHINESE =
R"(名称:
chsrc - Change Source - (GPLv3+) - Developed by RubyMetric
"list (或 ls, 或 l) 列出可用镜像源,和可换源目标",
"list mirror/target 列出可用镜像源,或可换源目标",
"list os/lang/ware 列出可换源的操作系统/编程语言/软件\n",
:
@ver@
"measure <target> 对该目标所有源测速",
"cesu <target> \n",
使:
chsrc <command> [options] [target] [mirror]
"list <target> 查看该目标可用源与支持功能",
"get <target> 查看该目标当前源的使用情况\n",
:
help, h -h, --help
issue issue
"set <target> 换源,自动测速后挑选最快源",
"set <target> first 换源,使用维护团队测速第一的源",
"set <target> <mirror> 换源,指定使用某镜像站 (通过list <target>查看)",
"set <target> https://url 换源用户自定义源URL",
"reset <target> 重置,使用上游默认使用的源\n",
list, ls, l
list mirror|target : /
list os|lang|ware : //
list <target>
"选项:",
"-dry Dry Run模拟换源过程命令仅打印并不运行",
"-local 仅对本项目而非全局换源 (通过ls <target>查看支持情况)",
"-ipv6 使用IPv6测速",
"-en(glish) 使用英文输出",
"-no-color 无颜色输出\n",
measure, m, cesu <target>
"镜像站状态: <https://github.com/RubyMetric/chsrc/wiki>",
"维护: <" Chsrc_Maintain_URL ">\n",
get, g <target> 使
set, s <target>
set <target> first 使
set <target> <mirror> 使 (list <target>)
set <target> <URL> URL
reset <target> 使使
:
-dry Dry Run
-local (ls <target>)
-ipv6 使IPv6测速
-en(glish) 使
-no-color
:
Chef, recipe
: <@url@>
: <https://github.com/RubyMetric/chsrc/issues/130>
)";
"邀请您担任 Chef 或 Taster, 为用户把关您熟悉的秘制菜肴 (recipe): <https://github.com/RubyMetric/chsrc/issues/130>"
};
static const char *
Chsrc_Usage_English[] = {
@ -422,9 +431,7 @@ cli_print_version ()
void
cli_print_help ()
{
say (xy_strjoin (3, "chsrc: Change Source (GPLv3+) ",
purple("v" Chsrc_Version "-" Chsrc_Release_Date), " by RubyMetric"));
br();
char *version_string = purple("v" Chsrc_Version "-" Chsrc_Release_Date);
if (ENGLISH)
{
@ -433,8 +440,9 @@ cli_print_help ()
}
else
{
for (int i=0; i<xy_arylen (Chsrc_Usage); i++)
say (Chsrc_Usage[i]);
char *str = xy_str_gsub (USAGE_CHINESE, "@ver@", version_string);
str = xy_str_gsub (str, "@url@", Chsrc_Maintain_URL);
println (str);
}
}