Remove Area Subtitle in WindowsSettings issue & call OnCultureInfoChanged when changing language

This commit is contained in:
Hongtao Zhang 2021-12-11 12:28:11 -06:00
parent 1f64dc8e94
commit 456ba61d30
3 changed files with 4 additions and 5 deletions

View file

@ -176,12 +176,12 @@ namespace Flow.Launcher.Core.Resource
{
foreach (var p in PluginManager.GetPluginsForInterface<IPluginI18n>())
{
var pluginI18N = p.Plugin as IPluginI18n;
if (pluginI18N == null) return;
if (p.Plugin is not IPluginI18n pluginI18N) continue;
try
{
p.Metadata.Name = pluginI18N.GetTranslatedPluginTitle();
p.Metadata.Description = pluginI18N.GetTranslatedPluginDescription();
pluginI18N.OnCultureInfoChanged(CultureInfo.CurrentCulture);
}
catch (Exception e)
{

View file

@ -54,7 +54,6 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
if (areaMatch.IsSearchPrecisionScoreMet())
{
var settingResult = NewSettingResult(areaMatch.Score + midScore, entry.Type);
settingResult.SubTitleHighlightData = areaMatch.MatchData.Select(x => x + 6).ToList();
result = settingResult;
}
else

View file

@ -90,7 +90,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings
/// <param name="query">The query to filter the list.</param>
/// <returns>A filtered list, can be empty when nothing was found.</returns>
public List<Result> Query(Query query)
{
{
var newList = ResultHelper.GetResultList(_translatedSettingList, query, windowSettingsIconPath, controlPanelIconPath);
return newList;
}
@ -147,4 +147,4 @@ namespace Flow.Launcher.Plugin.WindowsSettings
return Description;
}
}
}
}