From 58a1821727cd5e37b054910983c1430c16d781cc Mon Sep 17 00:00:00 2001
From: Rotzbua <Rotzbua@users.noreply.github.com>
Date: Thu, 16 May 2024 00:39:05 +0200
Subject: [PATCH] fix: typos in documentation and code

Change-type: patch
---
 docs/ARCHITECTURE.md        |  4 ++--
 docs/PUBLISHING.md          |  2 +-
 lib/shared/errors.ts        |  2 +-
 tests/shared/errors.spec.ts | 12 ++++++------
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 6669b9b095..8406f69288 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -27,12 +27,12 @@ approach"][lego-blocks].
 
 This has the advantage of allowing other applications to re-use logic we
 implemented for Etcher in their own project, even for things we didn't expect,
-which leads to users benefitting from what we've built, and we benefitting from
+which leads to users benefiting from what we've built, and we're benefiting from
 user's bug reports, suggestions, etc, as an indirect way to make Etcher better.
 
 The fact that low-level details are scattered around many different modules can
 make it challenging for a new contributor to wrap their heads around the
-project as a whole, and get a clear high level view of how things work or where
+project as a whole, and get a clear high-level view of how things work or where
 to submit their work or bug reports.
 
 These are the main Etcher components, in a nutshell:
diff --git a/docs/PUBLISHING.md b/docs/PUBLISHING.md
index 60258733f3..05392f65fc 100644
--- a/docs/PUBLISHING.md
+++ b/docs/PUBLISHING.md
@@ -9,7 +9,7 @@ Release Types
 
 Etcher supports **pre-release** and **final** release types as does Github. Each is
 published to Github releases.
-The release version is generated automatically from the commit messasges.
+The release version is generated automatically from the commit messages.
 
 Signing
 -------
diff --git a/lib/shared/errors.ts b/lib/shared/errors.ts
index 5372193330..64cec7d9ca 100644
--- a/lib/shared/errors.ts
+++ b/lib/shared/errors.ts
@@ -99,7 +99,7 @@ export function getTitle(error: ErrorWithPath): string {
 		return `Error code: ${code}`;
 	}
 
-	return 'An error ocurred';
+	return 'An error occurred';
 }
 
 /**
diff --git a/tests/shared/errors.spec.ts b/tests/shared/errors.spec.ts
index 4528e600e1..62dfe7057e 100644
--- a/tests/shared/errors.spec.ts
+++ b/tests/shared/errors.spec.ts
@@ -40,7 +40,7 @@ describe('Shared: Errors', function () {
 		it('should return a generic error message if the error is an empty object', function () {
 			const error = {};
 			// @ts-ignore
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should return the error message', function () {
@@ -129,29 +129,29 @@ describe('Shared: Errors', function () {
 			const error = new Error();
 			// @ts-ignore
 			error.code = '';
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should not display a blank string error code', function () {
 			const error = new Error();
 			// @ts-ignore
 			error.code = '   ';
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should return a generic error message if no information was found', function () {
 			const error = new Error();
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should return a generic error message if no code and the message is empty', function () {
 			const error = new Error('');
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should return a generic error message if no code and the message is blank', function () {
 			const error = new Error('   ');
-			expect(errors.getTitle(error)).to.equal('An error ocurred');
+			expect(errors.getTitle(error)).to.equal('An error occurred');
 		});
 
 		it('should rephrase an ENOENT error', function () {