using System.Globalization; using System.Windows.Data; using EmbyToolbox.Models; namespace EmbyToolbox.Converters; public sealed class TrackActionKindToRussianConverter : IValueConverter { public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) { if (value is not TrackActionKind action) { return string.Empty; } return action switch { TrackActionKind.Keep => "Оставить", TrackActionKind.Convert => "Конвертировать", TrackActionKind.Remove => "Удалить", TrackActionKind.Add => "Добавить", _ => action.ToString() }; } public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => Binding.DoNothing; }