chore: fix some comments and typos

Signed-off-by: knowmost <knowmost@outlook.com>
This commit is contained in:
knowmost
2024-04-28 11:30:59 +08:00
committed by Michael Mayer
parent c8acfb98c0
commit 020e9e7e19
8 changed files with 9 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
## Setup: https://docs.photoprism.app/developer-guide/setup/ ## ## Setup: https://docs.photoprism.app/developer-guide/setup/ ##
services: services:
## PhotoPrism Development Environment (PostgresSQL) ## PhotoPrism Development Environment (PostgreSQL)
# ATTENTION: PostgreSQL is NOT supported yet as Gorm (our ORM library) needs to be upgraded first. # ATTENTION: PostgreSQL is NOT supported yet as Gorm (our ORM library) needs to be upgraded first.
# The current Gorm version does NOT support compatible general data types: # The current Gorm version does NOT support compatible general data types:
# https://github.com/photoprism/photoprism/issues/47 # https://github.com/photoprism/photoprism/issues/47

View File

@@ -422,7 +422,7 @@ export default class Util {
await window.navigator.clipboard.writeText(text); await window.navigator.clipboard.writeText(text);
} else if (document.execCommand) { } else if (document.execCommand) {
// Clipboard is available only in HTTPS pages. see https://web.dev/async-clipboard/ // Clipboard is available only in HTTPS pages. see https://web.dev/async-clipboard/
// So if the the official 'clipboard' doesn't supported and the 'document.execCommand' is supported. // So if the official 'clipboard' doesn't supported and the 'document.execCommand' is supported.
// copy by a work-around by creating a textarea in the DOM and execute copy command from him. // copy by a work-around by creating a textarea in the DOM and execute copy command from him.
// Create the text area element (to copy from) // Create the text area element (to copy from)

View File

@@ -22,7 +22,7 @@ import (
) )
// SQL Databases. // SQL Databases.
// TODO: PostgresSQL support requires upgrading GORM, so generic column data types can be used. // TODO: PostgreSQL support requires upgrading GORM, so generic column data types can be used.
const ( const (
MySQL = "mysql" MySQL = "mysql"
MariaDB = "mariadb" MariaDB = "mariadb"

View File

@@ -238,7 +238,7 @@ func TestUser_UpdateUsername(t *testing.T) {
if err := m.UpdateUsername("admin"); err == nil { if err := m.UpdateUsername("admin"); err == nil {
t.Fatal("error expected") t.Fatal("error expected")
} else { } else {
t.Logf("expected errror: %s", err) t.Logf("expected error: %s", err)
} }
}) })
t.Run("Success", func(t *testing.T) { t.Run("Success", func(t *testing.T) {

View File

@@ -185,7 +185,7 @@ func TestDuplicate_Purge(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if err := duplicate.Find(); err == nil { if err := duplicate.Find(); err == nil {
t.Log("Dulicate deleted") t.Log("Duplicate deleted")
} }
}) })
} }

View File

@@ -173,7 +173,7 @@ func (m *Photo) UpdateTitle(labels classify.Labels) error {
// UpdateAndSaveTitle updates the photo title and saves it. // UpdateAndSaveTitle updates the photo title and saves it.
func (m *Photo) UpdateAndSaveTitle() error { func (m *Photo) UpdateAndSaveTitle() error {
if !m.HasID() { if !m.HasID() {
return fmt.Errorf("cannot save photo whithout id") return fmt.Errorf("cannot save photo without id")
} }
m.PhotoFaces = m.FaceCount() m.PhotoFaces = m.FaceCount()

View File

@@ -21,7 +21,7 @@ var GpsFloatRegexp = regexp.MustCompile("[+\\-]?(?:(?:0|[1-9]\\d*)(?:\\.\\d*)?|\
// GpsToLatLng returns the GPS latitude and longitude as float point number. // GpsToLatLng returns the GPS latitude and longitude as float point number.
func GpsToLatLng(s string) (lat, lng float64) { func GpsToLatLng(s string) (lat, lng float64) {
// Emtpy? // Empty?
if s == "" { if s == "" {
return 0, 0 return 0, 0
} }
@@ -62,7 +62,7 @@ func GpsToLatLng(s string) (lat, lng float64) {
// GpsToDecimal returns the GPS latitude or longitude as decimal float point number. // GpsToDecimal returns the GPS latitude or longitude as decimal float point number.
func GpsToDecimal(s string) float64 { func GpsToDecimal(s string) float64 {
// Emtpy? // Empty?
if s == "" { if s == "" {
return 0 return 0
} }

View File

@@ -481,7 +481,7 @@ function checkCloudInit {
CI="\e[32m[PASS]\e[0m Cloud-init is installed.\n" CI="\e[32m[PASS]\e[0m Cloud-init is installed.\n"
((PASS++)) ((PASS++))
else else
CI="\e[41m[FAIL]\e[0m No valid verison of cloud-init was found.\n" CI="\e[41m[FAIL]\e[0m No valid version of cloud-init was found.\n"
((FAIL++)) ((FAIL++))
STATUS=2 STATUS=2
fi fi