feat: spineview localize
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SpineViewer.Utils.Localize;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
@@ -48,13 +49,17 @@ namespace SpineViewer.Spine.SpineExporter
|
||||
/// <summary>
|
||||
/// 文件格式
|
||||
/// </summary>
|
||||
[Category("[2] FFmpeg 基本参数"), DisplayName("文件格式"), Description("-f, 文件格式")]
|
||||
[LocalizedCategory(typeof(Properties.Resources), "categoryFFmpegParameter")]
|
||||
[LocalizedDisplayName(typeof(Properties.Resources), "displayFileFormat")]
|
||||
[LocalizedDescription(typeof(Properties.Resources), "descFileFormat")]
|
||||
public string CustomFormat { get => Exporter.CustomFormat; set => Exporter.CustomFormat = value; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件名后缀
|
||||
/// </summary>
|
||||
[Category("[2] FFmpeg 基本参数"), DisplayName("文件名后缀"), Description("文件名后缀")]
|
||||
[LocalizedCategory(typeof(Properties.Resources), "categoryFFmpegParameter")]
|
||||
[LocalizedDisplayName(typeof(Properties.Resources), "displayFilenameSuffix")]
|
||||
[LocalizedDescription(typeof(Properties.Resources), "descFilenameSuffix")]
|
||||
public string CustomSuffix { get => Exporter.CustomSuffix; set => Exporter.CustomSuffix = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,11 +288,11 @@ namespace SpineViewer.Spine.SpineExporter
|
||||
public virtual string? Validate()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(OutputDir) && File.Exists(OutputDir))
|
||||
return "输出文件夹无效";
|
||||
return Properties.Resources.invalidInputFolder;
|
||||
if (!string.IsNullOrWhiteSpace(OutputDir) && !Directory.Exists(OutputDir))
|
||||
return $"文件夹 {OutputDir} 不存在";
|
||||
return $"{Properties.Resources.folderNotExistPrefix} {OutputDir} {Properties.Resources.folderNotExistSuffix}";
|
||||
if (IsExportSingle && string.IsNullOrWhiteSpace(OutputDir))
|
||||
return "导出单个时必须提供输出文件夹";
|
||||
return Properties.Resources.mustProvideOutputFolder;
|
||||
|
||||
OutputDir = string.IsNullOrWhiteSpace(OutputDir) ? null : Path.GetFullPath(OutputDir);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user