summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-06-19 19:40:26 +0200
committerGitHub <noreply@github.com>2018-06-19 19:40:26 +0200
commit344836dfb22fb36d4d2740c5ec226de78d9dcd3c (patch)
tree017252735807495c82c9111dbf4a2c8573b0ec2a /utils
parent226d4b2ac8888646271b9e9e83a513cd6e62d620 (diff)
downloadchat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.tar.gz
chat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.tar.bz2
chat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.zip
Add missed translations (#8959)
Diffstat (limited to 'utils')
-rw-r--r--utils/file_backend.go2
-rw-r--r--utils/file_backend_local.go2
-rw-r--r--utils/file_backend_s3.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/utils/file_backend.go b/utils/file_backend.go
index 0da0bc3b8..60c90960d 100644
--- a/utils/file_backend.go
+++ b/utils/file_backend.go
@@ -42,5 +42,5 @@ func NewFileBackend(settings *model.FileSettings, enableComplianceFeatures bool)
directory: settings.Directory,
}, nil
}
- return nil, model.NewAppError("NewFileBackend", "No file driver selected.", nil, "", http.StatusInternalServerError)
+ return nil, model.NewAppError("NewFileBackend", "api.file.no_driver.app_error", nil, "", http.StatusInternalServerError)
}
diff --git a/utils/file_backend_local.go b/utils/file_backend_local.go
index 37bca7987..a2d311f83 100644
--- a/utils/file_backend_local.go
+++ b/utils/file_backend_local.go
@@ -26,7 +26,7 @@ type LocalFileBackend struct {
func (b *LocalFileBackend) TestConnection() *model.AppError {
f := bytes.NewReader([]byte("testingwrite"))
if _, err := writeFileLocally(f, filepath.Join(b.directory, TEST_FILE_PATH)); err != nil {
- return model.NewAppError("TestFileConnection", "Don't have permissions to write to local path specified or other error.", nil, err.Error(), http.StatusInternalServerError)
+ return model.NewAppError("TestFileConnection", "api.file.test_connection.local.connection.app_error", nil, err.Error(), http.StatusInternalServerError)
}
os.Remove(filepath.Join(b.directory, TEST_FILE_PATH))
mlog.Info("Able to write files to local storage.")
diff --git a/utils/file_backend_s3.go b/utils/file_backend_s3.go
index 1772f09ea..6f1fa9ab0 100644
--- a/utils/file_backend_s3.go
+++ b/utils/file_backend_s3.go
@@ -62,12 +62,12 @@ func (b *S3FileBackend) s3New() (*s3.Client, error) {
func (b *S3FileBackend) TestConnection() *model.AppError {
s3Clnt, err := b.s3New()
if err != nil {
- return model.NewAppError("TestFileConnection", "Bad connection to S3 or minio.", nil, err.Error(), http.StatusInternalServerError)
+ return model.NewAppError("TestFileConnection", "api.file.test_connection.s3.connection.app_error", nil, err.Error(), http.StatusInternalServerError)
}
exists, err := s3Clnt.BucketExists(b.bucket)
if err != nil {
- return model.NewAppError("TestFileConnection", "Error checking if bucket exists.", nil, err.Error(), http.StatusInternalServerError)
+ return model.NewAppError("TestFileConnection", "api.file.test_connection.s3.bucket_exists.app_error", nil, err.Error(), http.StatusInternalServerError)
}
if !exists {
@@ -75,7 +75,7 @@ func (b *S3FileBackend) TestConnection() *model.AppError {
err := s3Clnt.MakeBucket(b.bucket, b.region)
if err != nil {
mlog.Error("Unable to create bucket.")
- return model.NewAppError("TestFileConnection", "Unable to create bucket", nil, err.Error(), http.StatusInternalServerError)
+ return model.NewAppError("TestFileConnection", "api.file.test_connection.s3.bucked_create.app_error", nil, err.Error(), http.StatusInternalServerError)
}
}
mlog.Info("Connection to S3 or minio is good. Bucket exists.")