修复画布多语言
This commit is contained in:
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
<div class="uploaded-textures-section">
|
||||
<div class="uploaded-textures-divider">
|
||||
<span>{{ $t("上传的纹理") }}</span>
|
||||
<span>{{ $t("Canvas.UploadedTexture") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="texture-grid">
|
||||
@@ -201,7 +201,7 @@
|
||||
<div class="upload-icon">
|
||||
<span>+</span>
|
||||
</div>
|
||||
<span class="texture-label">{{ $t("上传纹理") }}</span>
|
||||
<span class="texture-label">{{ $t("Canvas.UploadTexture") }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-for="textureId in brushStore.state.uploadedTextures"
|
||||
@@ -219,7 +219,7 @@
|
||||
<div
|
||||
class="texture-remove-btn"
|
||||
@click.stop="removeUploadedTexture(textureId)"
|
||||
:title="$t('删除纹理')"
|
||||
:title="$t('Canvas.DeleteTexture')"
|
||||
>
|
||||
<span>×</span>
|
||||
</div>
|
||||
@@ -535,6 +535,9 @@ import {
|
||||
TextureUploadCommand,
|
||||
} from "../commands/BrushCommands";
|
||||
import { debounce } from "lodash-es";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n();
|
||||
|
||||
|
||||
// 从工具管理器获取可用笔刷类型
|
||||
const toolManager = inject("toolManager");
|
||||
@@ -873,7 +876,7 @@ function applyPresetWithCommand(presetIndex) {
|
||||
// 保存当前设置为预设
|
||||
function saveCurrentAsPreset() {
|
||||
// 简单实现,可以后续优化为弹窗输入名称
|
||||
const name = prompt("请输入预设名称:", `预设 ${BrushStore.state.presets.length + 1}`);
|
||||
const name = prompt(t('Canvas.presetNamePrompt'), `${t('Canvas.preset')} ${BrushStore.state.presets.length + 1}`);
|
||||
if (name) {
|
||||
const presetIndex = BrushStore.saveCurrentAsPreset(name);
|
||||
// 应用新创建的预设(可选)
|
||||
|
||||
Reference in New Issue
Block a user