Add translations for Program plugin.

This commit is contained in:
qianlifeng
2015-01-06 23:24:11 +08:00
parent ce9c832e00
commit 492e33aeda
14 changed files with 223 additions and 172 deletions

View File

@@ -14,7 +14,7 @@ namespace Wox.Core.i18n
/// <summary>
/// Get language file for current user selected language
/// if couldn't find the current selected language file, it will first try to load en.xaml
/// if en.xaml couldn't find, it will pick up first *.xaml file
/// if en.xaml couldn't find, return empty string
/// </summary>
/// <param name="folder"></param>
/// <returns></returns>

View File

@@ -137,16 +137,8 @@ namespace Wox.Core.i18n
{
return english;
}
else
{
string file = Directory.GetFiles(folder).FirstOrDefault(o => o.EndsWith("xaml"));
if (string.IsNullOrEmpty(file))
{
throw new WoxI18nException(string.Format("Couldn't find language file from:{0}, current selected language:{1}"));
}
return Path.Combine(folder, file);
}
return string.Empty;
}
}