Skip to content

Commit 9de0553

Browse files
committed
update: some log texts to english #1
1 parent 03f78a2 commit 9de0553

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

infra/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func NewConfigurationInstance() *Configuration {
3131
if _, err := os.Stat(configurationPath); os.IsNotExist(err) {
3232
err := instance.writeYAML([]domain.FileInfo{})
3333
if err != nil {
34-
log.Fatalf("Erro ao criar o arquivo YAML: %v", err)
34+
log.Fatalf("Failed when create yaml config file: %s", err.Error())
3535
}
3636
}
3737

infra/database.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewDatabaseInstance() *Database {
4040
if _, err := os.Stat(databasePath); os.IsNotExist(err) {
4141
err := instance.writeYAML([]domain.FileInfo{})
4242
if err != nil {
43-
log.Fatalf("Erro ao criar o arquivo YAML: %v", err)
43+
log.Fatalf("Failed when create yaml database: %s", err.Error())
4444
}
4545
}
4646
})
@@ -123,7 +123,7 @@ func (db *Database) Update(id string, info domain.FileInfo) error {
123123
}
124124

125125
if !updated {
126-
return errors.New("FileInfo não encontrado para atualização")
126+
return errors.New("Database entry not updated")
127127
}
128128

129129
return db.writeYAML(data)
@@ -148,7 +148,7 @@ func (db *Database) Delete(id string) error {
148148
}
149149

150150
if !deleted {
151-
return errors.New("FileInfo não encontrado para deleção")
151+
return errors.New("Database entry not deleted")
152152
}
153153

154154
return db.writeYAML(data)

services/matcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func GetFileInfo(filePath string) domain.FileInfo {
7777
fileInfo.ID = hash
7878

7979
if err != nil {
80-
logger.Error(fmt.Sprintf("Erro ao calcular o hash: %s", err))
80+
logger.Error(fmt.Sprintf("Error when get file hash: %s", err))
8181
}
8282

8383
parts := strings.Split(sanitizedName, " ")

utils/fs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func GetFullPath(relativePath string) (string, error) {
1212
if !filepath.IsAbs(absPath) {
1313
wd, err := os.Getwd()
1414
if err != nil {
15-
fmt.Println("Erro ao obter o diretório de trabalho:", err)
15+
fmt.Println("Error when get absolute path:", err)
1616
return "", err
1717
}
1818
absPath = filepath.Join(wd, relativePath)

utils/hash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func HashOpenSubtitles(videoPath string) (string, error) {
2727

2828
const (
2929
bufferSize = 65536
30-
bytesize = 8 // Tamanho de int64 em bytes
30+
bytesize = 8
3131
)
3232

3333
var filehash uint64 = uint64(fileSize)

utils/loading.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ func AsyncTaskLoading(task func(), description string) {
1111
s.Suffix = " " + description
1212
s.Start()
1313

14-
// Chama a função de trabalho
1514
func() {
1615
time.Sleep(3 * time.Second)
1716
task()

0 commit comments

Comments
 (0)