From 4feb51f12fcd2f66b24aa4bad5339b0a725b44a7 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Tue, 22 Jul 2025 12:35:01 +0800 Subject: [PATCH] Update English usage --- src/chsrc-main.c | 78 +++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 0435110..626905d 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -185,39 +185,48 @@ R"(名称: static const char * -Chsrc_Usage_English[] = { - "Usage: chsrc [options] [target] [mirror]", - "help Print this help, or h, -h, --help", - "issue See related issues\n", +USAGE_ENGLISH = +R"(NAME: + chsrc - Change Source - (GPLv3+) - Developed by RubyMetric - "list (or ls, or l) List available mirror sites and supported targets", - "list mirror/target List available mirror sites or supported targets", - "list os/lang/ware List supported OS/Programming Language/Software\n", +VERSION: + @ver@ - "measure Measure velocity of all sources of ", - "cesu \n", +USAGE: + chsrc [options] [target] [mirror] - "list View available sources and supporting features for ", - "get View the current source state for \n", +COMMANDS: + help, h Print this help, or -h, --help + issue See related issues - "set Change source, select the fastest source by automatic speed measurement", - "set first Change source, select the fastest source measured by the maintainers team", - "set Change source, specify a mirror site (Via `list `)", - "set https://url Change source, using user-defined source URL", - "reset Reset source to the upstream's default\n", + list, ls, l List available mirror sites and supported targets + list mirror|target List supported: mirror sites/supported targets + list os|lang|ware List supported: OSes/Programming Languages/Softwares + list View available sources and supporting features for - "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 `)", - "-ipv6 Speed measurement using IPv6", - "-en(glish) Output in English", - "-no-color Output without color\n", + measure, m, cesu Measure velocity of all sources of - "Mirror status: ", - "Maintain: <" Chsrc_Maintain_URL ">\n", + get, g View the current source state for - "We sincerely invite you to become a Chef or Taster to ensure the quality of recipes you are familiar with for users: " -}; + set, s Change source, select the fastest source by automatic speed measurement + set first Change source, select the fastest source measured by the maintainers team + set Change source, specify a mirror site (Via `list `) + set Change source, using user-defined source URL + reset 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 `) + -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: +)"; @@ -433,19 +442,14 @@ cli_print_help () { char *version_string = purple("v" Chsrc_Version "-" Chsrc_Release_Date); - if (ENGLISH) - { - for (int i=0; i