From d3bf71a22d5f324b021ea0540e4dde3e80a9db3d Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Wed, 7 Jan 2015 18:59:55 +0800 Subject: [PATCH] Add translation for folder plugin --- Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj | 5 + Plugins/Wox.Plugin.Folder/FolderPlugin.cs | 10 +- .../FolderPluginSettings.xaml | 10 +- .../FolderPluginSettings.xaml.cs | 11 +- Plugins/Wox.Plugin.Folder/Languages/en.xaml | 11 + .../Wox.Plugin.Folder/Languages/zh-cn.xaml | 11 + .../Wox.Plugin.Folder/Languages/zh-tw.xaml | 11 + .../Wox.Plugin.Folder.csproj | 223 ++++++++------- .../Wox.Plugin.Program.csproj | 265 +++++++++--------- .../Wox.Plugin.WebSearch/Languages/zh-tw.xaml | 28 ++ .../Wox.Plugin.WebSearch.csproj | 5 + 11 files changed, 346 insertions(+), 244 deletions(-) create mode 100644 Plugins/Wox.Plugin.Folder/Languages/en.xaml create mode 100644 Plugins/Wox.Plugin.Folder/Languages/zh-cn.xaml create mode 100644 Plugins/Wox.Plugin.Folder/Languages/zh-tw.xaml create mode 100644 Plugins/Wox.Plugin.WebSearch/Languages/zh-tw.xaml diff --git a/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj b/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj index 641215ff73..e7e53944d4 100644 --- a/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj +++ b/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj @@ -77,6 +77,11 @@ Designer PreserveNewest + + MSBuild:Compile + Designer + PreserveNewest + diff --git a/Plugins/Wox.Plugin.Folder/FolderPlugin.cs b/Plugins/Wox.Plugin.Folder/FolderPlugin.cs index 3b8ddaeca1..809e90f9fb 100644 --- a/Plugins/Wox.Plugin.Folder/FolderPlugin.cs +++ b/Plugins/Wox.Plugin.Folder/FolderPlugin.cs @@ -3,19 +3,20 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Reflection; using System.Windows; using Control = System.Windows.Controls.Control; namespace Wox.Plugin.Folder { - public class FolderPlugin : IPlugin, ISettingProvider + public class FolderPlugin : IPlugin, ISettingProvider,IPluginI18n { private static List driverNames; private PluginInitContext context; public Control CreateSettingPanel() { - return new FileSystemSettings(); + return new FileSystemSettings(context); } public void Init(PluginInitContext context) @@ -183,5 +184,10 @@ namespace Wox.Plugin.Folder return results; } + + public string GetLanguagesFolder() + { + return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Languages"); + } } } \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Folder/FolderPluginSettings.xaml b/Plugins/Wox.Plugin.Folder/FolderPluginSettings.xaml index 8a0c916d6a..4f2270dbd6 100644 --- a/Plugins/Wox.Plugin.Folder/FolderPluginSettings.xaml +++ b/Plugins/Wox.Plugin.Folder/FolderPluginSettings.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300"> + d:DesignHeight="300" d:DesignWidth="500"> @@ -13,7 +13,7 @@ - + @@ -24,9 +24,9 @@ -