Browse Source

all: Fix typos found by codespell (#8833)

Dimitri Papadopoulos Orfanos 2 years ago
parent
commit
526e21ae26

+ 1 - 1
cmd/ursrv/main.go

@@ -894,7 +894,7 @@ func getReport(db *sql.DB) map[string]interface{} {
 	r["distributions"] = analyticsFor(distributions, len(knownDistributions))
 	r["featureOrder"] = featureOrder
 	r["locations"] = locations
-	r["contries"] = countryList
+	r["countries"] = countryList
 
 	return r
 }

+ 2 - 2
cmd/ursrv/static/index.html

@@ -275,7 +275,7 @@ found in the LICENSE file.
                 <div class="col-md-6">
                   <table class="table table-striped">
                     <tbody>
-                      {{range .contries | slice 2 1}}
+                      {{range .countries | slice 2 1}}
                       <tr>
                         <td style="width: 45%">{{.Key}}</td>
                         <td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>
@@ -291,7 +291,7 @@ found in the LICENSE file.
                 <div class="col-md-6">
                   <table class="table table-striped">
                     <tbody>
-                      {{range .contries | slice 2 2}}
+                      {{range .countries | slice 2 2}}
                       <tr>
                         <td style="width: 45%">{{.Key}}</td>
                         <td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>

+ 2 - 2
gui/default/syncthing/core/syncthingController.js

@@ -3378,7 +3378,7 @@ angular.module('syncthing.core')
                 return '';
             }
 
-            // When the user explicitely added a wild-card, we don't show hints.
+            // When the user explicitly added a wild-card, we don't show hints.
             if (filterEntries.length === 1 && filterEntries[0].match === '*') {
                 return '';
             }
@@ -3413,7 +3413,7 @@ angular.module('syncthing.core')
         };
 
         $scope.validateXattrFilter = function () {
-            // Fitlering out empty rules when saving the config
+            // Filtering out empty rules when saving the config
             $scope.currentFolder.xattrFilter.entries = $scope.currentFolder.xattrFilter.entries.filter(function (n) {
                 return n.match !== "";
             });

+ 1 - 1
lib/config/config_test.go

@@ -1368,7 +1368,7 @@ func startWrapper(wrapper Wrapper) *testWrapper {
 }
 
 func TestInternalVersioningConfiguration(t *testing.T) {
-	// Verify that the versioning configuration XML seralizes to something
+	// Verify that the versioning configuration XML serializes to something
 	// reasonable.
 
 	cfg := New(device1)

+ 2 - 2
lib/config/wrapper.go

@@ -328,8 +328,8 @@ func (w *wrapper) notifyListeners(from, to Configuration) Waiter {
 	wg := sync.NewWaitGroup()
 	wg.Add(len(w.subs))
 	for _, sub := range w.subs {
-		go func(commiter Committer) {
-			w.notifyListener(commiter, from, to)
+		go func(committer Committer) {
+			w.notifyListener(committer, from, to)
 			wg.Done()
 		}(sub)
 	}

+ 1 - 1
lib/fs/basicfs_xattr_bsdish.go

@@ -34,7 +34,7 @@ func listXattr(path string) ([]string, error) {
 		if errors.Is(err, unix.ERANGE) || size == len(buf) {
 			// Buffer is too small. Try again with a zero sized buffer to
 			// get the size, then allocate a buffer of the correct size. We
-			// inlude the size == len(buf) because apparently macOS doesn't
+			// include the size == len(buf) because apparently macOS doesn't
 			// return ERANGE as it should -- no harm done, just an extra
 			// read if we happened to need precisely 1024 bytes on the first
 			// pass.

+ 1 - 1
lib/model/folder.go

@@ -761,7 +761,7 @@ func (f *folder) scanSubdirsDeletedAndIgnored(subDirs []string, batch *scanBatch
 				fallthrough
 			case !file.IsIgnored() && !file.IsDeleted() && !file.IsUnsupported():
 				// The file is not ignored, deleted or unsupported. Lets check if
-				// it's still here. Simply stat:ing it wont do as there are
+				// it's still here. Simply stat:ing it won't do as there are
 				// tons of corner cases (e.g. parent dir->symlink, missing
 				// permissions)
 				if !osutil.IsDeleted(f.mtimefs, file.Name) {

+ 1 - 1
lib/model/model.go

@@ -1906,7 +1906,7 @@ func (m *model) Request(deviceID protocol.DeviceID, folder, name string, _, size
 		if err == nil && scanner.Validate(res.data, hash, weakHash) {
 			return res, nil
 		}
-		// Fall through to reading from a non-temp file, just incase the temp
+		// Fall through to reading from a non-temp file, just in case the temp
 		// file has finished downloading.
 	}
 

+ 1 - 1
lib/model/model_test.go

@@ -3957,7 +3957,7 @@ func TestIssue6961(t *testing.T) {
 	must(t, tfs.Remove(name))
 	m.ScanFolders()
 
-	// Drop ther remote index, add some other file.
+	// Drop the remote index, add some other file.
 	must(t, m.Index(device2, fcfg.ID, []protocol.FileInfo{{Name: "bar", RawInvalid: true, Sequence: 1}}))
 
 	// Pause and unpause folder to create new db.FileSet and thus recalculate everything

+ 1 - 1
lib/model/requests_test.go

@@ -751,7 +751,7 @@ func TestRequestRemoteRenameChanged(t *testing.T) {
 					t.Error("Got more than one index update for", f.Name)
 				}
 				if f.Version.Counter(fc.id.Short()) == 0 {
-					// This index entry might be superseeded
+					// This index entry might be superseded
 					// by the final one or sent before it separately.
 					break
 				}

+ 1 - 1
man/syncthing-rest-api.7

@@ -1994,7 +1994,7 @@ These endpoints require the \fBgui.debugging\fP configuration option to
 be enabled and yield an access denied error code otherwise.
 .SS GET /rest/debug/peerCompletion
 .sp
-Summarizes the completion precentage for each remote device.  Returns an object
+Summarizes the completion percentage for each remote device.  Returns an object
 with device IDs as keys and an integer percentage as values.
 .SS GET /rest/debug/httpmetrics
 .sp

+ 6 - 6
next-gen-gui/src/app/http-interceptors/caching.interceptor.ts

@@ -16,8 +16,8 @@ export class CachingInterceptor implements HttpInterceptor {
   constructor(private cache: RequestCacheService) { }
 
   intercept(req: HttpRequest<any>, next: HttpHandler) {
-    // continue if not cachable.
-    if (!isCachable(req)) { return next.handle(req); }
+    // continue if not cacheable.
+    if (!isCacheable(req)) { return next.handle(req); }
 
     const cachedResponse = this.cache.get(req);
     return cachedResponse ?
@@ -25,9 +25,9 @@ export class CachingInterceptor implements HttpInterceptor {
   }
 }
 
-/** Is this request cachable? */
-function isCachable(req: HttpRequest<any>) {
-  // Only GET requests are cachable
+/** Is this request cacheable? */
+function isCacheable(req: HttpRequest<any>) {
+  // Only GET requests are cacheable
   return req.method === 'GET';
   /*
   return req.method === 'GET' &&
@@ -55,4 +55,4 @@ function sendRequest(
       }
     })
   );
-}
+}

+ 2 - 2
next-gen-gui/src/app/services/db-completion.service.ts

@@ -36,7 +36,7 @@ export class DbCompletionService {
       .get<Completion>(this.dbStatusUrl, httpOptions)
       .pipe(
         map(res => {
-          // Remove from array in developement
+          // Remove from array in development
           // in-memory-web-api returns arrays
           if (!environment.production) {
             const a: any = res as any;
@@ -48,4 +48,4 @@ export class DbCompletionService {
         })
       );
   }
-}
+}

+ 2 - 2
next-gen-gui/src/app/services/db-status.service.ts

@@ -28,7 +28,7 @@ export class DbStatusService {
       .get<Folder.Status>(this.dbStatusUrl, httpOptions)
       .pipe(
         map(res => {
-          // Remove from array in developement
+          // Remove from array in development
           // in-memory-web-api returns arrays
           if (!environment.production) {
             const a: any = res as any;
@@ -40,4 +40,4 @@ export class DbStatusService {
         })
       );
   }
-}
+}