summaryrefslogtreecommitdiffstats
path: root/api4
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 /api4
parent226d4b2ac8888646271b9e9e83a513cd6e62d620 (diff)
downloadchat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.tar.gz
chat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.tar.bz2
chat-344836dfb22fb36d4d2740c5ec226de78d9dcd3c.zip
Add missed translations (#8959)
Diffstat (limited to 'api4')
-rw-r--r--api4/system_test.go4
-rw-r--r--api4/user.go4
2 files changed, 3 insertions, 5 deletions
diff --git a/api4/system_test.go b/api4/system_test.go
index f784a8be4..099c193d0 100644
--- a/api4/system_test.go
+++ b/api4/system_test.go
@@ -696,9 +696,7 @@ func TestS3TestConnection(t *testing.T) {
config.FileSettings.AmazonS3Bucket = "Wrong_bucket"
_, resp = th.SystemAdminClient.TestS3Connection(&config)
CheckInternalErrorStatus(t, resp)
- if resp.Error.Message != "Unable to create bucket" {
- t.Fatal("should return error ")
- }
+ assert.Equal(t, "Unable to create bucket.", resp.Error.Message)
config.FileSettings.AmazonS3Bucket = "shouldcreatenewbucket"
_, resp = th.SystemAdminClient.TestS3Connection(&config)
diff --git a/api4/user.go b/api4/user.go
index 2b79b19f1..14ab3a0a2 100644
--- a/api4/user.go
+++ b/api4/user.go
@@ -985,14 +985,14 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) {
if *c.App.Config().ExperimentalSettings.ClientSideCertEnable {
if license := c.App.License(); license == nil || !*license.Features.SAML {
- c.Err = model.NewAppError("ClientSideCertNotAllowed", "Attempt to use the experimental feature ClientSideCertEnable without a valid enterprise license", nil, "", http.StatusBadRequest)
+ c.Err = model.NewAppError("ClientSideCertNotAllowed", "api.user.login.client_side_cert.license.app_error", nil, "", http.StatusBadRequest)
return
} else {
certPem, certSubject, certEmail := c.App.CheckForClienSideCert(r)
mlog.Debug("Client Cert", mlog.String("cert_subject", certSubject), mlog.String("cert_email", certEmail))
if len(certPem) == 0 || len(certEmail) == 0 {
- c.Err = model.NewAppError("ClientSideCertMissing", "Attempted to sign in using the experimental feature ClientSideCert without providing a valid certificate", nil, "", http.StatusBadRequest)
+ c.Err = model.NewAppError("ClientSideCertMissing", "api.user.login.client_side_cert.certificate.app_error", nil, "", http.StatusBadRequest)
return
} else if *c.App.Config().ExperimentalSettings.ClientSideCertCheck == model.CLIENT_SIDE_CERT_CHECK_PRIMARY_AUTH {
loginId = certEmail