UX: Rename "path" to "folder"

See https://twitter.com/browseyourlife/status/1258330913991208960

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-07 12:49:06 +02:00
parent 38fe8277fa
commit c318d22ca7
7 changed files with 10 additions and 10 deletions

View file

@ -90,7 +90,7 @@ func StartImport(router *gin.RouterGroup, conf *config.Config) {
if subPath != "" && path != conf.ImportPath() && fs.IsEmpty(path) {
if err := os.Remove(path); err != nil {
log.Errorf("import: could not deleted empty folder %s: %s", txt.Quote(path), err)
log.Errorf("import: could not delete empty folder %s: %s", txt.Quote(path), err)
} else {
log.Infof("import: deleted empty folder %s", txt.Quote(path))
}

View file

@ -17,7 +17,7 @@ import (
var CopyCommand = cli.Command{
Name: "copy",
Aliases: []string{"cp"},
Usage: "Copies files to originals path, converts and indexes them as needed",
Usage: "Copies files to originals folder, converts and indexes them as needed",
Action: copyAction,
}
@ -61,7 +61,7 @@ func copyAction(ctx *cli.Context) error {
}
if sourcePath == conf.OriginalsPath() {
return errors.New("import path is identical with originals path")
return errors.New("import folder is identical with originals")
}
log.Infof("copying media files from %s to %s", sourcePath, conf.OriginalsPath())

View file

@ -17,7 +17,7 @@ import (
var ImportCommand = cli.Command{
Name: "import",
Aliases: []string{"mv"},
Usage: "Moves files to originals path, converts and indexes them as needed",
Usage: "Moves files to originals folder, converts and indexes them as needed",
Action: importAction,
}
@ -61,7 +61,7 @@ func importAction(ctx *cli.Context) error {
}
if sourcePath == conf.OriginalsPath() {
return errors.New("import path is identical with originals path")
return errors.New("import folder is identical with originals")
}
log.Infof("moving media files from %s to %s", sourcePath, conf.OriginalsPath())

View file

@ -16,7 +16,7 @@ import (
// IndexCommand is used to register the index cli command
var IndexCommand = cli.Command{
Name: "index",
Usage: "Indexes media files in originals path",
Usage: "Indexes media files in originals folder",
Flags: indexFlags,
Action: indexAction,
}
@ -28,7 +28,7 @@ var indexFlags = []cli.Flag{
},
cli.BoolFlag{
Name: "convert, c",
Usage: "convert raw to jpeg so that they can be displayed in a browser",
Usage: "convert other file types to jpeg so that they can be displayed in a browser",
},
}

View file

@ -201,7 +201,7 @@ var GlobalFlags = []cli.Flag{
},
cli.StringFlag{
Name: "tidb-path",
Usage: "built-in TiDB server storage path",
Usage: "built-in TiDB server storage `PATH`",
EnvVar: "PHOTOPRISM_TIDB_PATH",
},
cli.StringFlag{

View file

@ -91,7 +91,7 @@ func TestThumb_Filename(t *testing.T) {
if err == nil {
t.FailNow()
}
assert.Equal(t, "resample: path is empty", err.Error())
assert.Equal(t, "resample: folder is empty", err.Error())
})
}

View file

@ -86,7 +86,7 @@ func Filename(hash string, thumbPath string, width, height int, opts ...Resample
}
if len(thumbPath) == 0 {
return "", errors.New("resample: path is empty")
return "", errors.New("resample: folder is empty")
}
postfix := Postfix(width, height, opts...)