Skip to content

Commit a07df29

Browse files
Merge pull request #1753 from Flow-Launcher/fix_spelling
fix some spelling
2 parents c121597 + f7f82a7 commit a07df29

File tree

12 files changed

+69
-45
lines changed

12 files changed

+69
-45
lines changed

.github/actions/spelling/expect.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,25 @@ mscorlib
3535
pythonw
3636
dotnet
3737
winget
38+
jjw24
39+
wolframalpha
40+
gmail
41+
duckduckgo
42+
facebook
43+
findicon
44+
baidu
45+
pls
46+
websearch
47+
qianlifeng
48+
userdata
49+
srchadmin
50+
EWX
51+
dlgtext
52+
CMD
53+
appref-ms
54+
appref
55+
TSource
56+
runas
57+
dpi
58+
popup
59+
ptr

.github/actions/spelling/patterns.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
#x:Key="[^"]+"
110110
#{DynamicResource [^"]+}
111111

112+
# html tag
113+
<\w+[^>]*>
114+
112115
#http/https
113116
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]
114-

Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<system:String x:Key="flowlauncher_plugin_program_suffixes_cannot_empty">File suffixes can't be empty</system:String>
5656
<system:String x:Key="flowlauncher_plugin_protocols_cannot_empty">Protocols can't be empty</system:String>
5757

58-
<system:String x:Key="flowlauncher_plugin_program_suffixes_excutable_types">File Suffixes</system:String>
58+
<system:String x:Key="flowlauncher_plugin_program_suffixes_executable_types">File Suffixes</system:String>
5959
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_types">URL Protocols</system:String>
6060
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_steam">Steam Games</system:String>
6161
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_epic">Epic Games</system:String>

Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
Margin="0,0,0,8"
163163
FontSize="16"
164164
FontWeight="SemiBold"
165-
Text="{DynamicResource flowlauncher_plugin_program_suffixes_excutable_types}" />
165+
Text="{DynamicResource flowlauncher_plugin_program_suffixes_executable_types}" />
166166
<CheckBox
167167
Name="apprefMS"
168168
Margin="10,0,0,0"

Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public UWP(Package package)
3838

3939
public void InitAppsInPackage(Package package)
4040
{
41-
var applist = new List<Application>();
41+
var apps = new List<Application>();
4242
// WinRT
4343
var appListEntries = package.GetAppListEntries();
4444
foreach (var app in appListEntries)
4545
{
4646
try
4747
{
4848
var tmp = new Application(app, this);
49-
applist.Add(tmp);
49+
apps.Add(tmp);
5050
}
5151
catch (Exception e)
5252
{
@@ -55,7 +55,7 @@ public void InitAppsInPackage(Package package)
5555
+ $"{FullName} from location {Location}", e);
5656
}
5757
}
58-
Apps = applist.ToArray();
58+
Apps = apps.ToArray();
5959

6060
try
6161
{
@@ -147,7 +147,7 @@ private PackageVersion GetPackageVersionFromManifest(XmlNode xmlRoot)
147147
}
148148

149149
ProgramLogger.LogException($"|UWP|GetPackageVersionFromManifest|{Location}" +
150-
"|Trying to get the package version of the UWP program, but an unknown UWP appmanifest version in package "
150+
"|Trying to get the package version of the UWP program, but an unknown UWP app-manifest version in package "
151151
+ $"{FullName} from location {Location}", new FormatException());
152152
return PackageVersion.Unknown;
153153
}
@@ -392,14 +392,14 @@ public Result Result(string query, IPublicAPI api)
392392
{
393393
title = $"{Name}: {Description}";
394394
var nameMatch = StringMatcher.FuzzySearch(query, Name);
395-
var desciptionMatch = StringMatcher.FuzzySearch(query, Description);
396-
if (desciptionMatch.Score > nameMatch.Score)
395+
var descriptionMatch = StringMatcher.FuzzySearch(query, Description);
396+
if (descriptionMatch.Score > nameMatch.Score)
397397
{
398-
for (int i = 0; i < desciptionMatch.MatchData.Count; i++)
398+
for (int i = 0; i < descriptionMatch.MatchData.Count; i++)
399399
{
400-
desciptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": "
400+
descriptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": "
401401
}
402-
matchResult = desciptionMatch;
402+
matchResult = descriptionMatch;
403403
}
404404
else matchResult = nameMatch;
405405
}
@@ -633,7 +633,7 @@ string TryToFindLogo(string uri, string path, int px)
633633
// }
634634
// else
635635
// {
636-
// ProgramLogger.LogException($"|UWP|ImageFromPath|{(string.IsNullOrEmpty(path) ? "Not Avaliable" : path)}" +
636+
// ProgramLogger.LogException($"|UWP|ImageFromPath|{(string.IsNullOrEmpty(path) ? "Not Available" : path)}" +
637637
// $"|Unable to get logo for {UserModelId} from {path} and" +
638638
// $" located in {Location}", new FileNotFoundException());
639639
// return new BitmapImage(new Uri(Constant.MissingImgIcon));
@@ -658,8 +658,8 @@ string TryToFindLogo(string uri, string path, int px)
658658
// var brush = new SolidColorBrush(color);
659659
// var pen = new Pen(brush, 1);
660660
// var backgroundArea = new Rect(0, 0, width, width);
661-
// var rectabgle = new RectangleGeometry(backgroundArea);
662-
// var rectDrawing = new GeometryDrawing(brush, pen, rectabgle);
661+
// var rectangle = new RectangleGeometry(backgroundArea);
662+
// var rectDrawing = new GeometryDrawing(brush, pen, rectangle);
663663
// group.Children.Add(rectDrawing);
664664

665665
// var imageArea = new Rect(x, y, image.Width, image.Height);

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class Win32 : IProgram, IEquatable<Win32>
3030
/// </summary>
3131
public string FullPath { get; set; }
3232
/// <summary>
33-
/// Path of the excutable for .lnk, or the URL for .url. Arguments are included if any.
33+
/// Path of the executable for .lnk, or the URL for .url. Arguments are included if any.
3434
/// </summary>
3535
public string LnkResolvedPath { get; set; }
3636
/// <summary>
@@ -84,14 +84,14 @@ public Result Result(string query, IPublicAPI api)
8484
{
8585
title = $"{Name}: {Description}";
8686
var nameMatch = StringMatcher.FuzzySearch(query, Name);
87-
var desciptionMatch = StringMatcher.FuzzySearch(query, Description);
88-
if (desciptionMatch.Score > nameMatch.Score)
87+
var descriptionMatch = StringMatcher.FuzzySearch(query, Description);
88+
if (descriptionMatch.Score > nameMatch.Score)
8989
{
90-
for (int i = 0; i < desciptionMatch.MatchData.Count; i++)
90+
for (int i = 0; i < descriptionMatch.MatchData.Count; i++)
9191
{
92-
desciptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": "
92+
descriptionMatch.MatchData[i] += Name.Length + 2; // 2 is ": "
9393
}
94-
matchResult = desciptionMatch;
94+
matchResult = descriptionMatch;
9595
}
9696
else matchResult = nameMatch;
9797
}
@@ -495,12 +495,12 @@ private static IEnumerable<string> GetPathFromRegistry(RegistryKey root)
495495
.Distinct();
496496
}
497497

498-
private static string GetProgramPathFromRegistrySubKeys(RegistryKey root, string subkey)
498+
private static string GetProgramPathFromRegistrySubKeys(RegistryKey root, string subKey)
499499
{
500500
var path = string.Empty;
501501
try
502502
{
503-
using (var key = root.OpenSubKey(subkey))
503+
using (var key = root.OpenSubKey(subKey))
504504
{
505505
if (key == null)
506506
return string.Empty;
@@ -577,7 +577,7 @@ public static IEnumerable<T> DistinctBy<T, R>(IEnumerable<T> source, Func<T, R>
577577

578578
private static IEnumerable<Win32> ProgramsHasher(IEnumerable<Win32> programs)
579579
{
580-
// TODO: Unable to distinguish multiple lnks to the same excutable but with different params
580+
// TODO: Unable to distinguish multiple lnks to the same executable but with different params
581581
return programs.GroupBy(p => p.ExecutablePath.ToLowerInvariant())
582582
.AsParallel()
583583
.SelectMany(g =>

Plugins/Flow.Launcher.Plugin.Shell/Main.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public List<Result> Query(Query query)
3333
string cmd = query.Search;
3434
if (string.IsNullOrEmpty(cmd))
3535
{
36-
return ResultsFromlHistory();
36+
return ResultsFromHistory();
3737
}
3838
else
3939
{
@@ -55,8 +55,8 @@ public List<Result> Query(Query query)
5555
else if (Directory.Exists(Path.GetDirectoryName(excmd) ?? string.Empty))
5656
{
5757
basedir = Path.GetDirectoryName(excmd);
58-
var dirn = Path.GetDirectoryName(cmd);
59-
dir = (dirn.EndsWith("/") || dirn.EndsWith(@"\")) ? dirn : cmd.Substring(0, dirn.Length + 1);
58+
var dirName = Path.GetDirectoryName(cmd);
59+
dir = (dirName.EndsWith("/") || dirName.EndsWith(@"\")) ? dirName : cmd.Substring(0, dirName.Length + 1);
6060
}
6161

6262
if (basedir != null)
@@ -158,7 +158,7 @@ private Result GetCurrentCmd(string cmd)
158158
return result;
159159
}
160160

161-
private List<Result> ResultsFromlHistory()
161+
private List<Result> ResultsFromHistory()
162162
{
163163
IEnumerable<Result> history = _settings.CommandHistory.OrderByDescending(o => o.Value)
164164
.Select(m => new Result
@@ -204,7 +204,7 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
204204
info.Arguments = $"{(_settings.LeaveShellOpen ? "/k" : "/c")} {command}";
205205

206206
//// Use info.Arguments instead of info.ArgumentList to enable users better control over the arguments they are writing.
207-
//// Previous code using ArgumentList, commands needed to be seperated correctly:
207+
//// Previous code using ArgumentList, commands needed to be separated correctly:
208208
//// Incorrect:
209209
// info.ArgumentList.Add(_settings.LeaveShellOpen ? "/k" : "/c");
210210
// info.ArgumentList.Add(command); //<== info.ArgumentList.Add("mkdir \"c:\\test new\"");
@@ -377,9 +377,9 @@ public string GetTranslatedPluginDescription()
377377

378378
public List<Result> LoadContextMenus(Result selectedResult)
379379
{
380-
var resultlist = new List<Result>
380+
var results = new List<Result>
381381
{
382-
new Result
382+
new()
383383
{
384384
Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"),
385385
AsyncAction = async c =>
@@ -390,7 +390,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
390390
IcoPath = "Images/user.png",
391391
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee")
392392
},
393-
new Result
393+
new()
394394
{
395395
Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_administrator"),
396396
Action = c =>
@@ -401,7 +401,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
401401
IcoPath = "Images/admin.png",
402402
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef")
403403
},
404-
new Result
404+
new()
405405
{
406406
Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"),
407407
Action = c =>
@@ -414,7 +414,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
414414
}
415415
};
416416

417-
return resultlist;
417+
return results;
418418
}
419419
}
420420
}

Plugins/Flow.Launcher.Plugin.Sys/Main.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ private List<Result> Commands()
9595
IcoPath = "Images\\shutdown.png",
9696
Action = c =>
9797
{
98-
var reuslt = MessageBox.Show(
98+
var result = MessageBox.Show(
9999
context.API.GetTranslation("flowlauncher_plugin_sys_dlgtext_shutdown_computer"),
100100
context.API.GetTranslation("flowlauncher_plugin_sys_shutdown_computer"),
101101
MessageBoxButton.YesNo, MessageBoxImage.Warning);
102-
if (reuslt == MessageBoxResult.Yes)
102+
if (result == MessageBoxResult.Yes)
103103
{
104104
Process.Start("shutdown", "/s /t 0");
105105
}

Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<system:String x:Key="flowlauncher_plugin_new_tab">New Tab</system:String>
88

99
<system:String x:Key="flowlauncher_plugin_url_open_url">Open url:{0}</system:String>
10-
<system:String x:Key="flowlauncher_plugin_url_canot_open_url">Can't open url:{0}</system:String>
10+
<system:String x:Key="flowlauncher_plugin_url_cannot_open_url">Can't open url:{0}</system:String>
1111

1212
<system:String x:Key="flowlauncher_plugin_url_plugin_name">URL</system:String>
1313
<system:String x:Key="flowlauncher_plugin_url_plugin_description">Open the typed URL from Flow Launcher</system:String>

Plugins/Flow.Launcher.Plugin.Url/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public List<Result> Query(Query query)
7474
}
7575
catch(Exception)
7676
{
77-
context.API.ShowMsg(string.Format(context.API.GetTranslation("flowlauncher_plugin_url_canot_open_url"), raw));
77+
context.API.ShowMsg(string.Format(context.API.GetTranslation("flowlauncher_plugin_url_cannot_open_url"), raw));
7878
return false;
7979
}
8080
}

0 commit comments

Comments
 (0)