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.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -45,16 +46,20 @@ namespace SpineViewer.Spine.SpineExporter
|
|||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public override string Suffix => Exporter.Suffix;
|
public override string Suffix => Exporter.Suffix;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文件格式
|
/// 文件格式
|
||||||
/// </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; }
|
public string CustomFormat { get => Exporter.CustomFormat; set => Exporter.CustomFormat = value; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文件名后缀
|
/// 文件名后缀
|
||||||
/// </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; }
|
public string CustomSuffix { get => Exporter.CustomSuffix; set => Exporter.CustomSuffix = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,11 +288,11 @@ namespace SpineViewer.Spine.SpineExporter
|
|||||||
public virtual string? Validate()
|
public virtual string? Validate()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(OutputDir) && File.Exists(OutputDir))
|
if (!string.IsNullOrWhiteSpace(OutputDir) && File.Exists(OutputDir))
|
||||||
return "输出文件夹无效";
|
return Properties.Resources.invalidInputFolder;
|
||||||
if (!string.IsNullOrWhiteSpace(OutputDir) && !Directory.Exists(OutputDir))
|
if (!string.IsNullOrWhiteSpace(OutputDir) && !Directory.Exists(OutputDir))
|
||||||
return $"文件夹 {OutputDir} 不存在";
|
return $"{Properties.Resources.folderNotExistPrefix} {OutputDir} {Properties.Resources.folderNotExistSuffix}";
|
||||||
if (IsExportSingle && string.IsNullOrWhiteSpace(OutputDir))
|
if (IsExportSingle && string.IsNullOrWhiteSpace(OutputDir))
|
||||||
return "导出单个时必须提供输出文件夹";
|
return Properties.Resources.mustProvideOutputFolder;
|
||||||
|
|
||||||
OutputDir = string.IsNullOrWhiteSpace(OutputDir) ? null : Path.GetFullPath(OutputDir);
|
OutputDir = string.IsNullOrWhiteSpace(OutputDir) ? null : Path.GetFullPath(OutputDir);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user