diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index ddb469517..7481cfff8 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -35,3 +35,23 @@ mscorlib pythonw dotnet winget +jjw24 +wolframalpha +gmail +duckduckgo +facebook +findicon +baidu +pls +websearch +qianlifeng +userdata +srchadmin +EWX +dlgtext +CMD +appref-ms +appref +TSource +runas +dpi \ No newline at end of file diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt index 73095a638..0c1ac44cf 100644 --- a/.github/actions/spelling/patterns.txt +++ b/.github/actions/spelling/patterns.txt @@ -108,3 +108,7 @@ # Localization keys #x:Key="[^"]+" #{DynamicResource [^"]+} + + +# html tag +<\w+[^>]*> \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml index a7b8bcb9c..39807db2c 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml @@ -55,7 +55,7 @@ File suffixes can't be empty Protocols can't be empty - File Suffixes + File Suffixes URL Protocols Steam Games Epic Games diff --git a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml index e4467a8b6..71bc12a86 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml @@ -162,7 +162,7 @@ Margin="0,0,0,8" FontSize="16" FontWeight="SemiBold" - Text="{DynamicResource flowlauncher_plugin_program_suffixes_excutable_types}" /> + Text="{DynamicResource flowlauncher_plugin_program_suffixes_executable_types}" /> (); + var apps = new List(); // WinRT var appListEntries = package.GetAppListEntries(); foreach (var app in appListEntries) @@ -46,7 +46,7 @@ namespace Flow.Launcher.Plugin.Program.Programs try { var tmp = new Application(app, this); - applist.Add(tmp); + apps.Add(tmp); } catch (Exception e) { @@ -55,7 +55,7 @@ namespace Flow.Launcher.Plugin.Program.Programs + $"{FullName} from location {Location}", e); } } - Apps = applist.ToArray(); + Apps = apps.ToArray(); try { @@ -392,14 +392,14 @@ namespace Flow.Launcher.Plugin.Program.Programs { title = $"{Name}: {Description}"; var nameMatch = StringMatcher.FuzzySearch(query, Name); - var desciptionMatch = StringMatcher.FuzzySearch(query, Description); - if (desciptionMatch.Score > nameMatch.Score) + var descriptionMatch = StringMatcher.FuzzySearch(query, Description); + if (descriptionMatch.Score > nameMatch.Score) { - for (int i = 0; i < desciptionMatch.MatchData.Count; i++) + for (int i = 0; i < descriptionMatch.MatchData.Count; i++) { - desciptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": " + descriptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": " } - matchResult = desciptionMatch; + matchResult = descriptionMatch; } else matchResult = nameMatch; } @@ -658,8 +658,8 @@ namespace Flow.Launcher.Plugin.Program.Programs // var brush = new SolidColorBrush(color); // var pen = new Pen(brush, 1); // var backgroundArea = new Rect(0, 0, width, width); - // var rectabgle = new RectangleGeometry(backgroundArea); - // var rectDrawing = new GeometryDrawing(brush, pen, rectabgle); + // var rectangle = new RectangleGeometry(backgroundArea); + // var rectDrawing = new GeometryDrawing(brush, pen, rectangle); // group.Children.Add(rectDrawing); // var imageArea = new Rect(x, y, image.Width, image.Height); diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index f8c220610..91841827e 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -30,7 +30,7 @@ namespace Flow.Launcher.Plugin.Program.Programs /// public string FullPath { get; set; } /// - /// Path of the excutable for .lnk, or the URL for .url. Arguments are included if any. + /// Path of the executable for .lnk, or the URL for .url. Arguments are included if any. /// public string LnkResolvedPath { get; set; } /// @@ -495,12 +495,12 @@ namespace Flow.Launcher.Plugin.Program.Programs .Distinct(); } - private static string GetProgramPathFromRegistrySubKeys(RegistryKey root, string subkey) + private static string GetProgramPathFromRegistrySubKeys(RegistryKey root, string subKey) { var path = string.Empty; try { - using (var key = root.OpenSubKey(subkey)) + using (var key = root.OpenSubKey(subKey)) { if (key == null) return string.Empty; @@ -577,7 +577,7 @@ namespace Flow.Launcher.Plugin.Program.Programs private static IEnumerable ProgramsHasher(IEnumerable programs) { - // TODO: Unable to distinguish multiple lnks to the same excutable but with different params + // TODO: Unable to distinguish multiple lnks to the same executable but with different params return programs.GroupBy(p => p.ExecutablePath.ToLowerInvariant()) .AsParallel() .SelectMany(g => diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index 7ce597b96..f64f5d376 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -33,7 +33,7 @@ namespace Flow.Launcher.Plugin.Shell string cmd = query.Search; if (string.IsNullOrEmpty(cmd)) { - return ResultsFromlHistory(); + return ResultsFromHistory(); } else { @@ -55,8 +55,8 @@ namespace Flow.Launcher.Plugin.Shell else if (Directory.Exists(Path.GetDirectoryName(excmd) ?? string.Empty)) { basedir = Path.GetDirectoryName(excmd); - var dirn = Path.GetDirectoryName(cmd); - dir = (dirn.EndsWith("/") || dirn.EndsWith(@"\")) ? dirn : cmd.Substring(0, dirn.Length + 1); + var dirName = Path.GetDirectoryName(cmd); + dir = (dirName.EndsWith("/") || dirName.EndsWith(@"\")) ? dirName : cmd.Substring(0, dirName.Length + 1); } if (basedir != null) @@ -158,7 +158,7 @@ namespace Flow.Launcher.Plugin.Shell return result; } - private List ResultsFromlHistory() + private List ResultsFromHistory() { IEnumerable history = _settings.CommandHistory.OrderByDescending(o => o.Value) .Select(m => new Result @@ -204,7 +204,7 @@ namespace Flow.Launcher.Plugin.Shell info.Arguments = $"{(_settings.LeaveShellOpen ? "/k" : "/c")} {command}"; //// Use info.Arguments instead of info.ArgumentList to enable users better control over the arguments they are writing. - //// Previous code using ArgumentList, commands needed to be seperated correctly: + //// Previous code using ArgumentList, commands needed to be separated correctly: //// Incorrect: // info.ArgumentList.Add(_settings.LeaveShellOpen ? "/k" : "/c"); // info.ArgumentList.Add(command); //<== info.ArgumentList.Add("mkdir \"c:\\test new\""); @@ -377,9 +377,9 @@ namespace Flow.Launcher.Plugin.Shell public List LoadContextMenus(Result selectedResult) { - var resultlist = new List + var results = new List { - new Result + new() { Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"), AsyncAction = async c => @@ -390,7 +390,7 @@ namespace Flow.Launcher.Plugin.Shell IcoPath = "Images/user.png", Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee") }, - new Result + new() { Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_administrator"), Action = c => @@ -401,7 +401,7 @@ namespace Flow.Launcher.Plugin.Shell IcoPath = "Images/admin.png", Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef") }, - new Result + new() { Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"), Action = c => @@ -414,7 +414,7 @@ namespace Flow.Launcher.Plugin.Shell } }; - return resultlist; + return results; } } } diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 9e4a4ed1c..43f293f74 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -95,11 +95,11 @@ namespace Flow.Launcher.Plugin.Sys IcoPath = "Images\\shutdown.png", Action = c => { - var reuslt = MessageBox.Show( + var result = MessageBox.Show( context.API.GetTranslation("flowlauncher_plugin_sys_dlgtext_shutdown_computer"), context.API.GetTranslation("flowlauncher_plugin_sys_shutdown_computer"), MessageBoxButton.YesNo, MessageBoxImage.Warning); - if (reuslt == MessageBoxResult.Yes) + if (result == MessageBoxResult.Yes) { Process.Start("shutdown", "/s /t 0"); } diff --git a/Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml index eff1ac263..461ccd197 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml @@ -7,7 +7,7 @@ New Tab Open url:{0} - Can't open url:{0} + Can't open url:{0} URL Open the typed URL from Flow Launcher diff --git a/Plugins/Flow.Launcher.Plugin.Url/Main.cs b/Plugins/Flow.Launcher.Plugin.Url/Main.cs index c507f0b1c..4831bac1d 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Url/Main.cs @@ -74,7 +74,7 @@ namespace Flow.Launcher.Plugin.Url } catch(Exception) { - context.API.ShowMsg(string.Format(context.API.GetTranslation("flowlauncher_plugin_url_canot_open_url"), raw)); + context.API.ShowMsg(string.Format(context.API.GetTranslation("flowlauncher_plugin_url_cannot_open_url"), raw)); return false; } } diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs index c19396da0..60863ee82 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs @@ -21,16 +21,16 @@ namespace Flow.Launcher.Plugin.WebSearch { _oldSearchSource = old; _viewModel = new SearchSourceViewModel {SearchSource = old.DeepCopy()}; - Initilize(sources, context, Action.Edit); + Initialize(sources, context, Action.Edit); } public SearchSourceSettingWindow(IList sources, PluginInitContext context) { _viewModel = new SearchSourceViewModel {SearchSource = new SearchSource()}; - Initilize(sources, context, Action.Add); + Initialize(sources, context, Action.Add); } - private async void Initilize(IList sources, PluginInitContext context, Action action) + private async void Initialize(IList sources, PluginInitContext context, Action action) { InitializeComponent(); DataContext = _viewModel; diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index 38d06b2cb..0bfb00b34 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -18,7 +18,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper public static void Init(IPublicAPI api) => _api = api; - private static List GetDefaultReuslts(in IEnumerable list, + private static List GetDefaultResults(in IEnumerable list, string windowsSettingIconPath, string controlPanelIconPath) { @@ -45,7 +45,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper { if (string.IsNullOrWhiteSpace(query.Search)) { - return GetDefaultReuslts(list, windowsSettingIconPath, controlPanelIconPath); + return GetDefaultResults(list, windowsSettingIconPath, controlPanelIconPath); } var resultList = new List(); @@ -110,7 +110,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper return resultList; } - private const int TaskLinkScorePanelty = 50; + private const int TaskLinkScorePenalty = 50; private static Result NewSettingResult(int score, string type, string windowsSettingIconPath, string controlPanelIconPath, WindowsSetting entry) => new() { @@ -120,7 +120,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper SubTitle = GetSubtitle(entry.Area, type), Title = entry.Name, ContextData = entry, - Score = score - (type == "TaskLink" ? TaskLinkScorePanelty : 0), + Score = score - (type == "TaskLink" ? TaskLinkScorePenalty : 0), }; private static string GetSubtitle(string section, string entryType)