diff --git a/MainWindow.xaml b/MainWindow.xaml index c6ca53f3..dda8d3bc 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -20,6 +20,7 @@ + @@ -217,7 +218,7 @@ - + diff --git a/Strings/guiStrings.Designer.cs b/Strings/guiStrings.Designer.cs index cd04ca5f..4f83d735 100644 --- a/Strings/guiStrings.Designer.cs +++ b/Strings/guiStrings.Designer.cs @@ -594,15 +594,6 @@ namespace GARbro.GUI.Strings { } } - /// - /// Looks up a localized string similar to <DIR>. - /// - public static string TextDirType { - get { - return ResourceManager.GetString("TextDirType", resourceCulture); - } - } - /// /// Looks up a localized string similar to Text encoding. /// @@ -692,5 +683,14 @@ namespace GARbro.GUI.Strings { return ResourceManager.GetString("TooltipForward", resourceCulture); } } + + /// + /// Looks up a localized string similar to <DIR>. + /// + public static string Type_directory { + get { + return ResourceManager.GetString("Type_directory", resourceCulture); + } + } } } diff --git a/Strings/guiStrings.resx b/Strings/guiStrings.resx index 2f0ae1f8..a0544461 100644 --- a/Strings/guiStrings.resx +++ b/Strings/guiStrings.resx @@ -285,7 +285,7 @@ Archive creation error - + <DIR> diff --git a/Strings/guiStrings.ru-RU.resx b/Strings/guiStrings.ru-RU.resx index 7d8649b0..cbf1cca5 100644 --- a/Strings/guiStrings.ru-RU.resx +++ b/Strings/guiStrings.ru-RU.resx @@ -333,4 +333,13 @@ Создание архива {0} + + архив + + + изображение + + + сценарий + \ No newline at end of file diff --git a/ViewModel.cs b/ViewModel.cs index 14c5548c..062dbb9e 100644 --- a/ViewModel.cs +++ b/ViewModel.cs @@ -33,6 +33,7 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Text.RegularExpressions; using System.Globalization; +using System.Windows.Data; using GameRes; using GARbro.GUI.Strings; @@ -40,7 +41,7 @@ namespace GARbro.GUI { public class SubDirEntry : GameRes.Entry { - public override string Type { get { return guiStrings.TextDirType; } } + public override string Type { get { return "directory"; } } public SubDirEntry (string name) { @@ -320,4 +321,24 @@ namespace GARbro.GUI Item = System.IO.Path.GetFileName (filename); } } + + public class EntryTypeConverter : IValueConverter + { + public object Convert (object value, Type targetType, object parameter, CultureInfo culture) + { + var type = value as string; + if (!string.IsNullOrEmpty (type)) + { + var translation = guiStrings.ResourceManager.GetString ("Type_"+type, guiStrings.Culture); + if (!string.IsNullOrEmpty (translation)) + return translation; + } + return value; + } + + public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } }