chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -15,20 +15,20 @@
*/
export function compareVersion(version1: string, version2: string): number {
// 将版本号字符串分割成数字数组,这里使用map(Number)确保转换为数字类型
// Split the version number string into an array of numbers, here use map (Number) to ensure conversion to numeric type
const parts1 = version1.split('.').map(Number);
const parts2 = version2.split('.').map(Number);
// 计算出最长的版本号长度
// Calculate the longest version length
const maxLength = Math.max(parts1.length, parts2.length);
// 逐个比较版本号中的每个部分
// Compare each part of the version number one by one
for (let i = 0; i < maxLength; i++) {
// 如果某个版本号在这个位置没有对应的数字则视为0
// If a version number does not have a corresponding number at this position, it is treated as 0.
const part1 = i < parts1.length ? parts1[i] : 0;
const part2 = i < parts2.length ? parts2[i] : 0;
// 比较两个版本号的当前部分
// Compare the current parts of two version numbers
if (part1 > part2) {
return 1;
}
@@ -37,6 +37,6 @@ export function compareVersion(version1: string, version2: string): number {
}
}
// 如果所有部分都相等,则版本号相等
// If all parts are equal, then the version numbers are equal
return 0;
}

View File

@@ -68,7 +68,7 @@ const INTERNATIONAL_BROWSER_DOWNLOAD_CONFIG: DownloadConfig = {
};
/**
* 目前看起来 移动端 / PC 版本一致无需区分,后期如果区分,在这里通过条件区分
* At present, it seems that the mobile end/PC version is the same without distinction. If it is distinguished later, it will be distinguished by conditions here.
*/
export const testLowVersionBrowse = () => testPCVersion();
@@ -81,7 +81,7 @@ const testPCVersion = () => {
const { name, version } = browserInfo;
// 显示的判断,用 includes 类型推断不正确
// The displayed judgment, incorrectly inferred with the includes type
if (name === 'bot' || name === 'react-native' || name === 'node') {
return null;
}

View File

@@ -16,7 +16,7 @@
export const isMobileFromUA = () => {
const { userAgent } = navigator;
// 检查是否为移动设备
// Check if it is a mobile device
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
userAgent,
);