Add translations for system plugin command column

This commit is contained in:
Jack251970 2025-03-13 18:20:25 +08:00
parent 9b2816192e
commit bc0cde289c

View file

@ -28,8 +28,12 @@ namespace Flow.Launcher.Plugin.Sys
public Control CreateSettingPanel()
{
var results = Commands();
return new SysSettings(results);
var commands = Commands();
foreach (var c in commands)
{
c.Title = GetDynamicTitle(null, c);
}
return new SysSettings(commands);
}
public List<Result> Query(Query query)
@ -73,6 +77,11 @@ namespace Flow.Launcher.Plugin.Sys
var translatedTitle = context.API.GetTranslation(translationKey);
if (query == null)
{
return translatedTitle;
}
if (result.Title == translatedTitle)
{
return result.Title;