mirror of
https://github.com/RubyMetric/chsrc
synced 2025-09-10 02:32:47 +08:00
Update English usage
This commit is contained in:
parent
63f678d1a6
commit
4feb51f12f
@ -185,39 +185,48 @@ R"(名称:
|
|||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
Chsrc_Usage_English[] = {
|
USAGE_ENGLISH =
|
||||||
"Usage: chsrc <command> [options] [target] [mirror]",
|
R"(NAME:
|
||||||
"help Print this help, or h, -h, --help",
|
chsrc - Change Source - (GPLv3+) - Developed by RubyMetric
|
||||||
"issue See related issues\n",
|
|
||||||
|
|
||||||
"list (or ls, or l) List available mirror sites and supported targets",
|
VERSION:
|
||||||
"list mirror/target List available mirror sites or supported targets",
|
@ver@
|
||||||
"list os/lang/ware List supported OS/Programming Language/Software\n",
|
|
||||||
|
|
||||||
"measure <target> Measure velocity of all sources of <target>",
|
USAGE:
|
||||||
"cesu <target> \n",
|
chsrc <command> [options] [target] [mirror]
|
||||||
|
|
||||||
"list <target> View available sources and supporting features for <target>",
|
COMMANDS:
|
||||||
"get <target> View the current source state for <target>\n",
|
help, h Print this help, or -h, --help
|
||||||
|
issue See related issues
|
||||||
|
|
||||||
"set <target> Change source, select the fastest source by automatic speed measurement",
|
list, ls, l List available mirror sites and supported targets
|
||||||
"set <target> first Change source, select the fastest source measured by the maintainers team",
|
list mirror|target List supported: mirror sites/supported targets
|
||||||
"set <target> <mirror> Change source, specify a mirror site (Via `list <target>`)",
|
list os|lang|ware List supported: OSes/Programming Languages/Softwares
|
||||||
"set <target> https://url Change source, using user-defined source URL",
|
list <target> View available sources and supporting features for <target>
|
||||||
"reset <target> Reset source to the upstream's default\n",
|
|
||||||
|
|
||||||
"Options:",
|
measure, m, cesu <target> Measure velocity of all sources of <target>
|
||||||
"-dry Dry Run. Simulate the source changing process, command only prints, not run",
|
|
||||||
"-local Change source only for this project rather than globally (Via `ls <target>`)",
|
|
||||||
"-ipv6 Speed measurement using IPv6",
|
|
||||||
"-en(glish) Output in English",
|
|
||||||
"-no-color Output without color\n",
|
|
||||||
|
|
||||||
"Mirror status: <https://github.com/RubyMetric/chsrc/wiki>",
|
get, g <target> View the current source state for <target>
|
||||||
"Maintain: <" Chsrc_Maintain_URL ">\n",
|
|
||||||
|
|
||||||
"We sincerely invite you to become a Chef or Taster to ensure the quality of recipes you are familiar with for users: <https://github.com/RubyMetric/chsrc/issues/130>"
|
set, s <target> Change source, select the fastest source by automatic speed measurement
|
||||||
};
|
set <target> first Change source, select the fastest source measured by the maintainers team
|
||||||
|
set <target> <mirror> Change source, specify a mirror site (Via `list <target>`)
|
||||||
|
set <target> <URL> Change source, using user-defined source URL
|
||||||
|
reset <target> Reset source to the upstream's default
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
-dry Dry Run. Simulate the source changing process, command only prints, not run
|
||||||
|
-local Change source only for this project rather than globally (Via `ls <target>`)
|
||||||
|
-ipv6 Speed measurement using IPv6
|
||||||
|
-en(glish) Output in English
|
||||||
|
-no-color Output without color
|
||||||
|
|
||||||
|
MAINTAIN:
|
||||||
|
We invite you to become a Chef to ensure the quality of recipes you are familiar with for users:
|
||||||
|
|
||||||
|
Source Code: <@url@>,
|
||||||
|
Become a Maintainer: <https://github.com/RubyMetric/chsrc/issues/130>
|
||||||
|
)";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -433,19 +442,14 @@ cli_print_help ()
|
|||||||
{
|
{
|
||||||
char *version_string = purple("v" Chsrc_Version "-" Chsrc_Release_Date);
|
char *version_string = purple("v" Chsrc_Version "-" Chsrc_Release_Date);
|
||||||
|
|
||||||
if (ENGLISH)
|
const char *raw = CHINESE ? USAGE_CHINESE : USAGE_ENGLISH;
|
||||||
{
|
|
||||||
for (int i=0; i<xy_arylen (Chsrc_Usage_English); i++)
|
char *str = xy_str_gsub (raw, "@ver@", version_string);
|
||||||
say (Chsrc_Usage_English[i]);
|
str = xy_str_gsub (str, "@url@", Chsrc_Maintain_URL);
|
||||||
}
|
println (str);
|
||||||
else
|
|
||||||
{
|
|
||||||
char *str = xy_str_gsub (USAGE_CHINESE, "@ver@", version_string);
|
|
||||||
str = xy_str_gsub (str, "@url@", Chsrc_Maintain_URL);
|
|
||||||
println (str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cli_print_issues ()
|
cli_print_issues ()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user