Rename feature field

This commit is contained in:
Aoran Zeng 2024-11-08 19:32:57 +08:00
parent ba98d46e97
commit bbb66dd9d4
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
24 changed files with 33 additions and 32 deletions

View File

@ -6,7 +6,7 @@
* Contributors : Shengwei Chen <414685209@qq.com>
* |
* Created On : <2023-08-29>
* Last Modified : <2024-11-04>
* Last Modified : <2024-11-08>
*
*
* ------------------------------------------------------------*/
@ -173,7 +173,7 @@ typedef struct FeatInfo_t {
bool can_user_define; // 用户自定义换源URL
enum Capability cap_locally;
char *locally;
char *cap_locally_explain;
char *note;
} FeatInfo;

View File

@ -364,7 +364,7 @@ cli_print_target_features (FeatInfo f, const char *input_target_name)
printf (" %s%s\n", bdgreen(YesMark), purple(locally_msg));br();
break;
case PartiallyCan:
printf (" %s%s\n\n %s\n", bdgreen(SemiYesMark), purple(locally_msg), f.locally);br();
printf (" %s%s\n\n %s\n", bdgreen(SemiYesMark), purple(locally_msg), f.cap_locally_explain);br();
break;
default:
xy_unreach;

View File

@ -106,7 +106,7 @@ pl_dart_flutter_feat (char *option)
f.can_reset = true;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -99,7 +99,7 @@ pl_dart_feat (char *option)
f.can_reset = true;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -95,7 +95,7 @@ pl_go_feat (char *option)
f.can_reset = true;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = false;
f.can_user_define = true;

View File

@ -71,7 +71,7 @@ pl_nodejs_bun_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -3,9 +3,10 @@
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Mr. Will <mr.will.com@outlook.com>
* |
* Created On : <2023-08-30>
* Major Revision : 2
* Last Modified : <2024-09-13>
* Last Modified : <2024-11-08>
* ------------------------------------------------------------*/
void
@ -64,9 +65,9 @@ pl_nodejs_setsrc (char *option)
{
{
char *msg = CliOpt_InEnglish ? "Three package managers will be replaced for you at the same time: " \
"npm, pnpm, yarn. If you need to change the source independently, " \
"please run independently `chsrc set <pkg-manager>`"
: "将同时为您更换3个包管理器 npm, pnpm, Yarn 的源,若需要独立换源,请独立运行 chsrc set <pkg-manager>";
"npm, pnpm, yarn. If you need to change the source independently, " \
"please run independently `chsrc set <pkg-manager>`"
: "将同时为您更换3个包管理器 npm, pnpm, Yarn 的源,若需要独立换源,请独立运行 chsrc set <pkg-manager>";
chsrc_note2 (msg);
}
@ -119,7 +120,7 @@ pl_nodejs_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = "Support npm (chsrc v0.1.7)\nSupport yarn v2 (chsrc v0.1.8.1)\nSupport pnpm (chsrc v0.1.8.2)";
f.cap_locally_explain = "Support `npm` & `yarn v2` & `pnpm`. No support for `yarn v1`";
f.can_english = true;
f.can_user_define = true;

View File

@ -98,7 +98,7 @@ pl_nodejs_yarn_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -67,7 +67,7 @@ pl_nodejs_npm_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -70,7 +70,7 @@ pl_nodejs_nvm_feat (char *option)
f.can_reset = false;
f.cap_locally = CanNot;
f.locally = "";
f.cap_locally_explain = "";
f.can_english = false;
f.can_user_define = true;

View File

@ -68,7 +68,7 @@ pl_nodejs_pnpm_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -70,7 +70,7 @@ pl_php_feat (char *option)
f.can_reset = false;
f.cap_locally = FullyCan;
f.locally = "composer 支持 (From v0.1.7)";
f.cap_locally_explain = "Support `composer`";
f.can_english = false;
f.can_user_define = true;

View File

@ -70,7 +70,7 @@ pl_python_pdm_feat (char *option)
// PDM 完全支持项目级换源
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -67,7 +67,7 @@ pl_python_poetry_feat (char *option)
f.can_reset = true;
f.cap_locally = FullyCan;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = false;
f.can_user_define = true;

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-03>
* Last Modified : <2024-09-13>
* Last Modified : <2024-11-08>
*
* 2024-08-08: uv
* ------------------------------------------------------------*/
@ -90,7 +90,7 @@ pl_python_feat (char *option)
f.can_reset = true;
f.cap_locally = PartiallyCan;
f.locally = "pip 不支持,其他支持";
f.cap_locally_explain = "Support `Poetry` & `PDM`. No support for `pip`";
f.can_english = false;
f.can_user_define = true;

View File

@ -80,7 +80,7 @@ pl_python_pip_feat (char *option)
// pip 不支持项目级换源
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-08-29>
* Last Modified : <2024-09-04>
* Last Modified : <2024-11-08>
* ------------------------------------------------------------*/
static MirrorSite
@ -104,8 +104,8 @@ pl_ruby_feat (char *option)
f.can_reset = true;
f.cap_locally = PartiallyCan;
f.locally = "gem 不支持; bundler 支持 (From v0.1.6)";
f.can_english = false;
f.cap_locally_explain = "Support `bundler`. No support for `gem`";
f.can_english = true;
f.can_user_define = true;
f.note = NULL;

View File

@ -79,7 +79,7 @@ pl_rust_cargo_feat (char *option)
f.can_reset = true;
f.cap_locally = PartiallyCan;
f.locally = "可以基于本项目换源吗?请帮助确认";
f.cap_locally_explain = "可以基于本项目换源吗?请帮助确认";
f.can_english = false;
f.can_user_define = true;

View File

@ -106,7 +106,7 @@ pl_rust_rustup_feat (char *option)
f.can_reset = false;
f.cap_locally = CanNot;
f.locally = "";
f.cap_locally_explain = "";
f.can_english = false;
f.can_user_define = true;

View File

@ -116,7 +116,7 @@ os_debian_feat (char *option)
f.can_reset = false;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = false;
f.can_user_define = true;

View File

@ -137,7 +137,7 @@ os_ubuntu_feat (char *option)
f.can_reset = true;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
f.can_user_define = true;

View File

@ -112,7 +112,7 @@ FeatInfo
f.can_reset = false;
f.cap_locally = PartiallyCan;
f.locally = "具体说明是否支持项目级换源...";
f.cap_locally_explain = "具体说明是否支持项目级换源...";
f.can_english = false;
f.can_user_define = false;

View File

@ -157,7 +157,7 @@ wr_dockerhub_feat (char *option)
f.can_reset = false;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = false;
f.can_user_define = true;

View File

@ -103,7 +103,7 @@ wr_homebrew_feat (char *option)
f.can_reset = false;
f.cap_locally = CanNot;
f.locally = NULL;
f.cap_locally_explain = NULL;
f.can_english = true;
/* 该换源方案中URL存在拼凑因此不能让用户手动使用某URL来换源 */