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

@@ -20,7 +20,7 @@ export const formatMessageBoxContentTime = (contentTime: number): string => {
if (contentTime < 1) {
return '';
}
// 当天:hh:mm;跨天:mm-dd hh:mm;跨年:yyyy-mm-dd hh:mm
// Day: hh: mm; across the sky: mm-dd hh: mm; New Year's Eve: yyyy-mm-dd hh: mm
const now = Date.now();
const today = dayjs(now);
const messageDay = dayjs(contentTime);

View File

@@ -19,17 +19,17 @@ export const getImageDisplayAttribute = (
height: number,
contentWidth: number,
) => {
// 图片比例
// image scale
const imageRatio = width / height;
// 展示宽度
// display width
let displayWidth = contentWidth;
// 展示高度
// display height
let displayHeight = contentWidth / imageRatio;
// 是否裁切
// Whether to cut
let isCover = false;
// (小尺寸图)
// (Small size drawing)
if (width <= contentWidth && height <= 240) {
displayWidth = width;
@@ -38,16 +38,16 @@ export const getImageDisplayAttribute = (
displayWidth = contentWidth;
displayHeight = 120;
isCover = true;
// (长竖图)图片宽度:图片高度 <= 0.5
// (Long vertical) Image width: Image height < = 0.5
} else if (imageRatio <= 0.5) {
displayWidth = 120;
displayHeight = 240;
isCover = true;
// (等比展示图)
// (Equivalent display picture)
} else if (0.5 <= imageRatio && imageRatio <= contentWidth / 240) {
displayWidth = 240 * imageRatio;
displayHeight = 240;
// (中长横图)
// (Medium and long horizontal chart)
} else if (
contentWidth / 240 <= imageRatio &&
imageRatio <= contentWidth / 240

View File

@@ -15,8 +15,8 @@
*/
/**
* 是否是在苹果平台的Webkit内核浏览器下
* 这个判断条件不等于是在苹果设备下因为部分苹果设备例如Mac可以运行非原生Webkit引擎的浏览器例如Chromium(Blink)
* Is it under the Webkit kernel browser of the Apple platform?
* Note: This judgment condition is not equal to under Apple devices, because some Apple devices (such as Mac) can run non-native Webkit engine browsers, such as Chromium (Blink)
*/
export const isAppleWebkit = () =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any

View File

@@ -26,5 +26,5 @@ type StoreStructRange = Record<keyof StoreStruct, boolean | string | number>;
const storeStructRangeCheck = (range: StoreStructRange) => 0;
declare const voidStruct: StoreStruct;
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- 类型测试
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- type testing
const dryRun = () => storeStructRangeCheck(voidStruct);

View File

@@ -18,8 +18,8 @@ import Browser from 'bowser';
let getIsMobileCache: boolean | undefined;
/**
* 是否是移动设备
* ipad 不是移动设备
* Is it a mobile device?
* Note: iPad is not a mobile device
*/
const isMobile = () =>
Browser.getParser(navigator.userAgent)
@@ -35,7 +35,7 @@ export const getIsMobile = () => {
let getIsIPhoneOrIPadCache: boolean | undefined;
/**
* gpt-4 提供的代码
* Code provided by gpt-4
*/
export const getIsIPhoneOrIPad = () => {
if (typeof getIsIPhoneOrIPadCache === 'undefined') {
@@ -53,7 +53,7 @@ export const getIsIPhoneOrIPad = () => {
let getIsIPadCache: boolean | undefined;
/**
* gpt-4 提供的代码
* Code provided by gpt-4
*/
export const getIsIPad = () => {
if (typeof getIsIPadCache === 'undefined') {

View File

@@ -15,7 +15,7 @@
*/
/**
* @deprecated 非常非常坏,尽快换为 typeSafeJsonParse
* @Deprecated very very bad, change to typeSafeJsonParse ASAP.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const safeJSONParse: (v: any, emptyValue?: any) => any = (