diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-01-23 10:25:10 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-01-23 10:25:10 -0300 |
commit | eb58e631e74d9a5ff0992a67cd9452b3a525c5e6 (patch) | |
tree | 69ed60909505fe6c0a1096f2be9f7b9d4d7243be /api/web_socket.go | |
parent | 1a0b12313bd0af1724df2fc6260ef284acfc5f93 (diff) | |
download | chat-eb58e631e74d9a5ff0992a67cd9452b3a525c5e6.tar.gz chat-eb58e631e74d9a5ff0992a67cd9452b3a525c5e6.tar.bz2 chat-eb58e631e74d9a5ff0992a67cd9452b3a525c5e6.zip |
PLT-7: Refactoring api to use translations (chunk 3)
- Add spanish translations
- Not included tests and templates
Diffstat (limited to 'api/web_socket.go')
-rw-r--r-- | api/web_socket.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/api/web_socket.go b/api/web_socket.go index 995e2a677..7590e6646 100644 --- a/api/web_socket.go +++ b/api/web_socket.go @@ -8,11 +8,12 @@ import ( "github.com/gorilla/mux" "github.com/gorilla/websocket" "github.com/mattermost/platform/model" + "github.com/mattermost/platform/utils" "net/http" ) func InitWebSocket(r *mux.Router) { - l4g.Debug("Initializing web socket api routes") + l4g.Debug(utils.T("api.web_socket.init.debug")) r.Handle("/websocket", ApiUserRequired(connect)).Methods("GET") hub.Start() } @@ -28,8 +29,8 @@ func connect(c *Context, w http.ResponseWriter, r *http.Request) { ws, err := upgrader.Upgrade(w, r, nil) if err != nil { - l4g.Error("websocket connect err: %v", err) - c.Err = model.NewAppError("connect", "Failed to upgrade websocket connection", "") + l4g.Error(utils.T("api.web_socket.connect.error"), err) + c.Err = model.NewLocAppError("connect", "api.web_socket.connect.upgrade.app_error", nil, "") return } |