From c90f19ec21c14a1ff171d456d94fbd4efe69963d Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 1 Oct 2020 16:00:43 +0545 Subject: [PATCH] Fix minor typos --- frontend/tests/unit/model/account_test.js | 2 +- frontend/tests/unit/model/file_test.js | 2 +- internal/commands/commands.go | 2 +- internal/entity/account_test.go | 4 ++-- internal/entity/country.go | 2 +- internal/entity/photo_optimize_test.go | 2 +- internal/maps/osm/categories_test.go | 8 ++++---- internal/maps/osm/location_test.go | 6 +++--- internal/maps/osm/name_test.go | 12 ++++++------ internal/meta/exif_test.go | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/frontend/tests/unit/model/account_test.js b/frontend/tests/unit/model/account_test.js index d3b240d5b..423ff399e 100644 --- a/frontend/tests/unit/model/account_test.js +++ b/frontend/tests/unit/model/account_test.js @@ -61,7 +61,7 @@ describe("model/account", () => { const values2 = {ID: 6, Title: "Crazy Cat 2", UID: 783}; const photo2 = new Photo(values2); const Photos = [photo, photo2]; - account.Share(Photos, "destinaton").then( + account.Share(Photos, "destination").then( (response) => { assert.equal(response, "share success"); done(); diff --git a/frontend/tests/unit/model/file_test.js b/frontend/tests/unit/model/file_test.js index 9fb23e25e..07a3f0567 100644 --- a/frontend/tests/unit/model/file_test.js +++ b/frontend/tests/unit/model/file_test.js @@ -76,7 +76,7 @@ describe("model/file", () => { assert.equal(file3.thumbnailUrl("abc"), "/api/v1/svg/raw"); }); - it("should return downlaload url", () => { + it("should return download url", () => { const values = { InstanceID: 5, UID: "ABC123", diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 5bffc0b49..4e5ddbe23 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -18,7 +18,7 @@ import ( var log = event.Log -// childAlreadyRunning tests if a .pid file at filePath is a running proccess. +// childAlreadyRunning tests if a .pid file at filePath is a running process. // it returns the pid value and the running status (true or false). func childAlreadyRunning(filePath string) (pid int, running bool) { if !fs.FileExists(filePath) { diff --git a/internal/entity/account_test.go b/internal/entity/account_test.go index 8bd3ee697..718239c3f 100644 --- a/internal/entity/account_test.go +++ b/internal/entity/account_test.go @@ -238,7 +238,7 @@ func TestAccount_Save(t *testing.T) { if err != nil { t.Fatal(err) } - initalDate := model.UpdatedAt + initialDate := model.UpdatedAt err = model.Save() @@ -246,7 +246,7 @@ func TestAccount_Save(t *testing.T) { t.Fatal(err) } afterDate := model.UpdatedAt - assert.True(t, afterDate.After(initalDate)) + assert.True(t, afterDate.After(initialDate)) }) } diff --git a/internal/entity/country.go b/internal/entity/country.go index 247368f06..f9f0978f8 100644 --- a/internal/entity/country.go +++ b/internal/entity/country.go @@ -7,7 +7,7 @@ import ( "github.com/photoprism/photoprism/internal/maps" ) -// altCountryNames defines mapping between different names for the same countriy +// altCountryNames defines mapping between different names for the same country var altCountryNames = map[string]string{ "United States of America": "USA", "United States": "USA", diff --git a/internal/entity/photo_optimize_test.go b/internal/entity/photo_optimize_test.go index 4cd3d549d..88b34494e 100644 --- a/internal/entity/photo_optimize_test.go +++ b/internal/entity/photo_optimize_test.go @@ -65,7 +65,7 @@ func TestPhoto_Optimize(t *testing.T) { t.Error("photo should NOT be updated") } }) - t.Run("photo withouth id", func(t *testing.T) { + t.Run("photo without id", func(t *testing.T) { photo := Photo{} bool, err := photo.Optimize() assert.Error(t, err) diff --git a/internal/maps/osm/categories_test.go b/internal/maps/osm/categories_test.go index 8bae627da..551384372 100644 --- a/internal/maps/osm/categories_test.go +++ b/internal/maps/osm/categories_test.go @@ -11,25 +11,25 @@ import ( func TestOSM_Category(t *testing.T) { t.Run("hill", func(t *testing.T) { - l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name"} assert.Equal(t, "hill", l.Category()) }) t.Run("water", func(t *testing.T) { - l := &Location{LocCategory: "", LocName: "Nice title", LocType: "water", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "", LocName: "Nice title", LocType: "water", LocDisplayName: "display name"} assert.Equal(t, "water", l.Category()) }) t.Run("shop", func(t *testing.T) { - l := &Location{LocCategory: "shop", LocName: "Nice title", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "shop", LocName: "Nice title", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "shop", l.Category()) }) t.Run("no label found", func(t *testing.T) { - l := &Location{LocCategory: "xxx", LocName: "Nice title", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "xxx", LocName: "Nice title", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "", l.Category()) }) } diff --git a/internal/maps/osm/location_test.go b/internal/maps/osm/location_test.go index 399234b18..0cfe2f6eb 100644 --- a/internal/maps/osm/location_test.go +++ b/internal/maps/osm/location_test.go @@ -85,7 +85,7 @@ func TestOSM_State(t *testing.T) { t.Run("Berlin", func(t *testing.T) { a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"} - l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a} + l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a} assert.Equal(t, "Berlin", l.State()) }) } @@ -94,7 +94,7 @@ func TestOSM_Suburb(t *testing.T) { t.Run("Neukölln", func(t *testing.T) { a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"} - l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a} + l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a} assert.Equal(t, "Neukölln", l.Suburb()) }) } @@ -103,7 +103,7 @@ func TestOSM_CountryCode(t *testing.T) { t.Run("de", func(t *testing.T) { a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"} - l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a} + l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a} assert.Equal(t, "de", l.CountryCode()) }) } diff --git a/internal/maps/osm/name_test.go b/internal/maps/osm/name_test.go index 18899d403..72df078ad 100644 --- a/internal/maps/osm/name_test.go +++ b/internal/maps/osm/name_test.go @@ -10,32 +10,32 @@ import ( func TestOSM_Name(t *testing.T) { t.Run("Nice Name", func(t *testing.T) { - l := &Location{LocCategory: "natural", LocName: "Nice Name", LocType: "hill", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "natural", LocName: "Nice Name", LocType: "hill", LocDisplayName: "display name"} assert.Equal(t, "Nice Name", l.Name()) }) t.Run("Water", func(t *testing.T) { - l := &Location{LocCategory: "", LocName: "", LocType: "water", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "", LocName: "", LocType: "water", LocDisplayName: "display name"} assert.Equal(t, "Water", l.Name()) }) t.Run("Nice Name 2", func(t *testing.T) { - l := &Location{LocCategory: "shop", LocName: "Nice Name 2", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "shop", LocName: "Nice Name 2", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "Nice Name 2", l.Name()) }) t.Run("Cat", func(t *testing.T) { - l := &Location{LocCategory: "xxx", LocName: "Cat,Dog", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "xxx", LocName: "Cat,Dog", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "Cat", l.Name()) }) t.Run("airport", func(t *testing.T) { - l := &Location{LocCategory: "aeroway", LocName: "", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "aeroway", LocName: "", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "Airport", l.Name()) }) t.Run("Cow", func(t *testing.T) { - l := &Location{LocCategory: "xxx", LocName: "Cow - Cat - Dog", LocType: "", LocDisplayName: "dipslay name"} + l := &Location{LocCategory: "xxx", LocName: "Cow - Cat - Dog", LocType: "", LocDisplayName: "display name"} assert.Equal(t, "Cow", l.Name()) }) } diff --git a/internal/meta/exif_test.go b/internal/meta/exif_test.go index eca2f22ef..747c139eb 100644 --- a/internal/meta/exif_test.go +++ b/internal/meta/exif_test.go @@ -260,7 +260,7 @@ func TestExif(t *testing.T) { if err := data.JSON("testdata/orientation.json", "foo.jpg"); err != nil { assert.EqualError(t, err, "metadata: original name foo.jpg does not match orientation.jpg (exiftool)") } else { - t.Error("error expected when providing wrong orginal name") + t.Error("error expected when providing wrong original name") } })