修复画布多语言

This commit is contained in:
李志鹏
2025-09-24 16:26:40 +08:00
parent bdb3c50650
commit 016b25fcb9
12 changed files with 98 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
import { BaseBrush } from "../BaseBrush";
import { fabric } from "fabric-with-all";
import texturePresetManager from "../TexturePresetManager";
import i18n from "@/lang/index.ts";
const {t} = i18n.global;
/**
* 纹理笔刷
@@ -468,12 +470,12 @@ export class TextureBrush extends BaseBrush {
const textureProperties = [
{
id: "textureSelector",
name: "材质选择",
name: t('Canvas.TextureSelector'),
type: "texture-grid",
defaultValue: this.selectedTextureId,
options: textureOptions,
description: "选择要使用的纹理",
category: "纹理设置",
description: t('Canvas.selectTexture'),
category: t('Canvas.TextureSettings'),
order: 100,
hidden: allTextures.length === 0,
},

View File

@@ -5,6 +5,8 @@
import { LiquifyWebGLManager } from "./LiquifyWebGLManager";
import { LiquifyCPUManager } from "./LiquifyCPUManager";
import { findLayerRecursively, LayerType } from "../../utils/layerHelper";
import i18n from "@/lang/index.ts";
const {t} = i18n.global;
export class EnhancedLiquifyManager {
/**
@@ -599,7 +601,7 @@ export class EnhancedLiquifyManager {
if (objectsToCheck.length === 0) {
return {
valid: false,
message: "图层为空,无法进行液化操作",
message: t('Canvas.layerEmptyNoLiquidation'),
needsRasterization: false,
isImage: false,
isEmpty: true,