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

@@ -107,7 +107,7 @@ export const CropperCover: React.FC<CropperCoverProps> = ({
<Tag
color="primary"
prefixIcon={null}
// 这里适配背景图色 颜色固定不改变
// The background cover color is suitable here, and the color is fixed and does not change.
className="!text-white !bg-[rgba(0,0,0,0.28)]"
>
{mode === 'pc'

View File

@@ -99,16 +99,16 @@ const CropperImg: React.FC<CropperProps> = ({
initialAspectRatio={size.width / size.height}
src={url}
style={{ height: size.height, width: size.width }}
background={false} // 是否在容器内显示网格背景
background={false} // Whether to display a grid background within the container
guides={false}
zoom={debouncedZoom}
ref={cropperRef}
dragMode="move" // 图片容器可移动
viewMode={0} // 定义cropper的视图模式0允许裁剪框可以延伸到图片容器之外
modal={false} // 是否在图片和裁剪框之间显示黑色蒙版
dragMode="move" // Image container removable
viewMode={0} // Define the view mode of the cropper, 0 allows the cropping box to extend beyond the image container
modal={false} // Whether to display a black mask between the image and the crop box
center={false}
cropBoxMovable={false} // 是否可以拖拽裁剪框 默认true
cropBoxResizable={false} // 默认true ,是否允许拖动 改变裁剪框大小
cropBoxMovable={false} // Whether you can drag and drop the crop box, the default is true.
cropBoxResizable={false} // Default true, whether to allow dragging, change the size of the crop box
highlight={false}
autoCropArea={1}
minCanvasHeight={size.height}

View File

@@ -36,7 +36,7 @@ import { DragUploadContent } from './drag-upload-content';
import CropperImg from './cropper';
export const checkHasFileOnDrag = (e: React.DragEvent<HTMLDivElement>) =>
// 判断的依据直接看 types 的类型解释就好了
// The basis for the judgment is to directly look at the type explanation of types
Boolean(e.dataTransfer?.types.includes('Files'));
export interface CropperUploadProps {
pictureValue?: Partial<FileItem>;
@@ -91,7 +91,7 @@ const CopperUpload: React.FC<CropperUploadProps> = ({
if (validateSize) {
onSuccess(file);
onChange?.(file);
// 手动上传后 需要把候选图的选中态清掉
// After uploading manually, you need to clear the selected state of the candidate image.
setGenerateBackgroundModalByImmer(state => {
state.selectedImage = {};
});

View File

@@ -82,7 +82,7 @@ export const BackgroundConfigContent: React.FC<
state.setGenerateBackgroundModalByImmer,
})),
);
// 初始化展示在拖拽框的图: AI生成成功的展示生成的 > 历史设置的背景图 > 空
// Initialize the display in the drag-and-drop box of the graph: AI-generated successful display generated > history settings background cover > empty
const initPicture = getInitBackground({
isGenerateSuccess,
originBackground: backgroundValue,
@@ -98,7 +98,7 @@ export const BackgroundConfigContent: React.FC<
const pictureUrl = pictureValue?.url;
useEffect(() => {
// 初始化逻辑: 初始化图 不是 选中的图,更新候选图选中态
// Initialization logic: Initialize the graph, not the selected graph, update the selected state of the candidate graph
if (initPicture.url !== selectedImageInfo?.tar_url) {
setGenerateBackgroundModalByImmer(state => {
state.selectedImage = {
@@ -112,7 +112,7 @@ export const BackgroundConfigContent: React.FC<
}, []);
useEffect(() => {
// 收到AI生图成功后更新当前展示在裁剪框的图片
// After receiving the AI generated picture successfully, update the picture currently displayed in the crop box.
if (selectedImageInfo) {
setPictureValue({
uri: selectedImageInfo?.tar_uri,