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

@@ -55,7 +55,7 @@ interface AutoGenerateProps {
};
showAiAvatar: boolean;
/**
* 最多允许多少个候选
* How many candidates are allowed at most?
* @default 5
*/
maxCandidateCount?: number;
@@ -66,7 +66,7 @@ interface PictureItem {
uid: string;
}
// 自动生成头像错误码
// Automatically generate avatar error codes
enum ErrorCode {
OVER_QUOTA_PER_DAY = 700012034,
CONTENT_NOT_LEGAL = 700012050,
@@ -177,7 +177,7 @@ export const AutoGenerate = (props: AutoGenerateProps) => {
});
const codeNumber = Number((error as { code: number })?.code);
if (codeNumber === ErrorCode.OVER_QUOTA_PER_DAY) {
// 超过单日次数上限
// Exceeding the maximum number of times a day
setTotalCount(MAX_TOTAL_COUNT);
Toast.error({
content: I18n.t('bot_edit_profile_pircture_autogen_quota_tooltip'),
@@ -213,7 +213,7 @@ export const AutoGenerate = (props: AutoGenerateProps) => {
};
useEffect(() => {
// 获取当日总生成次数
// Get the total number of spawns for the day
DeveloperApi.GetGenerateIconInfo()
.then(({ data }) => {
setTotalCount(Number(data?.current_day_count));
@@ -274,7 +274,7 @@ export const AutoGenerate = (props: AutoGenerateProps) => {
[s['loading-hover']]: loadingHover && !picture.url,
})}
>
{/* 二次hover展示取消 */}
{/* Secondary hover display cancelled */}
{hoverCount.current > 1 && loadingHover && !picture.url ? (
<div
className={s.mask}
@@ -287,7 +287,7 @@ export const AutoGenerate = (props: AutoGenerateProps) => {
</div>
) : null}
{/* 选中图片蒙版 */}
{/* Select image mask */}
{checkedId === idx && (
<div className={s.mask}>
<IconCozCheckMark className="text-[16]" />

View File

@@ -65,12 +65,12 @@ interface PackageUploadProps {
triggerClassName?: string;
maskIcon?: React.ReactNode;
/**
* 编辑遮罩的展示模式
* - full-center(默认): 整体覆盖黑色透明遮罩, Icon 居中展示. hover 展示
* - right-bottom: 右下角遮罩, 长期展示
* Edit the display mode of the mask
* - full-center (default): overall cover black transparent mask, Icon centered show.hover display
* - right-bottom: lower right masking, long display
*/
maskMode?: 'full-center' | 'right-bottom';
/** 编辑遮罩的 className */
/** Edit the className of the mask */
editMaskClassName?: string;
/** max size */
maxSize?: number;
@@ -81,7 +81,7 @@ interface PackageUploadProps {
contentNotLegalText?: string;
};
/**
* 自动生成的最大候选数量
* Maximum number of candidates automatically generated
* @default 5
*/
maxCandidateCount?: number;
@@ -91,14 +91,14 @@ interface PackageUploadProps {
onGenerateStaticImageClick?: React.MouseEventHandler<HTMLButtonElement>;
onGenerateGifClick?: React.MouseEventHandler<HTMLButtonElement>;
onSizeError?: () => void;
// 自定义自定生成图片逻辑
// Custom custom generated image logic
renderAutoGenerate?: (params: RenderAutoGenerateParams) => React.ReactNode;
testId?: string;
}
// eslint-disable-next-line @coze-arch/max-line-per-function
const _PictureUpload = (props: PackageUploadProps) => {
// 业务
// business
const {
onChange,
value,
@@ -225,7 +225,7 @@ const _PictureUpload = (props: PackageUploadProps) => {
return;
}
Toast.error({
// starling 切换
// Starling toggle
content: I18n.t(
'dataset_upload_image_warning',
{},

View File

@@ -54,11 +54,11 @@ function customUploadRequest(
try {
const { fileInstance } = file;
// 业务
// business
if (fileInstance) {
const extension = getFileExtension(file.name);
// 业务
// business
(async () => {
try {
const base64 = await getBase64(fileInstance);
@@ -72,7 +72,7 @@ function customUploadRequest(
onSuccess?.(result.data);
afterUploadCustom?.();
} catch (error) {
// 如参数校验失败情况会走到catch
// If parameter validation fails, it will go to catch.
afterUploadCustom?.();
}
})();