feat: spine exporter localize

This commit is contained in:
Myssal
2025-04-28 01:03:18 +07:00
parent 177434e503
commit c8ee4cf0c9
18 changed files with 1592 additions and 158 deletions

View File

@@ -1,5 +1,6 @@
using FFMpegCore;
using SpineViewer.Utils;
using SpineViewer.Utils.Localize;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -69,33 +70,43 @@ namespace SpineViewer.Spine.SpineExporter
/// </summary>
[StringEnumConverter.StandardValues("libwebp_anim", "libwebp", Customizable = true)]
[TypeConverter(typeof(StringEnumConverter))]
[Category("[3] "), DisplayName(""), Description("-c:v, 使")]
public string Codec { get => Exporter.Codec; set => Exporter.Codec = value; }
[LocalizedCategory(typeof(Properties.Resources), "categoryFormatParameters")]
[LocalizedDisplayName(typeof(Properties.Resources), "displayEncoder")]
[LocalizedDescription(typeof(Properties.Resources), "descAvifEncoder")]
public string Codec { get => Exporter.Codec; set => Exporter.Codec = value; }
/// <summary>
/// 是否无损
/// </summary>
[Category("[3] "), DisplayName(""), Description("-lossless, 0 , 1 ")]
public bool Lossless { get => Exporter.Lossless; set => Exporter.Lossless = value; }
/// <summary>
/// 是否无损
/// </summary>
[LocalizedCategory(typeof(Properties.Resources), "categoryFormatParameters")]
[LocalizedDisplayName(typeof(Properties.Resources), "displayLoseless")]
[LocalizedDescription(typeof(Properties.Resources), "descLoseless")]
public bool Lossless { get => Exporter.Lossless; set => Exporter.Lossless = value; }
/// <summary>
/// CRF
/// </summary>
[Category("[3] "), DisplayName(""), Description("-quality, 0-100, 75")]
public int Quality { get => Exporter.Quality; set => Exporter.Quality = value; }
/// <summary>
/// CRF
/// </summary>
[LocalizedCategory(typeof(Properties.Resources), "categoryFormatParameters")]
[LocalizedDisplayName(typeof(Properties.Resources), "displayQuality")]
[LocalizedDescription(typeof(Properties.Resources), "descQuality")]
public int Quality { get => Exporter.Quality; set => Exporter.Quality = value; }
/// <summary>
/// 像素格式
/// </summary>
[StringEnumConverter.StandardValues("yuv420p", "yuva420p", Customizable = true)]
[TypeConverter(typeof(StringEnumConverter))]
[Category("[3] "), DisplayName(""), Description("-pix_fmt, 使")]
public string PixelFormat { get => Exporter.PixelFormat; set => Exporter.PixelFormat = value; }
[LocalizedCategory(typeof(Properties.Resources), "categoryFormatParameters")]
[LocalizedDisplayName(typeof(Properties.Resources), "displayPixelFormat")]
[LocalizedDescription(typeof(Properties.Resources), "descPixelFormat")]
public string PixelFormat { get => Exporter.PixelFormat; set => Exporter.PixelFormat = value; }
/// <summary>
/// 透明度阈值
/// </summary>
[Category("[3] "), DisplayName(""), Description("-loop, , 0 , [0, 65535]")]
public int Loop { get => Exporter.Loop; set => Exporter.Loop = value; }
/// <summary>
/// 透明度阈值
/// </summary>
[LocalizedCategory(typeof(Properties.Resources), "categoryFormatParameters")]
[LocalizedDisplayName(typeof(Properties.Resources), "displayLoopCount")]
[LocalizedDescription(typeof(Properties.Resources), "descLoopCount")]
public int Loop { get => Exporter.Loop; set => Exporter.Loop = value; }
}
}