修复画布多语言
This commit is contained in:
@@ -11,6 +11,10 @@ import {
|
||||
} from "./LayerCommands.js";
|
||||
import { fabric } from "fabric-with-all";
|
||||
import { generateId } from "../utils/helper.js";
|
||||
import i18n from "@/lang/index.ts";
|
||||
const { t } = i18n.global;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 套索抠图命令
|
||||
@@ -37,7 +41,7 @@ export class LassoCutoutCommand extends CompositeCommand {
|
||||
this.baseResolutionScale = options.baseResolutionScale || 2; // 基础分辨率倍数
|
||||
|
||||
this.groupId = options.groupId || generateId("lasso-group-");
|
||||
this.groupName = options.groupName || `选区组`;
|
||||
this.groupName = options.groupName || t(`Canvas.ConstituencyGroup`);
|
||||
|
||||
this.clippingMaskId = generateId("clipping-mask-");
|
||||
|
||||
@@ -238,7 +242,7 @@ export class LassoCutoutCommand extends CompositeCommand {
|
||||
// 创建新的组图层
|
||||
this.groupLayer = createLayer({
|
||||
id: this.groupId,
|
||||
name: this.groupName || `选区组`,
|
||||
name: this.groupName || t(`Canvas.ConstituencyGroup`),
|
||||
type: LayerType.GROUP,
|
||||
visible: true,
|
||||
locked: false,
|
||||
|
||||
Reference in New Issue
Block a user