docs: annotate all shared frontend modules in Chinese

This commit is contained in:
cieanyau committed 2026-11-06 00:30:15 +08:00
1 parent 2be21c1c62
commit 408f8e5c98
55 files changed
+349

No files matched your search

+3
View File
@@ -1,3 +1,4 @@
/** 镜像名称展示清理:统一系统品牌/版本分隔,移除文件扩展名和冗余的 64 位标记。 */
var e = {
debian: `Debian`,
ubuntu: `Ubuntu`,
@@ -33,6 +34,7 @@ var e = {
gpt: `GPT`,
bt: `BT`,
};
// 仅改写已知系统前缀及可识别的版本词;不认识的尾部原样保留,避免丢失镜像特征。
function n(n) {
let r = n.match(
/^(Debian|Ubuntu|CentOS|Windows|Rocky(?:[ _-]+Linux)?|AlmaLinux|Fedora|openEuler|FreeBSD|TencentOS|Alpine(?:[ _-]+Linux)?)(?=$|[\d\s_-])/i,
@@ -56,6 +58,7 @@ function n(n) {
}
return o.join(` `) + i;
}
// 这是显示名称处理,不改变实际镜像 id;完全为空的优化版名称显示“默认镜像”。
function r(e) {
if (typeof e != `string`) return ``;
let t = e.trim();