From 32a76901a91ff0f663db6f0830e0aedec946e4d0 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Tue, 28 Apr 2015 18:34:55 +0300 Subject: [PATCH] typos and spelling correction --- README.md | 2 +- cmd/syncthing/connections.go | 6 +++--- cmd/syncthing/monitor.go | 2 +- cmd/syncthing/summarysvc.go | 2 +- gui/scripts/syncthing/app.js | 2 +- gui/scripts/syncthing/core/controllers/eventController.js | 2 +- .../syncthing/core/controllers/syncthingController.js | 2 +- .../syncthing/core/directives/languageSelectDirective.js | 2 +- gui/scripts/syncthing/core/services/localeService.js | 2 +- internal/discover/discover_test.go | 6 +++--- internal/model/model.go | 2 +- internal/model/progressemitter.go | 2 +- internal/model/rwfolder.go | 6 +++--- internal/model/rwfolder_test.go | 2 +- internal/scanner/walk.go | 4 ++-- internal/scanner/walk_test.go | 2 +- internal/symlinks/symlink_windows.go | 2 +- internal/upgrade/testdata/github-releases.json | 2 +- internal/versioner/util.go | 2 +- test/util.go | 2 +- 20 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 2c14ee418..128fe5a22 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This is the `syncthing` project which pursues the following goals: 2. Provide the reference implementation to demonstrate the usability of said protocol. This is the `syncthing` utility. We hope that - alternative, compatible implementations of the protocol will arrise. + alternative, compatible implementations of the protocol will arise. The two are evolving together; the protocol is not to be considered stable until syncthing 1.0 is released, at which point it is locked down diff --git a/cmd/syncthing/connections.go b/cmd/syncthing/connections.go index 2a275cf5e..4508455a9 100644 --- a/cmd/syncthing/connections.go +++ b/cmd/syncthing/connections.go @@ -22,7 +22,7 @@ import ( ) // The connection service listens on TLS and dials configured unconnected -// devices. Successfull connections are handed to the model. +// devices. Successful connections are handed to the model. type connectionSvc struct { *suture.Supervisor cfg *config.Wrapper @@ -116,7 +116,7 @@ next: remoteID := protocol.NewDeviceID(remoteCert.Raw) // The device ID should not be that of ourselves. It can happen - // though, especially in the presense of NAT hairpinning, multiple + // though, especially in the presence of NAT hairpinning, multiple // clients between the same NAT gateway, and global discovery. if remoteID == myID { l.Infof("Connected to myself (%s) - should not happen", remoteID) @@ -128,7 +128,7 @@ next: // could use some better handling. If the old connection is dead but // hasn't timed out yet we may want to drop *that* connection and keep // this one. But in case we are two devices connecting to each other - // in parallell we don't want to do that or we end up with no + // in parallel we don't want to do that or we end up with no // connections still established... if s.model.ConnectedTo(remoteID) { l.Infof("Connected to already connected device (%s)", remoteID) diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index 9743adcc9..5182efab7 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -124,7 +124,7 @@ func monitorMain() { case err = <-exit: if err == nil { - // Successfull exit indicates an intentional shutdown + // Successful exit indicates an intentional shutdown return } else if exiterr, ok := err.(*exec.ExitError); ok { if status, ok := exiterr.Sys().(syscall.WaitStatus); ok { diff --git a/cmd/syncthing/summarysvc.go b/cmd/syncthing/summarysvc.go index 983cf4452..5d287aeea 100644 --- a/cmd/syncthing/summarysvc.go +++ b/cmd/syncthing/summarysvc.go @@ -132,7 +132,7 @@ func (c *folderSummarySvc) calculateSummaries() { // foldersToHandle returns the list of folders needing a summary update, and // clears the list. func (c *folderSummarySvc) foldersToHandle() []string { - // We only recalculate sumamries if someone is listening to events + // We only recalculate summaries if someone is listening to events // (a request to /rest/events has been made within the last // pingEventInterval). diff --git a/gui/scripts/syncthing/app.js b/gui/scripts/syncthing/app.js index 7f04e3d45..1578e1592 100644 --- a/gui/scripts/syncthing/app.js +++ b/gui/scripts/syncthing/app.js @@ -47,7 +47,7 @@ syncthing.config(function ($httpProvider, $translateProvider, LocaleServiceProvi }); -// @TODO: extract global level functions into seperate service(s) +// @TODO: extract global level functions into separate service(s) function deviceCompare(a, b) { if (typeof a.name !== 'undefined' && typeof b.name !== 'undefined') { diff --git a/gui/scripts/syncthing/core/controllers/eventController.js b/gui/scripts/syncthing/core/controllers/eventController.js index f72da69ba..aab6201f7 100644 --- a/gui/scripts/syncthing/core/controllers/eventController.js +++ b/gui/scripts/syncthing/core/controllers/eventController.js @@ -12,7 +12,7 @@ angular.module('syncthing.core') // progress the browser on some platforms returns a 200 (since the // headers has been flushed with the return code 200), with no data. // This basically means that the connection has been reset, and the call - // was not actually sucessful. + // was not actually successful. if (!data) { errorFn(data); return; diff --git a/gui/scripts/syncthing/core/controllers/syncthingController.js b/gui/scripts/syncthing/core/controllers/syncthingController.js index 84fd71029..2aa50e584 100644 --- a/gui/scripts/syncthing/core/controllers/syncthingController.js +++ b/gui/scripts/syncthing/core/controllers/syncthingController.js @@ -220,7 +220,7 @@ angular.module('syncthing.core') var copiedFromElsewhere = 100 * s.copiedFromElsewhere / s.total; var pulled = 100 * s.pulled / s.total; var pulling = 100 * s.pulling / s.total; - // We try to round up pulling to atleast a percent so that it would be atleast a bit visible. + // We try to round up pulling to at least a percent so that it would be at least a bit visible. if (pulling < 1 && pulled + copiedFromElsewhere + copiedFromOrigin + reused <= 99) { pulling = 1; } diff --git a/gui/scripts/syncthing/core/directives/languageSelectDirective.js b/gui/scripts/syncthing/core/directives/languageSelectDirective.js index a92e989d0..d9815e367 100644 --- a/gui/scripts/syncthing/core/directives/languageSelectDirective.js +++ b/gui/scripts/syncthing/core/directives/languageSelectDirective.js @@ -27,7 +27,7 @@ angular.module('syncthing.core') $scope.localesNames = availableLocaleNames; $scope.visible = $scope.localesNames && $scope.localesNames['en']; - // using $watch cause LocaleService.currentLocale will be change after recive async query accpeted-languages + // using $watch cause LocaleService.currentLocale will be change after receive async query accepted-languages // in LocaleService.readBrowserLocales var remove_watch = $scope.$watch(LocaleService.getCurrentLocale, function (newValue) { if (newValue) { diff --git a/gui/scripts/syncthing/core/services/localeService.js b/gui/scripts/syncthing/core/services/localeService.js index fe4ea3a09..874c4294d 100644 --- a/gui/scripts/syncthing/core/services/localeService.js +++ b/gui/scripts/syncthing/core/services/localeService.js @@ -42,7 +42,7 @@ angular.module('syncthing.core') * @returns promise which on success resolves with a locales array */ function readBrowserLocales() { - // @TODO: check if there is nice way to utilize window.navigator.languages or similiar api. + // @TODO: check if there is nice way to utilize window.navigator.languages or similar api. return $http.get(urlbase + "/svc/lang"); } diff --git a/internal/discover/discover_test.go b/internal/discover/discover_test.go index 97f4371d8..c49756842 100644 --- a/internal/discover/discover_test.go +++ b/internal/discover/discover_test.go @@ -95,7 +95,7 @@ func TestGlobalDiscovery(t *testing.T) { addrs := d.Lookup(device) if len(addrs) != 2 { - t.Fatal("Wrong numer of addresses", addrs) + t.Fatal("Wrong number of addresses", addrs) } for _, addr := range []string{"test.com:1234", "best.com:2345"} { @@ -119,10 +119,10 @@ func TestGlobalDiscovery(t *testing.T) { addrs = d.Lookup(device) if len(addrs) != 2 { - t.Fatal("Wrong numer of addresses", addrs) + t.Fatal("Wrong number of addresses", addrs) } - // Answer should be cached, so number of lookups should have not incresed + // Answer should be cached, so number of lookups should have not increased for _, c := range []*DummyClient{c1, c2, c3} { if len(c.lookups) != 1 || c.lookups[0] != device { t.Fatal("Wrong lookups") diff --git a/internal/model/model.go b/internal/model/model.go index 68ab469c6..517faca28 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -1626,7 +1626,7 @@ func (m *Model) String() string { func symlinkInvalid(isLink bool) bool { if !symlinks.Supported && isLink { SymlinkWarning.Do(func() { - l.Warnln("Symlinks are disabled, unsupported or require Administrator priviledges. This might cause your folder to appear out of sync.") + l.Warnln("Symlinks are disabled, unsupported or require Administrator privileges. This might cause your folder to appear out of sync.") }) return true } diff --git a/internal/model/progressemitter.go b/internal/model/progressemitter.go index bb31b4778..397127aca 100755 --- a/internal/model/progressemitter.go +++ b/internal/model/progressemitter.go @@ -113,7 +113,7 @@ func (t *ProgressEmitter) Register(s *sharedPullerState) { t.registry[filepath.Join(s.folder, s.file.Name)] = s } -// Deregister a puller which will stop boardcasting pullers state. +// Deregister a puller which will stop broadcasting pullers state. func (t *ProgressEmitter) Deregister(s *sharedPullerState) { t.mut.Lock() defer t.mut.Unlock() diff --git a/internal/model/rwfolder.go b/internal/model/rwfolder.go index d47fe4b82..fdb7b5ccd 100644 --- a/internal/model/rwfolder.go +++ b/internal/model/rwfolder.go @@ -806,7 +806,7 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks reused = len(file.Blocks) - len(blocks) if reused == 0 { // Otherwise, discard the file ourselves in order for the - // sharedpuller not to panic when it fails to exlusively create a + // sharedpuller not to panic when it fails to exclusively create a // file which already exists os.Remove(tempName) } @@ -876,7 +876,7 @@ func (p *rwFolder) shortcutFile(file protocol.FileInfo) (err error) { return } -// shortcutSymlink changes the symlinks type if necessery. +// shortcutSymlink changes the symlinks type if necessary. func (p *rwFolder) shortcutSymlink(file protocol.FileInfo) (err error) { err = symlinks.ChangeType(filepath.Join(p.dir, file.Name), file.Flags) if err == nil { @@ -977,7 +977,7 @@ func (p *rwFolder) pullerRoutine(in <-chan pullBlockState, out chan<- *sharedPul continue } - // Get an fd to the temporary file. Tehcnically we don't need it until + // Get an fd to the temporary file. Technically we don't need it until // after fetching the block, but if we run into an error here there is // no point in issuing the request to the network. fd, err := state.tempFile() diff --git a/internal/model/rwfolder_test.go b/internal/model/rwfolder_test.go index 25a27149f..53df1e3af 100644 --- a/internal/model/rwfolder_test.go +++ b/internal/model/rwfolder_test.go @@ -410,7 +410,7 @@ func TestDeregisterOnFailInCopy(t *testing.T) { p.handleFile(file, copyChan, finisherChan) - // Receive a block at puller, to indicate that atleast a single copier + // Receive a block at puller, to indicate that at least a single copier // loop has been performed. toPull := <-pullChan // Wait until copier is trying to pass something down to the puller again diff --git a/internal/scanner/walk.go b/internal/scanner/walk.go index 41f67e88b..89363b0cd 100644 --- a/internal/scanner/walk.go +++ b/internal/scanner/walk.go @@ -46,7 +46,7 @@ type Walker struct { BlockSize int // If Matcher is not nil, it is used to identify files to ignore which were specified by the user. Matcher *ignore.Matcher - // If TempNamer is not nil, it is used to ignore tempory files when walking. + // If TempNamer is not nil, it is used to ignore temporary files when walking. TempNamer TempNamer // Number of hours to keep temporary files for TempLifetime time.Duration @@ -387,7 +387,7 @@ func SymlinkTypeEqual(disk, index uint32) bool { // know and someone else knows, just accept it. The fact that you don't // know means you are on Unix, and on Unix you don't really care what the // target type is. The moment you do know, and if something doesn't match, - // that will propogate throught the cluster. + // that will propagate through the cluster. if disk&protocol.FlagSymlinkMissingTarget != 0 && index&protocol.FlagSymlinkMissingTarget == 0 { return true } diff --git a/internal/scanner/walk_test.go b/internal/scanner/walk_test.go index 30545533f..de9d8cf0d 100644 --- a/internal/scanner/walk_test.go +++ b/internal/scanner/walk_test.go @@ -46,7 +46,7 @@ var correctIgnores = map[string][]string{ func init() { // This test runs the risk of entering infinite recursion if it fails. - // Limit the stack size to 10 megs to creash early in that case instead of + // Limit the stack size to 10 megs to crash early in that case instead of // potentially taking down the box... rdebug.SetMaxStack(10 * 1 << 20) } diff --git a/internal/symlinks/symlink_windows.go b/internal/symlinks/symlink_windows.go index c41830664..5a14d3efd 100644 --- a/internal/symlinks/symlink_windows.go +++ b/internal/symlinks/symlink_windows.go @@ -46,7 +46,7 @@ func init() { } }() - // Needs administrator priviledges. + // Needs administrator privileges. // Let's check that everything works. // This could be done more officially: // http://stackoverflow.com/questions/2094663/determine-if-windows-process-has-privilege-to-create-symbolic-link diff --git a/internal/upgrade/testdata/github-releases.json b/internal/upgrade/testdata/github-releases.json index 3a2010679..6c322b4b2 100644 --- a/internal/upgrade/testdata/github-releases.json +++ b/internal/upgrade/testdata/github-releases.json @@ -3809,6 +3809,6 @@ ], "tarball_url": "https://api.github.com/repos/syncthing/syncthing/tarball/v0.10.26", "zipball_url": "https://api.github.com/repos/syncthing/syncthing/zipball/v0.10.26", - "body": "* Silence discovery warnings when v6 not available (#1418, @AudriusButkevicius)\r\n* Make sure we start scanning at an indexed location (#1399, @AudriusButkevicius)\r\n* Add missing translation strings (#1430, @AudriusButkevicius)\r\n* Allow not to limit bandwidth in LAN (#1336, @AudriusButkevicius)\r\n* Remove red if we managed to report to atleast one discovery server (#1427, @AudriusButkevicius)\r\n* Compress only metadata by default (#1374, @calmh)\r\n* Don't yell about discovery listening and resolving (#1418, @calmh)\r\n* Fall back to %AppData% if %LocalAppData% is blank (#1446, @calmh)\r\n" + "body": "* Silence discovery warnings when v6 not available (#1418, @AudriusButkevicius)\r\n* Make sure we start scanning at an indexed location (#1399, @AudriusButkevicius)\r\n* Add missing translation strings (#1430, @AudriusButkevicius)\r\n* Allow not to limit bandwidth in LAN (#1336, @AudriusButkevicius)\r\n* Remove red if we managed to report to at least one discovery server (#1427, @AudriusButkevicius)\r\n* Compress only metadata by default (#1374, @calmh)\r\n* Don't yell about discovery listening and resolving (#1418, @calmh)\r\n* Fall back to %AppData% if %LocalAppData% is blank (#1446, @calmh)\r\n" } ] diff --git a/internal/versioner/util.go b/internal/versioner/util.go index f3a979160..5b61f67ec 100644 --- a/internal/versioner/util.go +++ b/internal/versioner/util.go @@ -25,7 +25,7 @@ var tagExp = regexp.MustCompile(`.*~([^~.]+)(?:\.[^.]+)?$`) // Returns the tag from a filename, whether at the end or middle. func filenameTag(path string) string { match := tagExp.FindStringSubmatch(path) - // match is []string{"whole match", "submatch"} when successfull + // match is []string{"whole match", "submatch"} when successful if len(match) != 2 { return "" diff --git a/test/util.go b/test/util.go index 24012aee2..f941192e1 100644 --- a/test/util.go +++ b/test/util.go @@ -467,7 +467,7 @@ func isTimeout(err error) bool { return false } return strings.Contains(err.Error(), "use of closed network connection") || - strings.Contains(err.Error(), "request cancelled while waiting") + strings.Contains(err.Error(), "request canceled while waiting") } func getTestName() string {