mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Add translations for Program plugin.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user