Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2
Этот коммит содержится в:
53
Gopkg.lock
сгенерированный
53
Gopkg.lock
сгенерированный
@@ -7,13 +7,6 @@
|
||||
revision = "2600fb119af974220d3916a5916d6e31176aac1b"
|
||||
version = "v1.0.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/alecthomas/log4go"
|
||||
packages = ["."]
|
||||
revision = "9c17fbb2767ccbdda78584f28d545c44a4b29c4f"
|
||||
source = "https://github.com/mattermost/log4go.git"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/armon/go-metrics"
|
||||
@@ -511,6 +504,31 @@
|
||||
packages = ["."]
|
||||
revision = "a0b114877d4caeffbd7f87e3757c17fce570fea7"
|
||||
|
||||
[[projects]]
|
||||
name = "go.uber.org/atomic"
|
||||
packages = ["."]
|
||||
revision = "8474b86a5a6f79c443ce4b2992817ff32cf208b8"
|
||||
version = "v1.3.1"
|
||||
|
||||
[[projects]]
|
||||
name = "go.uber.org/multierr"
|
||||
packages = ["."]
|
||||
revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a"
|
||||
version = "v1.1.0"
|
||||
|
||||
[[projects]]
|
||||
name = "go.uber.org/zap"
|
||||
packages = [
|
||||
".",
|
||||
"buffer",
|
||||
"internal/bufferpool",
|
||||
"internal/color",
|
||||
"internal/exit",
|
||||
"zapcore"
|
||||
]
|
||||
revision = "eeedf312bc6c57391d84767a4cd413f02a917974"
|
||||
version = "v1.8.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
@@ -544,6 +562,7 @@
|
||||
"bpf",
|
||||
"html",
|
||||
"html/atom",
|
||||
"html/charset",
|
||||
"idna",
|
||||
"internal/iana",
|
||||
"internal/socket",
|
||||
@@ -567,12 +586,24 @@
|
||||
packages = [
|
||||
"collate",
|
||||
"collate/build",
|
||||
"encoding",
|
||||
"encoding/charmap",
|
||||
"encoding/htmlindex",
|
||||
"encoding/internal",
|
||||
"encoding/internal/identifier",
|
||||
"encoding/japanese",
|
||||
"encoding/korean",
|
||||
"encoding/simplifiedchinese",
|
||||
"encoding/traditionalchinese",
|
||||
"encoding/unicode",
|
||||
"internal/colltab",
|
||||
"internal/gen",
|
||||
"internal/tag",
|
||||
"internal/triegen",
|
||||
"internal/ucd",
|
||||
"internal/utf8internal",
|
||||
"language",
|
||||
"runes",
|
||||
"secure/bidirule",
|
||||
"transform",
|
||||
"unicode/bidi",
|
||||
@@ -607,6 +638,12 @@
|
||||
revision = "41f3572897373c5538c50a2402db15db079fa4fd"
|
||||
version = "2.0.0"
|
||||
|
||||
[[projects]]
|
||||
name = "gopkg.in/natefinch/lumberjack.v2"
|
||||
packages = ["."]
|
||||
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
|
||||
version = "v2.1"
|
||||
|
||||
[[projects]]
|
||||
name = "gopkg.in/olivere/elastic.v5"
|
||||
packages = [
|
||||
@@ -635,6 +672,6 @@
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "a6a107c250033694b6d11085333da149e3e1171da3c23ce5bc9362148adef141"
|
||||
inputs-digest = "c9e6f408ca532c6d09084fcd86678986225e8810585cbc0476a586f1d1969066"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
||||
11
Gopkg.toml
11
Gopkg.toml
@@ -24,13 +24,6 @@
|
||||
# go-tests = true
|
||||
# unused-packages = true
|
||||
|
||||
|
||||
# To use our own fork
|
||||
[[constraint]]
|
||||
name = "github.com/alecthomas/log4go"
|
||||
branch = "master"
|
||||
source = "https://github.com/mattermost/log4go.git"
|
||||
|
||||
# To keep us on latest since maintainer stopped releasing versions
|
||||
[[constraint]]
|
||||
name = "github.com/go-sql-driver/mysql"
|
||||
@@ -71,3 +64,7 @@
|
||||
[prune]
|
||||
go-tests = true
|
||||
unused-packages = true
|
||||
|
||||
[[constraint]]
|
||||
name = "gopkg.in/natefinch/lumberjack.v2"
|
||||
version = "2.1.0"
|
||||
|
||||
@@ -6,9 +6,9 @@ package api
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
|
||||
_ "github.com/nicksnyder/go-i18n/i18n"
|
||||
@@ -114,7 +114,7 @@ func Init(a *app.App, root *mux.Router) *API {
|
||||
a.InitEmailBatching()
|
||||
|
||||
if *a.Config().ServiceSettings.EnableAPIv3 {
|
||||
l4g.Info("API version 3 is scheduled for deprecation. Please see https://api.mattermost.com for details.")
|
||||
mlog.Info("API version 3 is scheduled for deprecation. Please see https://api.mattermost.com for details.")
|
||||
}
|
||||
|
||||
return api
|
||||
|
||||
@@ -8,20 +8,29 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/store/storetest"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
|
||||
// Setup a global logger to catch tests logging outside of app context
|
||||
// The global logger will be stomped by apps initalizing but that's fine for testing. Ideally this won't happen.
|
||||
mlog.InitGlobalLogger(mlog.NewLogger(&mlog.LoggerConfiguration{
|
||||
EnableConsole: true,
|
||||
ConsoleJson: true,
|
||||
ConsoleLevel: "error",
|
||||
EnableFile: false,
|
||||
}))
|
||||
|
||||
utils.TranslationsPreInit()
|
||||
|
||||
// In the case where a dev just wants to run a single test, it's faster to just use the default
|
||||
// store.
|
||||
if filter := flag.Lookup("test.run").Value.String(); filter != "" && filter != "." {
|
||||
l4g.Info("-test.run used, not creating temporary containers")
|
||||
mlog.Info("-test.run used, not creating temporary containers")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
||||
@@ -14,14 +14,13 @@ import (
|
||||
|
||||
"github.com/mattermost/mattermost-server/api4"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/store/sqlstore"
|
||||
"github.com/mattermost/mattermost-server/store/storetest"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
"github.com/mattermost/mattermost-server/wsapi"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
)
|
||||
|
||||
type TestHelper struct {
|
||||
@@ -233,8 +232,8 @@ func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team) {
|
||||
|
||||
err := me.App.JoinUserToTeam(team, user, "")
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -254,6 +253,9 @@ func (me *TestHelper) UpdateUserToTeamAdmin(user *model.User, team *model.Team)
|
||||
}
|
||||
} else {
|
||||
utils.EnableDebugLogForTest()
|
||||
mlog.Error(tmr.Err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(tmr.Err)
|
||||
}
|
||||
|
||||
@@ -272,6 +274,9 @@ func (me *TestHelper) UpdateUserToNonTeamAdmin(user *model.User, team *model.Tea
|
||||
}
|
||||
} else {
|
||||
utils.EnableDebugLogForTest()
|
||||
mlog.Error(tmr.Err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(tmr.Err)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitChannel() {
|
||||
@@ -203,7 +203,7 @@ func updateChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
if oldChannelDisplayName != channel.DisplayName {
|
||||
if err := c.App.PostUpdateChannelDisplayNameMessage(c.Session.UserId, channel, oldChannelDisplayName, channel.DisplayName); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
c.LogAudit("name=" + channel.Name)
|
||||
@@ -251,7 +251,7 @@ func updateChannelHeader(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
} else {
|
||||
if err := c.App.PostUpdateChannelHeaderMessage(c.Session.UserId, channel, oldChannelHeader, channelHeader); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
c.LogAudit("name=" + channel.Name)
|
||||
w.Write([]byte(channel.ToJson()))
|
||||
@@ -297,7 +297,7 @@ func updateChannelPurpose(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
} else {
|
||||
if err := c.App.PostUpdateChannelPurposeMessage(c.Session.UserId, channel, oldChannelPurpose, channelPurpose); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
c.LogAudit("name=" + channel.Name)
|
||||
w.Write([]byte(channel.ToJson()))
|
||||
@@ -318,7 +318,7 @@ func getChannels(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if _, err := c.App.GetUser(c.Session.UserId); err != nil {
|
||||
c.Err = err
|
||||
c.RemoveSessionCookie(w, r)
|
||||
l4g.Error(utils.T("api.channel.get_channels.error"), c.Session.UserId)
|
||||
mlog.Error(fmt.Sprintf("Error in getting users profile for id=%v forcing logout", c.Session.UserId), mlog.String("user_id", c.Session.UserId))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -101,7 +101,7 @@ type handler struct {
|
||||
|
||||
func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
now := time.Now()
|
||||
l4g.Debug("%v", r.URL.Path)
|
||||
mlog.Debug(fmt.Sprintf("%v", r.URL.Path))
|
||||
|
||||
c := &Context{}
|
||||
c.App = h.app
|
||||
@@ -146,7 +146,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
session, err := c.App.GetSession(token)
|
||||
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.context.invalid_session.error"), err.Error())
|
||||
mlog.Error(fmt.Sprintf("Invalid session err=%v", err.Error()))
|
||||
c.RemoveSessionCookie(w, r)
|
||||
if h.requireUser || h.requireSystemAdmin {
|
||||
c.Err = model.NewAppError("ServeHTTP", "api.context.session_expired.app_error", nil, "token="+token, http.StatusUnauthorized)
|
||||
@@ -268,14 +268,14 @@ func (c *Context) LogError(err *model.AppError) {
|
||||
if c.Path == "/api/v3/users/websocket" && err.StatusCode == 401 || err.Id == "web.check_browser_compatibility.app_error" {
|
||||
c.LogDebug(err)
|
||||
} else if err.Id != "api.post.create_post.town_square_read_only" {
|
||||
l4g.Error(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError)
|
||||
mlog.Error(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Context) LogDebug(err *model.AppError) {
|
||||
l4g.Debug(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError)
|
||||
mlog.Debug(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId))
|
||||
}
|
||||
|
||||
func (c *Context) UserRequired() {
|
||||
@@ -387,7 +387,7 @@ func (c *Context) GetTeamURL() string {
|
||||
if !c.teamURLValid {
|
||||
c.SetTeamURLFromSession()
|
||||
if !c.teamURLValid {
|
||||
l4g.Debug(utils.T("api.context.invalid_team_url.debug"))
|
||||
mlog.Debug("Team URL accessed when not valid. Team URL should not be used in API functions or those that are team independent")
|
||||
}
|
||||
}
|
||||
return c.teamURL
|
||||
@@ -424,7 +424,7 @@ func IsApiCall(r *http.Request) bool {
|
||||
func Handle404(a *app.App, w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
|
||||
l4g.Debug("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r))
|
||||
mlog.Debug(fmt.Sprintf("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r)))
|
||||
|
||||
if IsApiCall(r) {
|
||||
w.WriteHeader(err.StatusCode)
|
||||
|
||||
13
api/user.go
13
api/user.go
@@ -11,12 +11,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitUser() {
|
||||
@@ -245,7 +244,7 @@ func getMe(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if user, err := c.App.GetUser(c.Session.UserId); err != nil {
|
||||
c.Err = err
|
||||
c.RemoveSessionCookie(w, r)
|
||||
l4g.Error(utils.T("api.user.get_me.getting.error"), c.Session.UserId)
|
||||
mlog.Error(fmt.Sprintf("Error in getting users profile for id=%v forcing logout", c.Session.UserId), mlog.String("user_id", c.Session.UserId))
|
||||
return
|
||||
} else if c.HandleEtag(user.Etag(c.App.Config().PrivacySettings.ShowFullName, c.App.Config().PrivacySettings.ShowEmailAddress), "Get Me", w, r) {
|
||||
return
|
||||
@@ -1042,12 +1041,12 @@ func updateMfa(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
var user *model.User
|
||||
var err *model.AppError
|
||||
if user, err = c.App.GetUser(c.Session.UserId); err != nil {
|
||||
l4g.Warn(err.Error())
|
||||
mlog.Warn(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if err := c.App.SendMfaChangeEmail(user.Email, activate, user.Locale, c.App.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1171,7 +1170,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if len(teamId) > 0 {
|
||||
c.App.Go(func() {
|
||||
if err := c.App.AddUserToTeamByTeamId(teamId, user); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
} else {
|
||||
c.App.AddDirectChannels(teamId, user)
|
||||
}
|
||||
@@ -1185,7 +1184,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.LogAuditWithUserId(user.Id, "Revoked all sessions for user")
|
||||
c.App.Go(func() {
|
||||
if err := c.App.SendSignInChangeEmail(user.Email, strings.Title(model.USER_AUTH_SERVICE_SAML)+" SSO", user.Locale, c.App.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitWebSocket() {
|
||||
@@ -25,7 +25,7 @@ func connect(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ws, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.web_socket.connect.error"), err)
|
||||
mlog.Error(fmt.Sprintf("websocket connect err: %v", err))
|
||||
c.Err = model.NewAppError("connect", "api.web_socket.connect.upgrade.app_error", nil, "", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
package api4
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
@@ -243,7 +244,7 @@ func Init(a *app.App, root *mux.Router, full bool) *API {
|
||||
func Handle404(w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
|
||||
l4g.Debug("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r))
|
||||
mlog.Debug(fmt.Sprintf("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r)))
|
||||
|
||||
w.WriteHeader(err.StatusCode)
|
||||
err.DetailedError = "There doesn't appear to be an api call for the url='" + r.URL.Path + "'."
|
||||
|
||||
@@ -8,20 +8,29 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/store/storetest"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
|
||||
// Setup a global logger to catch tests logging outside of app context
|
||||
// The global logger will be stomped by apps initalizing but that's fine for testing. Ideally this won't happen.
|
||||
mlog.InitGlobalLogger(mlog.NewLogger(&mlog.LoggerConfiguration{
|
||||
EnableConsole: true,
|
||||
ConsoleJson: true,
|
||||
ConsoleLevel: "error",
|
||||
EnableFile: false,
|
||||
}))
|
||||
|
||||
utils.TranslationsPreInit()
|
||||
|
||||
// In the case where a dev just wants to run a single test, it's faster to just use the default
|
||||
// store.
|
||||
if filter := flag.Lookup("test.run").Value.String(); filter != "" && filter != "." {
|
||||
l4g.Info("-test.run used, not creating temporary containers")
|
||||
mlog.Info("-test.run used, not creating temporary containers")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/store/sqlstore"
|
||||
@@ -156,13 +156,13 @@ func (me *TestHelper) TearDown() {
|
||||
options := map[string]bool{}
|
||||
options[store.USER_SEARCH_OPTION_NAMES_ONLY_NO_FULL_NAME] = true
|
||||
if result := <-me.App.Srv.Store.User().Search("", "fakeuser", options); result.Err != nil {
|
||||
l4g.Error("Error tearing down test users")
|
||||
mlog.Error("Error tearing down test users")
|
||||
} else {
|
||||
users := result.Data.([]*model.User)
|
||||
|
||||
for _, u := range users {
|
||||
if err := me.App.PermanentDeleteUser(u); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,13 +171,13 @@ func (me *TestHelper) TearDown() {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
if result := <-me.App.Srv.Store.Team().SearchByName("faketeam"); result.Err != nil {
|
||||
l4g.Error("Error tearing down test teams")
|
||||
mlog.Error("Error tearing down test teams")
|
||||
} else {
|
||||
teams := result.Data.([]*model.Team)
|
||||
|
||||
for _, t := range teams {
|
||||
if err := me.App.PermanentDeleteTeam(t); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ func (me *TestHelper) TearDown() {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
if result := <-me.App.Srv.Store.OAuth().GetApps(0, 1000); result.Err != nil {
|
||||
l4g.Error("Error tearing down test oauth apps")
|
||||
mlog.Error("Error tearing down test oauth apps")
|
||||
} else {
|
||||
apps := result.Data.([]*model.OAuthApp)
|
||||
|
||||
@@ -450,8 +450,8 @@ func (me *TestHelper) UpdateActiveUser(user *model.User, active bool) {
|
||||
|
||||
_, err := me.App.UpdateActive(user, active)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -464,8 +464,8 @@ func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team) {
|
||||
|
||||
err := me.App.JoinUserToTeam(team, user, "")
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -478,8 +478,8 @@ func (me *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel)
|
||||
|
||||
member, err := me.App.AddUserToChannel(user, channel)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -790,6 +790,9 @@ func (me *TestHelper) UpdateUserToTeamAdmin(user *model.User, team *model.Team)
|
||||
}
|
||||
} else {
|
||||
utils.EnableDebugLogForTest()
|
||||
mlog.Error(tmr.Err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(tmr.Err)
|
||||
}
|
||||
|
||||
@@ -808,6 +811,9 @@ func (me *TestHelper) UpdateUserToNonTeamAdmin(user *model.User, team *model.Tea
|
||||
}
|
||||
} else {
|
||||
utils.EnableDebugLogForTest()
|
||||
mlog.Error(tmr.Err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(tmr.Err)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ package api4
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -139,7 +138,7 @@ func updateChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
if oldChannelDisplayName != channel.DisplayName {
|
||||
if err := c.App.PostUpdateChannelDisplayNameMessage(c.Session.UserId, channel, oldChannelDisplayName, channel.DisplayName); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -90,7 +90,7 @@ type handler struct {
|
||||
|
||||
func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
now := time.Now()
|
||||
l4g.Debug("%v - %v", r.Method, r.URL.Path)
|
||||
mlog.Debug(fmt.Sprintf("%v - %v", r.Method, r.URL.Path))
|
||||
|
||||
c := &Context{}
|
||||
c.App = h.app
|
||||
@@ -124,7 +124,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
session, err := c.App.GetSession(token)
|
||||
|
||||
if err != nil {
|
||||
l4g.Info(utils.T("api.context.invalid_session.error"), err.Error())
|
||||
mlog.Info(fmt.Sprintf("Invalid session err=%v", err.Error()))
|
||||
if err.StatusCode == http.StatusInternalServerError {
|
||||
c.Err = err
|
||||
} else if h.requireSession {
|
||||
@@ -220,19 +220,19 @@ func (c *Context) LogError(err *model.AppError) {
|
||||
err.Id == "web.check_browser_compatibility.app_error" {
|
||||
c.LogDebug(err)
|
||||
} else {
|
||||
l4g.Error(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError)
|
||||
mlog.Error(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId))
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Context) LogInfo(err *model.AppError) {
|
||||
l4g.Info(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError)
|
||||
mlog.Info(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId))
|
||||
}
|
||||
|
||||
func (c *Context) LogDebug(err *model.AppError) {
|
||||
l4g.Debug(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError)
|
||||
mlog.Debug(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode,
|
||||
c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId))
|
||||
}
|
||||
|
||||
func (c *Context) IsSystemAdmin() bool {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -463,7 +463,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if err != nil {
|
||||
err.Translate(c.T)
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
if action == model.OAUTH_ACTION_MOBILE {
|
||||
w.Write([]byte(err.ToJson()))
|
||||
} else {
|
||||
@@ -475,7 +475,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
user, err := c.App.CompleteOAuth(service, body, teamId, props)
|
||||
if err != nil {
|
||||
err.Translate(c.T)
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
if action == model.OAUTH_ACTION_MOBILE {
|
||||
w.Write([]byte(err.ToJson()))
|
||||
} else {
|
||||
|
||||
@@ -8,7 +8,7 @@ package api4
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ const (
|
||||
)
|
||||
|
||||
func (api *API) InitPlugin() {
|
||||
l4g.Debug("EXPERIMENTAL: Initializing plugin api")
|
||||
mlog.Debug("EXPERIMENTAL: Initializing plugin api")
|
||||
|
||||
api.BaseRoutes.Plugins.Handle("", api.ApiSessionRequired(uploadPlugin)).Methods("POST")
|
||||
api.BaseRoutes.Plugins.Handle("", api.ApiSessionRequired(getPlugins)).Methods("GET")
|
||||
|
||||
@@ -5,11 +5,12 @@ package api4
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"runtime"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -61,7 +62,7 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
rdata := map[string]string{}
|
||||
rdata["status"] = "unhealthy"
|
||||
|
||||
l4g.Warn(utils.T("api.system.go_routines"), actualGoroutines, *c.App.Config().ServiceSettings.GoroutineHealthThreshold)
|
||||
mlog.Warn(fmt.Sprintf("The number of running goroutines is over the health threshold %v of %v", actualGoroutines, *c.App.Config().ServiceSettings.GoroutineHealthThreshold))
|
||||
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
w.Write([]byte(model.MapToJson(rdata)))
|
||||
@@ -229,7 +230,7 @@ func postLog(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
err.Where = "client"
|
||||
c.LogError(err)
|
||||
} else {
|
||||
l4g.Debug(msg)
|
||||
mlog.Debug(fmt.Sprint(msg))
|
||||
}
|
||||
|
||||
m["message"] = msg
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -392,7 +392,7 @@ func TestGetLogs(t *testing.T) {
|
||||
Client := th.Client
|
||||
|
||||
for i := 0; i < 20; i++ {
|
||||
l4g.Info(i)
|
||||
mlog.Info(fmt.Sprint(i))
|
||||
}
|
||||
|
||||
logs, resp := th.SystemAdminClient.GetLogs(0, 10)
|
||||
@@ -534,6 +534,28 @@ func TestGetAnalyticsOld(t *testing.T) {
|
||||
_, resp = th.SystemAdminClient.GetAnalyticsOld("", th.BasicTeam.Id)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
rows2, resp2 := th.SystemAdminClient.GetAnalyticsOld("standard", "")
|
||||
CheckNoError(t, resp2)
|
||||
assert.Equal(t, "total_websocket_connections", rows2[5].Name)
|
||||
assert.Equal(t, float64(0), rows2[5].Value)
|
||||
|
||||
WebSocketClient, err := th.CreateWebSocketClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
rows2, resp2 = th.SystemAdminClient.GetAnalyticsOld("standard", "")
|
||||
CheckNoError(t, resp2)
|
||||
assert.Equal(t, "total_websocket_connections", rows2[5].Name)
|
||||
assert.Equal(t, float64(1), rows2[5].Value)
|
||||
|
||||
WebSocketClient.Close()
|
||||
|
||||
rows2, resp2 = th.SystemAdminClient.GetAnalyticsOld("standard", "")
|
||||
CheckNoError(t, resp2)
|
||||
assert.Equal(t, "total_websocket_connections", rows2[5].Name)
|
||||
assert.Equal(t, float64(0), rows2[5].Value)
|
||||
|
||||
Client.Logout()
|
||||
_, resp = Client.GetAnalyticsOld("", th.BasicTeam.Id)
|
||||
CheckUnauthorizedStatus(t, resp)
|
||||
|
||||
21
api4/team.go
21
api4/team.go
@@ -32,6 +32,7 @@ func (api *API) InitTeam() {
|
||||
|
||||
api.BaseRoutes.Team.Handle("/image", api.ApiSessionRequiredTrustRequester(getTeamIcon)).Methods("GET")
|
||||
api.BaseRoutes.Team.Handle("/image", api.ApiSessionRequired(setTeamIcon)).Methods("POST")
|
||||
api.BaseRoutes.Team.Handle("/image", api.ApiSessionRequired(removeTeamIcon)).Methods("DELETE")
|
||||
|
||||
api.BaseRoutes.TeamMembers.Handle("", api.ApiSessionRequired(getTeamMembers)).Methods("GET")
|
||||
api.BaseRoutes.TeamMembers.Handle("/ids", api.ApiSessionRequired(getTeamMembersByIds)).Methods("POST")
|
||||
@@ -812,3 +813,23 @@ func setTeamIcon(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.LogAudit("")
|
||||
ReturnStatusOK(w)
|
||||
}
|
||||
|
||||
func removeTeamIcon(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.RequireTeamId()
|
||||
if c.Err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if !c.App.SessionHasPermissionToTeam(c.Session, c.Params.TeamId, model.PERMISSION_MANAGE_TEAM) {
|
||||
c.SetPermissionError(model.PERMISSION_MANAGE_TEAM)
|
||||
return
|
||||
}
|
||||
|
||||
if err := c.App.RemoveTeamIcon(c.Params.TeamId); err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
c.LogAudit("")
|
||||
ReturnStatusOK(w)
|
||||
}
|
||||
|
||||
@@ -2015,3 +2015,40 @@ func TestGetTeamIcon(t *testing.T) {
|
||||
_, resp = Client.GetTeamIcon(team.Id, "")
|
||||
CheckUnauthorizedStatus(t, resp)
|
||||
}
|
||||
|
||||
func TestRemoveTeamIcon(t *testing.T) {
|
||||
th := Setup().InitBasic().InitSystemAdmin()
|
||||
defer th.TearDown()
|
||||
Client := th.Client
|
||||
team := th.BasicTeam
|
||||
|
||||
th.LoginTeamAdmin()
|
||||
data, _ := readTestFile("test.png")
|
||||
Client.SetTeamIcon(team.Id, data)
|
||||
|
||||
_, resp := Client.RemoveTeamIcon(team.Id)
|
||||
CheckNoError(t, resp)
|
||||
teamAfter, _ := th.App.GetTeam(team.Id)
|
||||
if teamAfter.LastTeamIconUpdate != 0 {
|
||||
t.Fatal("should update LastTeamIconUpdate to 0")
|
||||
}
|
||||
|
||||
Client.SetTeamIcon(team.Id, data)
|
||||
|
||||
_, resp = th.SystemAdminClient.RemoveTeamIcon(team.Id)
|
||||
CheckNoError(t, resp)
|
||||
teamAfter, _ = th.App.GetTeam(team.Id)
|
||||
if teamAfter.LastTeamIconUpdate != 0 {
|
||||
t.Fatal("should update LastTeamIconUpdate to 0")
|
||||
}
|
||||
|
||||
Client.SetTeamIcon(team.Id, data)
|
||||
Client.Logout()
|
||||
|
||||
_, resp = Client.RemoveTeamIcon(team.Id)
|
||||
CheckUnauthorizedStatus(t, resp)
|
||||
|
||||
th.LoginBasic()
|
||||
_, resp = Client.RemoveTeamIcon(team.Id)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
)
|
||||
@@ -1177,7 +1177,7 @@ func sendVerificationEmail(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
err = c.App.SendEmailVerification(user)
|
||||
if err != nil {
|
||||
// Don't want to leak whether the email is valid or not
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
ReturnStatusOK(w)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -4,16 +4,15 @@
|
||||
package api4
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/gorilla/schema"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitWebhook() {
|
||||
@@ -492,7 +491,7 @@ func incomingWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if c.App.Config().LogSettings.EnableWebhookDebugging {
|
||||
l4g.Debug(utils.T("api.webhook.incoming.debug"), incomingWebhookPayload.ToJson())
|
||||
mlog.Debug(fmt.Sprint("Incoming webhook received. Content=", incomingWebhookPayload.ToJson()))
|
||||
}
|
||||
|
||||
err = c.App.HandleIncomingWebhook(id, incomingWebhookPayload)
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
package api4
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitWebSocket() {
|
||||
@@ -25,7 +25,7 @@ func connectWebSocket(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ws, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.web_socket.connect.error"), err)
|
||||
mlog.Error(fmt.Sprintf("websocket connect err: %v", err))
|
||||
c.Err = model.NewAppError("connect", "api.web_socket.connect.upgrade.app_error", nil, "", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -137,7 +137,7 @@ func (a *App) InvalidateAllCaches() *model.AppError {
|
||||
}
|
||||
|
||||
func (a *App) InvalidateAllCachesSkipSend() {
|
||||
l4g.Info(utils.T("api.context.invalidate_all_caches"))
|
||||
mlog.Info("Purging all caches")
|
||||
a.sessionCache.Purge()
|
||||
ClearStatusCache()
|
||||
a.Srv.Store.Channel().ClearCaches()
|
||||
@@ -209,7 +209,7 @@ func (a *App) SaveConfig(cfg *model.Config, sendConfigChangeClusterMessage bool)
|
||||
func (a *App) RecycleDatabaseConnection() {
|
||||
oldStore := a.Srv.Store
|
||||
|
||||
l4g.Warn(utils.T("api.admin.recycle_db_start.warn"))
|
||||
mlog.Warn("Attempting to recycle the database connection.")
|
||||
a.Srv.Store = a.newStore()
|
||||
a.Jobs.Store = a.Srv.Store
|
||||
|
||||
@@ -218,7 +218,7 @@ func (a *App) RecycleDatabaseConnection() {
|
||||
oldStore.Close()
|
||||
}
|
||||
|
||||
l4g.Warn(utils.T("api.admin.recycle_db_end.warn"))
|
||||
mlog.Warn("Finished recycling the database connection.")
|
||||
}
|
||||
|
||||
func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError {
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"fmt"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
)
|
||||
@@ -22,7 +24,7 @@ func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *mo
|
||||
} else {
|
||||
systemUserCount = r.Data.(int64)
|
||||
if systemUserCount > int64(*a.Config().AnalyticsSettings.MaxUsersForStatistics) {
|
||||
l4g.Debug("More than %v users on the system, intensive queries skipped", *a.Config().AnalyticsSettings.MaxUsersForStatistics)
|
||||
mlog.Debug(fmt.Sprintf("More than %v users on the system, intensive queries skipped", *a.Config().AnalyticsSettings.MaxUsersForStatistics))
|
||||
skipIntensiveQueries = true
|
||||
}
|
||||
}
|
||||
|
||||
51
app/app.go
51
app/app.go
@@ -5,6 +5,7 @@ package app
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -13,13 +14,13 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/mattermost/mattermost-server/einterfaces"
|
||||
ejobs "github.com/mattermost/mattermost-server/einterfaces/jobs"
|
||||
"github.com/mattermost/mattermost-server/jobs"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/plugin/pluginenv"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
@@ -35,6 +36,8 @@ type App struct {
|
||||
|
||||
Srv *Server
|
||||
|
||||
Log *mlog.Logger
|
||||
|
||||
PluginEnv *pluginenv.Environment
|
||||
PluginConfigListenerId string
|
||||
|
||||
@@ -77,6 +80,7 @@ type App struct {
|
||||
sessionCache *utils.Cache
|
||||
configListenerId string
|
||||
licenseListenerId string
|
||||
logListenerId string
|
||||
disableConfigWatch bool
|
||||
configWatcher *utils.ConfigWatcher
|
||||
asymmetricSigningKey *ecdsa.PrivateKey
|
||||
@@ -127,15 +131,23 @@ func New(options ...Option) (outApp *App, outErr error) {
|
||||
}
|
||||
model.AppErrorInit(utils.T)
|
||||
|
||||
// The first time we load config, clear any existing filters to allow the configuration
|
||||
// changes to take effect. This is safe only because no one else is logging at this point.
|
||||
l4g.Close()
|
||||
|
||||
if err := app.LoadConfig(app.configFile); err != nil {
|
||||
// Re-initialize the default logger as we bail out.
|
||||
l4g.Global = l4g.NewDefaultLogger(l4g.DEBUG)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Initalize logging
|
||||
app.Log = mlog.NewLogger(utils.MloggerConfigFromLoggerConfig(&app.Config().LogSettings))
|
||||
|
||||
// Redirect default golang logger to this logger
|
||||
mlog.RedirectStdLog(app.Log)
|
||||
|
||||
// Use this app logger as the global logger (eventually remove all instances of global logging)
|
||||
mlog.InitGlobalLogger(app.Log)
|
||||
|
||||
app.logListenerId = app.AddConfigListener(func(_, after *model.Config) {
|
||||
app.Log.ChangeLevels(utils.MloggerConfigFromLoggerConfig(&after.LogSettings))
|
||||
})
|
||||
|
||||
app.EnableConfigWatch()
|
||||
|
||||
app.LoadTimezones()
|
||||
@@ -166,7 +178,7 @@ func New(options ...Option) (outApp *App, outErr error) {
|
||||
})
|
||||
app.regenerateClientConfig()
|
||||
|
||||
l4g.Info(utils.T("api.server.new_server.init.info"))
|
||||
mlog.Info("Server is initializing...")
|
||||
|
||||
app.initEnterprise()
|
||||
|
||||
@@ -177,7 +189,7 @@ func New(options ...Option) (outApp *App, outErr error) {
|
||||
}
|
||||
|
||||
if htmlTemplateWatcher, err := utils.NewHTMLTemplateWatcher("templates"); err != nil {
|
||||
l4g.Error(utils.T("api.api.init.parsing_templates.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to parse server templates %v", err))
|
||||
} else {
|
||||
app.htmlTemplateWatcher = htmlTemplateWatcher
|
||||
}
|
||||
@@ -210,7 +222,7 @@ func (a *App) configOrLicenseListener() {
|
||||
func (a *App) Shutdown() {
|
||||
appCount--
|
||||
|
||||
l4g.Info(utils.T("api.server.stop_server.stopping.info"))
|
||||
mlog.Info("Stopping Server...")
|
||||
|
||||
a.StopServer()
|
||||
a.HubStop()
|
||||
@@ -229,7 +241,8 @@ func (a *App) Shutdown() {
|
||||
|
||||
a.RemoveConfigListener(a.configListenerId)
|
||||
a.RemoveLicenseListener(a.licenseListenerId)
|
||||
l4g.Info(utils.T("api.server.stop_server.stopped.info"))
|
||||
a.RemoveConfigListener(a.logListenerId)
|
||||
mlog.Info("Server stopped")
|
||||
|
||||
a.DisableConfigWatch()
|
||||
}
|
||||
@@ -499,7 +512,7 @@ func (a *App) HTTPClient(trustURLs bool) *http.Client {
|
||||
func (a *App) Handle404(w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
|
||||
l4g.Debug("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r))
|
||||
mlog.Debug(fmt.Sprintf("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r)))
|
||||
|
||||
utils.RenderWebAppError(w, r, err, a.AsymmetricSigningKey())
|
||||
}
|
||||
@@ -511,7 +524,7 @@ func (a *App) DoAdvancedPermissionsMigration() {
|
||||
return
|
||||
}
|
||||
|
||||
l4g.Info("Migrating roles to database.")
|
||||
mlog.Info("Migrating roles to database.")
|
||||
roles := model.MakeDefaultRoles()
|
||||
roles = utils.SetRolePermissionsFromConfig(roles, a.Config(), a.License() != nil)
|
||||
|
||||
@@ -521,8 +534,8 @@ func (a *App) DoAdvancedPermissionsMigration() {
|
||||
if result := <-a.Srv.Store.Role().Save(role); result.Err != nil {
|
||||
// If this failed for reasons other than the role already existing, don't mark the migration as done.
|
||||
if result2 := <-a.Srv.Store.Role().GetByName(role.Name); result2.Err != nil {
|
||||
l4g.Critical("Failed to migrate role to database.")
|
||||
l4g.Critical(result.Err)
|
||||
mlog.Critical("Failed to migrate role to database.")
|
||||
mlog.Critical(fmt.Sprint(result.Err))
|
||||
allSucceeded = false
|
||||
} else {
|
||||
// If the role already existed, check it is the same and update if not.
|
||||
@@ -534,8 +547,8 @@ func (a *App) DoAdvancedPermissionsMigration() {
|
||||
role.Id = fetchedRole.Id
|
||||
if result := <-a.Srv.Store.Role().Save(role); result.Err != nil {
|
||||
// Role is not the same, but failed to update.
|
||||
l4g.Critical("Failed to migrate role to database.")
|
||||
l4g.Critical(result.Err)
|
||||
mlog.Critical("Failed to migrate role to database.")
|
||||
mlog.Critical(fmt.Sprint(result.Err))
|
||||
allSucceeded = false
|
||||
}
|
||||
}
|
||||
@@ -553,7 +566,7 @@ func (a *App) DoAdvancedPermissionsMigration() {
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.System().Save(&system); result.Err != nil {
|
||||
l4g.Critical("Failed to mark advanced permissions migration as completed.")
|
||||
l4g.Critical(result.Err)
|
||||
mlog.Critical("Failed to mark advanced permissions migration as completed.")
|
||||
mlog.Critical(fmt.Sprint(result.Err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store/storetest"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -20,12 +20,22 @@ import (
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
|
||||
// Setup a global logger to catch tests logging outside of app context
|
||||
// The global logger will be stomped by apps initalizing but that's fine for testing. Ideally this won't happen.
|
||||
mlog.InitGlobalLogger(mlog.NewLogger(&mlog.LoggerConfiguration{
|
||||
EnableConsole: true,
|
||||
ConsoleJson: true,
|
||||
ConsoleLevel: "error",
|
||||
EnableFile: false,
|
||||
}))
|
||||
|
||||
utils.TranslationsPreInit()
|
||||
|
||||
// In the case where a dev just wants to run a single test, it's faster to just use the default
|
||||
// store.
|
||||
if filter := flag.Lookup("test.run").Value.String(); filter != "" && filter != "." {
|
||||
l4g.Info("-test.run used, not creating temporary containers")
|
||||
mlog.Info("-test.run used, not creating temporary containers")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,8 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/plugin"
|
||||
"github.com/mattermost/mattermost-server/plugin/pluginenv"
|
||||
@@ -169,8 +168,8 @@ func (me *TestHelper) CreateTeam() *model.Team {
|
||||
utils.DisableDebugLogForTest()
|
||||
var err *model.AppError
|
||||
if team, err = me.App.CreateTeam(team); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -192,8 +191,8 @@ func (me *TestHelper) CreateUser() *model.User {
|
||||
utils.DisableDebugLogForTest()
|
||||
var err *model.AppError
|
||||
if user, err = me.App.CreateUser(user); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -219,8 +218,8 @@ func (me *TestHelper) createChannel(team *model.Team, channelType string) *model
|
||||
utils.DisableDebugLogForTest()
|
||||
var err *model.AppError
|
||||
if channel, err = me.App.CreateChannel(channel, true); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -233,8 +232,8 @@ func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel {
|
||||
var err *model.AppError
|
||||
var channel *model.Channel
|
||||
if channel, err = me.App.CreateDirectChannel(me.BasicUser.Id, user.Id); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -255,8 +254,8 @@ func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post {
|
||||
utils.DisableDebugLogForTest()
|
||||
var err *model.AppError
|
||||
if post, err = me.App.CreatePost(post, channel, false); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -269,8 +268,8 @@ func (me *TestHelper) LinkUserToTeam(user *model.User, team *model.Team) {
|
||||
|
||||
err := me.App.JoinUserToTeam(team, user, "")
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
@@ -283,8 +282,8 @@ func (me *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel)
|
||||
|
||||
member, err := me.App.AddUserToChannel(user, channel)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
l4g.Close()
|
||||
mlog.Error(err.Error())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -193,8 +194,8 @@ func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
|
||||
if err != nil {
|
||||
// This should only happen if something is very broken. We can't realistically
|
||||
// recover the situation, so deny permission and log an error.
|
||||
l4g.Error("Failed to get roles from database with role names: " + strings.Join(roleNames, ","))
|
||||
l4g.Error(err)
|
||||
mlog.Error("Failed to get roles from database with role names: " + strings.Join(roleNames, ","))
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -28,7 +27,7 @@ func (a *App) SendAutoResponse(channel *model.Channel, receiver *model.User, roo
|
||||
}
|
||||
|
||||
if _, err := a.CreatePost(autoResponderPost, channel, false); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
)
|
||||
|
||||
type AutoUserCreator struct {
|
||||
@@ -75,7 +74,7 @@ func (cfg *AutoUserCreator) createRandomUser() (*model.User, bool) {
|
||||
|
||||
result, err := cfg.client.CreateUserWithInvite(user, "", "", cfg.team.InviteId)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
return nil, false
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ func (cfg *AutoUserCreator) createRandomUser() (*model.User, bool) {
|
||||
|
||||
status := &model.Status{UserId: ruser.Id, Status: model.STATUS_ONLINE, Manual: false, LastActivityAt: model.GetMillis(), ActiveChannel: ""}
|
||||
if result := <-cfg.app.Srv.Store.Status().SaveOrUpdate(status); result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -61,17 +61,17 @@ func (a *App) JoinDefaultChannels(teamId string, user *model.User, shouldBeAdmin
|
||||
err = cmResult.Err
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(user.Id, townSquare.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
if *a.Config().ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages {
|
||||
if requestor == nil {
|
||||
if err := a.postJoinTeamMessage(user, townSquare); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
} else {
|
||||
if err := a.postAddToTeamMessage(requestor, user, townSquare, ""); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,16 +95,16 @@ func (a *App) JoinDefaultChannels(teamId string, user *model.User, shouldBeAdmin
|
||||
err = cmResult.Err
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(user.Id, offTopic.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
if requestor == nil {
|
||||
if err := a.postJoinChannelMessage(user, offTopic); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
} else {
|
||||
if err := a.PostAddToChannelMessage(requestor, user, offTopic, ""); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ func (a *App) CreateChannel(channel *model.Channel, addMember bool) (*model.Chan
|
||||
return nil, cmresult.Err
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(channel.CreatorId, sc.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
a.InvalidateCacheForUser(channel.CreatorId)
|
||||
@@ -230,10 +230,10 @@ func (a *App) createDirectChannel(userId string, otherUserId string) (*model.Cha
|
||||
channel := result.Data.(*model.Channel)
|
||||
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(userId, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(otherUserId, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
return channel, nil
|
||||
@@ -261,7 +261,7 @@ func (a *App) WaitForChannelMembership(channelId string, userId string) {
|
||||
}
|
||||
}
|
||||
|
||||
l4g.Error("WaitForChannelMembership giving up channelId=%v userId=%v", channelId, userId)
|
||||
mlog.Error(fmt.Sprintf("WaitForChannelMembership giving up channelId=%v userId=%v", channelId, userId), mlog.String("user_id", userId))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ func (a *App) createGroupChannel(userIds []string, creatorId string) (*model.Cha
|
||||
return nil, result.Err
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(user.Id, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,19 +416,19 @@ func (a *App) PatchChannel(channel *model.Channel, patch *model.ChannelPatch, us
|
||||
|
||||
if oldChannelDisplayName != channel.DisplayName {
|
||||
if err := a.PostUpdateChannelDisplayNameMessage(userId, channel, oldChannelDisplayName, channel.DisplayName); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
if channel.Header != oldChannelHeader {
|
||||
if err := a.PostUpdateChannelHeaderMessage(userId, channel, oldChannelHeader, channel.Header); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
if channel.Purpose != oldChannelPurpose {
|
||||
if err := a.PostUpdateChannelPurposeMessage(userId, channel, oldChannelPurpose, channel.Purpose); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,21 +600,21 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
|
||||
}
|
||||
|
||||
if _, err := a.CreatePost(post, channel, false); err != nil {
|
||||
l4g.Error(utils.T("api.channel.delete_channel.failed_post.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to post archive message %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
now := model.GetMillis()
|
||||
for _, hook := range incomingHooks {
|
||||
if result := <-a.Srv.Store.Webhook().DeleteIncoming(hook.Id, now); result.Err != nil {
|
||||
l4g.Error(utils.T("api.channel.delete_channel.incoming_webhook.error"), hook.Id)
|
||||
mlog.Error(fmt.Sprintf("Encountered error deleting incoming webhook, id=%v", hook.Id))
|
||||
}
|
||||
a.InvalidateCacheForWebhook(hook.Id)
|
||||
}
|
||||
|
||||
for _, hook := range outgoingHooks {
|
||||
if result := <-a.Srv.Store.Webhook().DeleteOutgoing(hook.Id, now); result.Err != nil {
|
||||
l4g.Error(utils.T("api.channel.delete_channel.outgoing_webhook.error"), hook.Id)
|
||||
mlog.Error(fmt.Sprintf("Encountered error deleting outgoing webhook, id=%v", hook.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,13 +658,13 @@ func (a *App) addUserToChannel(user *model.User, channel *model.Channel, teamMem
|
||||
SchemeUser: true,
|
||||
}
|
||||
if result := <-a.Srv.Store.Channel().SaveMember(newMember); result.Err != nil {
|
||||
l4g.Error("Failed to add member user_id=%v channel_id=%v err=%v", user.Id, channel.Id, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to add member user_id=%v channel_id=%v err=%v", user.Id, channel.Id, result.Err), mlog.String("user_id", user.Id))
|
||||
return nil, model.NewAppError("AddUserToChannel", "api.channel.add_user.to.channel.failed.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
a.WaitForChannelMembership(channel.Id, user.Id)
|
||||
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(user.Id, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
a.InvalidateCacheForUser(user.Id)
|
||||
@@ -1513,10 +1513,10 @@ func (a *App) GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.
|
||||
|
||||
channel := result.Data.(*model.Channel)
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(userId1, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
if result := <-a.Srv.Store.ChannelMemberHistory().LogJoinEvent(userId2, channel.Id, model.GetMillis()); result.Err != nil {
|
||||
l4g.Warn("Failed to update ChannelMemberHistory table %v", result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update ChannelMemberHistory table %v", result.Err))
|
||||
}
|
||||
|
||||
return channel, nil
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -36,36 +36,36 @@ func (me *ClusterDiscoveryService) Start() {
|
||||
<-me.app.Srv.Store.ClusterDiscovery().Cleanup()
|
||||
|
||||
if cresult := <-me.app.Srv.Store.ClusterDiscovery().Exists(&me.ClusterDiscovery); cresult.Err != nil {
|
||||
l4g.Error(fmt.Sprintf("ClusterDiscoveryService failed to check if row exists for %v with err=%v", me.ClusterDiscovery.ToJson(), cresult.Err))
|
||||
mlog.Error(fmt.Sprintf("ClusterDiscoveryService failed to check if row exists for %v with err=%v", me.ClusterDiscovery.ToJson(), cresult.Err))
|
||||
} else {
|
||||
if cresult.Data.(bool) {
|
||||
if u := <-me.app.Srv.Store.ClusterDiscovery().Delete(&me.ClusterDiscovery); u.Err != nil {
|
||||
l4g.Error(fmt.Sprintf("ClusterDiscoveryService failed to start clean for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
mlog.Error(fmt.Sprintf("ClusterDiscoveryService failed to start clean for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if result := <-me.app.Srv.Store.ClusterDiscovery().Save(&me.ClusterDiscovery); result.Err != nil {
|
||||
l4g.Error(fmt.Sprintf("ClusterDiscoveryService failed to save for %v with err=%v", me.ClusterDiscovery.ToJson(), result.Err))
|
||||
mlog.Error(fmt.Sprintf("ClusterDiscoveryService failed to save for %v with err=%v", me.ClusterDiscovery.ToJson(), result.Err))
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
l4g.Debug(fmt.Sprintf("ClusterDiscoveryService ping writer started for %v", me.ClusterDiscovery.ToJson()))
|
||||
mlog.Debug(fmt.Sprintf("ClusterDiscoveryService ping writer started for %v", me.ClusterDiscovery.ToJson()))
|
||||
ticker := time.NewTicker(DISCOVERY_SERVICE_WRITE_PING)
|
||||
defer func() {
|
||||
ticker.Stop()
|
||||
if u := <-me.app.Srv.Store.ClusterDiscovery().Delete(&me.ClusterDiscovery); u.Err != nil {
|
||||
l4g.Error(fmt.Sprintf("ClusterDiscoveryService failed to cleanup for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
mlog.Error(fmt.Sprintf("ClusterDiscoveryService failed to cleanup for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
}
|
||||
l4g.Debug(fmt.Sprintf("ClusterDiscoveryService ping writer stopped for %v", me.ClusterDiscovery.ToJson()))
|
||||
mlog.Debug(fmt.Sprintf("ClusterDiscoveryService ping writer stopped for %v", me.ClusterDiscovery.ToJson()))
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
if u := <-me.app.Srv.Store.ClusterDiscovery().SetLastPingAt(&me.ClusterDiscovery); u.Err != nil {
|
||||
l4g.Error(fmt.Sprintf("ClusterDiscoveryService failed to write ping for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
mlog.Error(fmt.Sprintf("ClusterDiscoveryService failed to write ping for %v with err=%v", me.ClusterDiscovery.ToJson(), u.Err))
|
||||
}
|
||||
case <-me.stop:
|
||||
return
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
@@ -207,7 +207,7 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
|
||||
teamCmds := result.Data.([]*model.Command)
|
||||
for _, cmd := range teamCmds {
|
||||
if trigger == cmd.Trigger {
|
||||
l4g.Debug(fmt.Sprintf(utils.T("api.command.execute_command.debug"), trigger, args.UserId))
|
||||
mlog.Debug(fmt.Sprintf(utils.T("api.command.execute_command.debug"), trigger, args.UserId))
|
||||
|
||||
p := url.Values{}
|
||||
p.Set("token", cmd.Token)
|
||||
@@ -308,7 +308,7 @@ func (a *App) HandleCommandResponse(command *model.Command, args *model.CommandA
|
||||
response.Attachments = a.ProcessSlackAttachments(response.Attachments)
|
||||
|
||||
if _, err := a.CreateCommandPost(post, args.TeamId, response); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -89,7 +90,7 @@ func (me *EchoProvider) DoCommand(a *App, args *model.CommandArgs, message strin
|
||||
time.Sleep(time.Duration(delay) * time.Second)
|
||||
|
||||
if _, err := a.CreatePostMissingChannel(post, true); err != nil {
|
||||
l4g.Error(args.T("api.command_echo.create.app_error"), err)
|
||||
mlog.Error(fmt.Sprintf("Unable to create /echo post, err=%v", err))
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -95,7 +95,7 @@ func (me *groupmsgProvider) DoCommand(a *App, args *model.CommandArgs, message s
|
||||
|
||||
groupChannel, channelErr := a.CreateGroupChannel(targetUsersSlice, args.UserId)
|
||||
if channelErr != nil {
|
||||
l4g.Error(channelErr.Error())
|
||||
mlog.Error(channelErr.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_groupmsg.group_fail.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -41,7 +42,7 @@ func (me *InviteProvider) DoCommand(a *App, args *model.CommandArgs, message str
|
||||
return &model.CommandResponse{Text: args.T("api.command_invite.missing_message.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
}
|
||||
|
||||
l4g.Debug(message)
|
||||
mlog.Debug(fmt.Sprint(message))
|
||||
|
||||
splitMessage := strings.SplitN(message, " ", 2)
|
||||
targetUsername := splitMessage[0]
|
||||
@@ -49,7 +50,7 @@ func (me *InviteProvider) DoCommand(a *App, args *model.CommandArgs, message str
|
||||
|
||||
var userProfile *model.User
|
||||
if result := <-a.Srv.Store.User().GetByUsername(targetUsername); result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_invite.missing_user.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
} else {
|
||||
userProfile = result.Data.(*model.User)
|
||||
|
||||
@@ -6,7 +6,7 @@ package app
|
||||
import (
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -63,7 +63,7 @@ func (me *InvitePeopleProvider) DoCommand(a *App, args *model.CommandArgs, messa
|
||||
}
|
||||
|
||||
if err := a.InviteNewUsersToTeam(emailList, args.TeamId, args.UserId); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: args.T("api.command.invite_people.fail")}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
@@ -177,10 +177,10 @@ func (me *LoadTestProvider) SetupCommand(a *App, args *model.CommandArgs, messag
|
||||
if !err {
|
||||
return &model.CommandResponse{Text: "Failed to create testing environment", ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
} else {
|
||||
l4g.Info("Testing environment created")
|
||||
mlog.Info("Testing environment created")
|
||||
for i := 0; i < len(environment.Teams); i++ {
|
||||
l4g.Info("Team Created: " + environment.Teams[i].Name)
|
||||
l4g.Info("\t User to login: " + environment.Environments[i].Users[0].Email + ", " + USER_PASSWORD)
|
||||
mlog.Info("Team Created: " + environment.Teams[i].Name)
|
||||
mlog.Info("\t User to login: " + environment.Environments[i].Users[0].Email + ", " + USER_PASSWORD)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@ package app
|
||||
import (
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -50,7 +50,7 @@ func (me *msgProvider) DoCommand(a *App, args *model.CommandArgs, message string
|
||||
|
||||
var userProfile *model.User
|
||||
if result := <-a.Srv.Store.User().GetByUsername(targetUsername); result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_msg.missing.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
} else {
|
||||
userProfile = result.Data.(*model.User)
|
||||
@@ -67,13 +67,13 @@ func (me *msgProvider) DoCommand(a *App, args *model.CommandArgs, message string
|
||||
if channel := <-a.Srv.Store.Channel().GetByName(args.TeamId, channelName, true); channel.Err != nil {
|
||||
if channel.Err.Id == "store.sql_channel.get_by_name.missing.app_error" {
|
||||
if directChannel, err := a.CreateDirectChannel(args.UserId, userProfile.Id); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_msg.dm_fail.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
} else {
|
||||
targetChannelId = directChannel.Id
|
||||
}
|
||||
} else {
|
||||
l4g.Error(channel.Err.Error())
|
||||
mlog.Error(channel.Err.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_msg.dm_fail.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/nicksnyder/go-i18n/i18n"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestMuteCommandNoChannel(t *testing.T) {
|
||||
|
||||
@@ -6,9 +6,9 @@ package app
|
||||
import (
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ func doCommand(a *App, args *model.CommandArgs, message string) *model.CommandRe
|
||||
|
||||
var userProfile *model.User
|
||||
if result := <-a.Srv.Store.User().GetByUsername(targetUsername); result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
return &model.CommandResponse{Text: args.T("api.command_remove.missing.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
|
||||
} else {
|
||||
userProfile = result.Data.(*model.User)
|
||||
|
||||
@@ -17,8 +17,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -60,9 +59,6 @@ func (a *App) LoadConfig(configFile string) *model.AppError {
|
||||
|
||||
a.configFile = configPath
|
||||
|
||||
utils.ConfigureLog(&cfg.LogSettings)
|
||||
l4g.Info("Using config file at %s", configPath)
|
||||
|
||||
a.config.Store(cfg)
|
||||
a.envConfig = envConfig
|
||||
|
||||
@@ -101,7 +97,7 @@ func (a *App) EnableConfigWatch() {
|
||||
a.ReloadConfig()
|
||||
})
|
||||
if err != nil {
|
||||
l4g.Error(err)
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
}
|
||||
a.configWatcher = configWatcher
|
||||
}
|
||||
|
||||
@@ -5,11 +5,10 @@ package app
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"os"
|
||||
"runtime"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/segmentio/analytics-go"
|
||||
)
|
||||
@@ -69,12 +68,12 @@ func (a *App) SendDailyDiagnostics() {
|
||||
func (a *App) initDiagnostics(endpoint string) {
|
||||
if client == nil {
|
||||
client = analytics.New(SEGMENT_KEY)
|
||||
client.Logger = a.Log.StdLog(mlog.String("source", "segment"))
|
||||
// For testing
|
||||
if endpoint != "" {
|
||||
client.Endpoint = endpoint
|
||||
client.Verbose = true
|
||||
client.Size = 1
|
||||
client.Logger = log.New(os.Stdout, "segment ", log.LstdFlags)
|
||||
}
|
||||
client.Identify(&analytics.Identify{
|
||||
UserId: a.DiagnosticId(),
|
||||
@@ -273,6 +272,7 @@ func (a *App) trackConfig() {
|
||||
"isdefault_user_status_away_timeout": isDefault(*cfg.TeamSettings.UserStatusAwayTimeout, model.TEAM_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT),
|
||||
"restrict_private_channel_manage_members": *cfg.TeamSettings.RestrictPrivateChannelManageMembers,
|
||||
"enable_X_to_leave_channels_from_LHS": *cfg.TeamSettings.EnableXToLeaveChannelsFromLHS,
|
||||
"experimental_enable_automatic_replies": *cfg.TeamSettings.ExperimentalEnableAutomaticReplies,
|
||||
"experimental_town_square_is_read_only": *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly,
|
||||
"experimental_primary_team": isDefault(*cfg.TeamSettings.ExperimentalPrimaryTeam, ""),
|
||||
})
|
||||
@@ -299,10 +299,11 @@ func (a *App) trackConfig() {
|
||||
a.SendDiagnostic(TRACK_CONFIG_LOG, map[string]interface{}{
|
||||
"enable_console": cfg.LogSettings.EnableConsole,
|
||||
"console_level": cfg.LogSettings.ConsoleLevel,
|
||||
"console_json": *cfg.LogSettings.ConsoleJson,
|
||||
"enable_file": cfg.LogSettings.EnableFile,
|
||||
"file_level": cfg.LogSettings.FileLevel,
|
||||
"file_json": cfg.LogSettings.FileJson,
|
||||
"enable_webhook_debugging": cfg.LogSettings.EnableWebhookDebugging,
|
||||
"isdefault_file_format": isDefault(cfg.LogSettings.FileFormat, ""),
|
||||
"isdefault_file_location": isDefault(cfg.LogSettings.FileLocation, ""),
|
||||
})
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/nicksnyder/go-i18n/i18n"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -282,17 +282,17 @@ func (a *App) SendInviteEmails(team *model.Team, senderName string, invites []st
|
||||
data := model.MapToJson(props)
|
||||
|
||||
if result := <-a.Srv.Store.Token().Save(token); result.Err != nil {
|
||||
l4g.Error(utils.T("api.team.invite_members.send.error"), result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to send invite email successfully err=%v", result.Err))
|
||||
continue
|
||||
}
|
||||
bodyPage.Props["Link"] = fmt.Sprintf("%s/signup_user_complete/?d=%s&t=%s", siteURL, url.QueryEscape(data), url.QueryEscape(token.Token))
|
||||
|
||||
if !a.Config().EmailSettings.SendEmailNotifications {
|
||||
l4g.Info(utils.T("api.team.invite_members.sending.info"), invite, bodyPage.Props["Link"])
|
||||
mlog.Info(fmt.Sprintf("sending invitation to %v %v", invite, bodyPage.Props["Link"]))
|
||||
}
|
||||
|
||||
if err := a.SendMail(invite, subject, bodyPage.Render()); err != nil {
|
||||
l4g.Error(utils.T("api.team.invite_members.send.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to send invite email successfully err=%v", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
|
||||
@@ -41,7 +41,7 @@ func (a *App) AddNotificationEmailToBatch(user *model.User, post *model.Post, te
|
||||
}
|
||||
|
||||
if !a.EmailBatching.Add(user, post, team) {
|
||||
l4g.Error(utils.T("api.email_batching.add_notification_email_to_batch.channel_full.app_error"))
|
||||
mlog.Error("Email batching job's receiving channel was full. Please increase the EmailBatchingBufferSize.")
|
||||
return model.NewAppError("AddNotificationEmailToBatch", "api.email_batching.add_notification_email_to_batch.channel_full.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func NewEmailBatchingJob(a *App, bufferSize int) *EmailBatchingJob {
|
||||
}
|
||||
|
||||
func (job *EmailBatchingJob) Start() {
|
||||
l4g.Debug(utils.T("api.email_batching.start.starting"), *job.app.Config().EmailSettings.EmailBatchingInterval)
|
||||
mlog.Debug(fmt.Sprintf("Email batching job starting. Checking for pending emails every %v seconds.", *job.app.Config().EmailSettings.EmailBatchingInterval))
|
||||
newTask := model.CreateRecurringTask(EMAIL_BATCHING_TASK_NAME, job.CheckPendingEmails, time.Duration(*job.app.Config().EmailSettings.EmailBatchingInterval)*time.Second)
|
||||
|
||||
job.taskMutex.Lock()
|
||||
@@ -107,7 +107,7 @@ func (job *EmailBatchingJob) CheckPendingEmails() {
|
||||
// without actually sending emails
|
||||
job.checkPendingNotifications(time.Now(), job.app.sendBatchedEmailNotification)
|
||||
|
||||
l4g.Debug(utils.T("api.email_batching.check_pending_emails.finished_running"), len(job.pendingNotifications))
|
||||
mlog.Debug(fmt.Sprintf("Email batching job ran. %v user(s) still have notifications pending.", len(job.pendingNotifications)))
|
||||
}
|
||||
|
||||
func (job *EmailBatchingJob) handleNewNotifications() {
|
||||
@@ -141,7 +141,7 @@ func (job *EmailBatchingJob) checkPendingNotifications(now time.Time, handler fu
|
||||
}
|
||||
tchan := job.app.Srv.Store.Team().GetByName(notifications[0].teamName)
|
||||
if result := <-tchan; result.Err != nil {
|
||||
l4g.Error("Unable to find Team id for notification", result.Err)
|
||||
mlog.Error(fmt.Sprint("Unable to find Team id for notification", result.Err))
|
||||
continue
|
||||
} else if team, ok := result.Data.(*model.Team); ok {
|
||||
inspectedTeamNames[notification.teamName] = team.Id
|
||||
@@ -151,12 +151,12 @@ func (job *EmailBatchingJob) checkPendingNotifications(now time.Time, handler fu
|
||||
// all queued notifications
|
||||
mchan := job.app.Srv.Store.Channel().GetMembersForUser(inspectedTeamNames[notification.teamName], userId)
|
||||
if result := <-mchan; result.Err != nil {
|
||||
l4g.Error("Unable to find ChannelMembers for user", result.Err)
|
||||
mlog.Error(fmt.Sprint("Unable to find ChannelMembers for user", result.Err))
|
||||
continue
|
||||
} else if channelMembers, ok := result.Data.(*model.ChannelMembers); ok {
|
||||
for _, channelMember := range *channelMembers {
|
||||
if channelMember.LastViewedAt >= batchStartTime {
|
||||
l4g.Debug("Deleted notifications for user %s", userId)
|
||||
mlog.Debug(fmt.Sprintf("Deleted notifications for user %s", userId), mlog.String("user_id", userId))
|
||||
delete(job.pendingNotifications, userId)
|
||||
break
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
|
||||
|
||||
var user *model.User
|
||||
if result := <-uchan; result.Err != nil {
|
||||
l4g.Warn("api.email_batching.send_batched_email_notification.user.app_error")
|
||||
mlog.Warn("api.email_batching.send_batched_email_notification.user.app_error")
|
||||
return
|
||||
} else {
|
||||
user = result.Data.(*model.User)
|
||||
@@ -212,7 +212,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
|
||||
var sender *model.User
|
||||
schan := a.Srv.Store.User().Get(notification.post.UserId)
|
||||
if result := <-schan; result.Err != nil {
|
||||
l4g.Warn(utils.T("api.email_batching.render_batched_post.sender.app_error"))
|
||||
mlog.Warn("Unable to find sender of post for batched email notification")
|
||||
continue
|
||||
} else {
|
||||
sender = result.Data.(*model.User)
|
||||
@@ -221,7 +221,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
|
||||
var channel *model.Channel
|
||||
cchan := a.Srv.Store.Channel().Get(notification.post.ChannelId, true)
|
||||
if result := <-cchan; result.Err != nil {
|
||||
l4g.Warn(utils.T("api.email_batching.render_batched_post.channel.app_error"))
|
||||
mlog.Warn("Unable to find channel of post for batched email notification")
|
||||
continue
|
||||
} else {
|
||||
channel = result.Data.(*model.Channel)
|
||||
@@ -250,7 +250,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
|
||||
body.Props["BodyText"] = translateFunc("api.email_batching.send_batched_email_notification.body_text", len(notifications))
|
||||
|
||||
if err := a.SendMail(user.Email, subject, body.Render()); err != nil {
|
||||
l4g.Warn(utils.T("api.email_batchings.send_batched_email_notification.send.app_error"), user.Email, err)
|
||||
mlog.Warn(fmt.Sprint("api.email_batchings.send_batched_email_notification.send.app_error FIXME: NOT FOUND IN TRANSLATIONS FILE", user.Email, err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
app/emoji.go
11
app/emoji.go
@@ -5,6 +5,7 @@ package app
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/draw"
|
||||
"image/gif"
|
||||
@@ -14,13 +15,11 @@ import (
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"image/color/palette"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -242,13 +241,13 @@ func imageToPaletted(img image.Image) *image.Paletted {
|
||||
|
||||
func (a *App) deleteEmojiImage(id string) {
|
||||
if err := a.MoveFile(getEmojiImagePath(id), "emoji/"+id+"/image_deleted"); err != nil {
|
||||
l4g.Error("Failed to rename image when deleting emoji %v", id)
|
||||
mlog.Error(fmt.Sprintf("Failed to rename image when deleting emoji %v", id))
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) deleteReactionsForEmoji(emojiName string) {
|
||||
if result := <-a.Srv.Store.Reaction().DeleteAllWithEmojiName(emojiName); result.Err != nil {
|
||||
l4g.Warn(utils.T("api.emoji.delete.delete_reactions.app_error"), emojiName)
|
||||
l4g.Warn(result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Unable to delete reactions when deleting emoji with emoji name %v", emojiName))
|
||||
mlog.Warn(fmt.Sprint(result.Err))
|
||||
}
|
||||
}
|
||||
|
||||
40
app/file.go
40
app/file.go
@@ -22,11 +22,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/rwcarlsen/goexif/exif"
|
||||
_ "golang.org/x/image/bmp"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -98,7 +98,7 @@ func (a *App) GetInfoForFilename(post *model.Post, teamId string, filename strin
|
||||
// Find the path from the Filename of the form /{channelId}/{userId}/{uid}/{nameWithExtension}
|
||||
split := strings.SplitN(filename, "/", 5)
|
||||
if len(split) < 5 {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.unexpected_filename.error"), post.Id, filename)
|
||||
mlog.Error(fmt.Sprintf("Unable to decipher filename when migrating post to use FileInfos, post_id=%v, filename=%v", post.Id, filename), mlog.String("post_id", post.Id))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func (a *App) GetInfoForFilename(post *model.Post, teamId string, filename strin
|
||||
name, _ := url.QueryUnescape(split[4])
|
||||
|
||||
if split[0] != "" || split[1] != post.ChannelId || split[2] != post.UserId || strings.Contains(split[4], "/") {
|
||||
l4g.Warn(utils.T("api.file.migrate_filenames_to_file_infos.mismatched_filename.warn"), post.Id, post.ChannelId, post.UserId, filename)
|
||||
mlog.Warn(fmt.Sprintf("Found an unusual filename when migrating post to use FileInfos, post_id=%v, channel_id=%v, user_id=%v, filename=%v", post.Id, post.ChannelId, post.UserId, filename), mlog.String("post_id", post.Id))
|
||||
}
|
||||
|
||||
pathPrefix := fmt.Sprintf("teams/%s/channels/%s/users/%s/%s/", teamId, channelId, userId, oldId)
|
||||
@@ -117,13 +117,13 @@ func (a *App) GetInfoForFilename(post *model.Post, teamId string, filename strin
|
||||
// Open the file and populate the fields of the FileInfo
|
||||
var info *model.FileInfo
|
||||
if data, err := a.ReadFile(path); err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.file_not_found.error"), post.Id, filename, path, err)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.file_not_found.error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, filename, path, err), mlog.String("post_id", post.Id))
|
||||
return nil
|
||||
} else {
|
||||
var err *model.AppError
|
||||
info, err = model.GetInfoForBytes(name, data)
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.file.migrate_filenames_to_file_infos.info.app_error"), post.Id, filename, err)
|
||||
mlog.Warn(fmt.Sprintf("Unable to fully decode file info when migrating post to use FileInfos, post_id=%v, filename=%v, err=%v", post.Id, filename, err), mlog.String("post_id", post.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ func (a *App) FindTeamIdForFilename(post *model.Post, filename string) string {
|
||||
|
||||
// This post is in a direct channel so we need to figure out what team the files are stored under.
|
||||
if result := <-a.Srv.Store.Team().GetTeamsByUserId(post.UserId); result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.teams.app_error"), post.Id, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Unable to get teams when migrating post to use FileInfos, post_id=%v, err=%v", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
} else if teams := result.Data.([]*model.Team); len(teams) == 1 {
|
||||
// The user has only one team so the post must've been sent from it
|
||||
return teams[0].Id
|
||||
@@ -173,7 +173,7 @@ var fileMigrationLock sync.Mutex
|
||||
// Creates and stores FileInfos for a post created before the FileInfos table existed.
|
||||
func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
|
||||
if len(post.Filenames) == 0 {
|
||||
l4g.Warn(utils.T("api.file.migrate_filenames_to_file_infos.no_filenames.warn"), post.Id)
|
||||
mlog.Warn(fmt.Sprintf("Unable to migrate post to use FileInfos with an empty Filenames field, post_id=%v", post.Id), mlog.String("post_id", post.Id))
|
||||
return []*model.FileInfo{}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
|
||||
|
||||
var channel *model.Channel
|
||||
if result := <-cchan; result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.channel.app_error"), post.Id, post.ChannelId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Unable to get channel when migrating post to use FileInfos, post_id=%v, channel_id=%v, err=%v", post.Id, post.ChannelId, result.Err), mlog.String("post_id", post.Id))
|
||||
return []*model.FileInfo{}
|
||||
} else {
|
||||
channel = result.Data.(*model.Channel)
|
||||
@@ -202,7 +202,7 @@ func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
|
||||
// Create FileInfo objects for this post
|
||||
infos := make([]*model.FileInfo, 0, len(filenames))
|
||||
if teamId == "" {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.team_id.error"), post.Id, filenames)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.team_id.error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, filenames), mlog.String("post_id", post.Id))
|
||||
} else {
|
||||
for _, filename := range filenames {
|
||||
info := a.GetInfoForFilename(post, teamId, filename)
|
||||
@@ -219,26 +219,26 @@ func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
|
||||
defer fileMigrationLock.Unlock()
|
||||
|
||||
if result := <-a.Srv.Store.Post().Get(post.Id); result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.get_post_again.app_error"), post.Id, result.Err)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.get_post_again.app_error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
return []*model.FileInfo{}
|
||||
} else if newPost := result.Data.(*model.PostList).Posts[post.Id]; len(newPost.Filenames) != len(post.Filenames) {
|
||||
// Another thread has already created FileInfos for this post, so just return those
|
||||
if result := <-a.Srv.Store.FileInfo().GetForPost(post.Id, true, false); result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.get_post_file_infos_again.app_error"), post.Id, result.Err)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.get_post_file_infos_again.app_error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
return []*model.FileInfo{}
|
||||
} else {
|
||||
l4g.Debug(utils.T("api.file.migrate_filenames_to_file_infos.not_migrating_post.debug"), post.Id)
|
||||
mlog.Debug(fmt.Sprintf("Post already migrated to use FileInfos, post_id=%v", post.Id), mlog.String("post_id", post.Id))
|
||||
return result.Data.([]*model.FileInfo)
|
||||
}
|
||||
}
|
||||
|
||||
l4g.Debug(utils.T("api.file.migrate_filenames_to_file_infos.migrating_post.debug"), post.Id)
|
||||
mlog.Debug(fmt.Sprintf("Migrating post to use FileInfos, post_id=%v", post.Id), mlog.String("post_id", post.Id))
|
||||
|
||||
savedInfos := make([]*model.FileInfo, 0, len(infos))
|
||||
fileIds := make([]string, 0, len(filenames))
|
||||
for _, info := range infos {
|
||||
if result := <-a.Srv.Store.FileInfo().Save(info); result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.save_file_info.app_error"), post.Id, info.Id, info.Path, result.Err)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.save_file_info.app_error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, info.Id, info.Path, result.Err), mlog.String("post_id", post.Id))
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo {
|
||||
|
||||
// Update Posts to clear Filenames and set FileIds
|
||||
if result := <-a.Srv.Store.Post().Update(newPost, post); result.Err != nil {
|
||||
l4g.Error(utils.T("api.file.migrate_filenames_to_file_infos.save_post.app_error"), post.Id, newPost.FileIds, post.Filenames, result.Err)
|
||||
mlog.Error(fmt.Sprint("api.file.migrate_filenames_to_file_infos.save_post.app_error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, newPost.FileIds, post.Filenames, result.Err), mlog.String("post_id", post.Id))
|
||||
return []*model.FileInfo{}
|
||||
} else {
|
||||
return savedInfos
|
||||
@@ -415,7 +415,7 @@ func prepareImage(fileData []byte) (*image.Image, int, int) {
|
||||
// Decode image bytes into Image object
|
||||
img, imgType, err := image.Decode(bytes.NewReader(fileData))
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.file.handle_images_forget.decode.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Unable to decode image err=%v", err))
|
||||
return nil, 0, 0
|
||||
}
|
||||
|
||||
@@ -492,12 +492,12 @@ func (a *App) generateThumbnailImage(img image.Image, thumbnailPath string, widt
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
if err := jpeg.Encode(buf, thumbnail, &jpeg.Options{Quality: 90}); err != nil {
|
||||
l4g.Error(utils.T("api.file.handle_images_forget.encode_jpeg.error"), thumbnailPath, err)
|
||||
mlog.Error(fmt.Sprintf("Unable to encode image as jpeg path=%v err=%v", thumbnailPath, err))
|
||||
return
|
||||
}
|
||||
|
||||
if err := a.WriteFile(buf.Bytes(), thumbnailPath); err != nil {
|
||||
l4g.Error(utils.T("api.file.handle_images_forget.upload_thumb.error"), thumbnailPath, err)
|
||||
mlog.Error(fmt.Sprintf("Unable to upload thumbnail path=%v err=%v", thumbnailPath, err))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -514,12 +514,12 @@ func (a *App) generatePreviewImage(img image.Image, previewPath string, width in
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
if err := jpeg.Encode(buf, preview, &jpeg.Options{Quality: 90}); err != nil {
|
||||
l4g.Error(utils.T("api.file.handle_images_forget.encode_preview.error"), previewPath, err)
|
||||
mlog.Error(fmt.Sprintf("Unable to encode image as preview jpg path=%v err=%v", previewPath, err))
|
||||
return
|
||||
}
|
||||
|
||||
if err := a.WriteFile(buf.Bytes(), previewPath); err != nil {
|
||||
l4g.Error(utils.T("api.file.handle_images_forget.upload_preview.error"), previewPath, err)
|
||||
mlog.Error(fmt.Sprintf("Unable to upload preview path=%v err=%v", previewPath, err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -16,11 +17,9 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
// Import Data Models
|
||||
@@ -715,10 +714,10 @@ func (a *App) ImportUser(data *UserImportData, dryRun bool) *model.AppError {
|
||||
if data.ProfileImage != nil {
|
||||
file, err := os.Open(*data.ProfileImage)
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.import.import_user.profile_image.error"), err)
|
||||
mlog.Error(fmt.Sprint("api.import.import_user.profile_image.error FIXME: NOT FOUND IN TRANSLATIONS FILE", err))
|
||||
}
|
||||
if err := a.SetProfileImageFromFile(savedUser.Id, file); err != nil {
|
||||
l4g.Error(utils.T("api.import.import_user.profile_image.error"), err)
|
||||
mlog.Error(fmt.Sprint("api.import.import_user.profile_image.error FIXME: NOT FOUND IN TRANSLATIONS FILE", err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1654,12 +1653,12 @@ func (a *App) OldImportPost(post *model.Post) {
|
||||
post.Hashtags, _ = model.ParseHashtags(post.Message)
|
||||
|
||||
if result := <-a.Srv.Store.Post().Save(post); result.Err != nil {
|
||||
l4g.Debug(utils.T("api.import.import_post.saving.debug"), post.UserId, post.Message)
|
||||
mlog.Debug(fmt.Sprintf("Error saving post. user=%v, message=%v", post.UserId, post.Message))
|
||||
}
|
||||
|
||||
for _, fileId := range post.FileIds {
|
||||
if result := <-a.Srv.Store.FileInfo().AttachToPost(fileId, post.Id); result.Err != nil {
|
||||
l4g.Error(utils.T("api.import.import_post.attach_files.error"), post.Id, post.FileIds, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Error attaching files to post. postId=%v, fileIds=%v, message=%v", post.Id, post.FileIds, result.Err), mlog.String("post_id", post.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1675,17 +1674,17 @@ func (a *App) OldImportUser(team *model.Team, user *model.User) *model.User {
|
||||
user.Roles = model.SYSTEM_USER_ROLE_ID
|
||||
|
||||
if result := <-a.Srv.Store.User().Save(user); result.Err != nil {
|
||||
l4g.Error(utils.T("api.import.import_user.saving.error"), result.Err)
|
||||
mlog.Error(fmt.Sprintf("Error saving user. err=%v", result.Err))
|
||||
return nil
|
||||
} else {
|
||||
ruser := result.Data.(*model.User)
|
||||
|
||||
if cresult := <-a.Srv.Store.User().VerifyEmail(ruser.Id); cresult.Err != nil {
|
||||
l4g.Error(utils.T("api.import.import_user.set_email.error"), cresult.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to set email verified err=%v", cresult.Err))
|
||||
}
|
||||
|
||||
if err := a.JoinUserToTeam(team, user, ""); err != nil {
|
||||
l4g.Error(utils.T("api.import.import_user.join_team.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to join team when importing err=%v", err))
|
||||
}
|
||||
|
||||
return ruser
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -18,7 +19,7 @@ func (a *App) SyncLdap() {
|
||||
if ldapI := a.Ldap; ldapI != nil {
|
||||
ldapI.StartSynchronizeJob(false)
|
||||
} else {
|
||||
l4g.Error("%v", model.NewAppError("SyncLdap", "ent.ldap.disabled.app_error", nil, "", http.StatusNotImplemented).Error())
|
||||
mlog.Error(fmt.Sprintf("%v", model.NewAppError("SyncLdap", "ent.ldap.disabled.app_error", nil, "", http.StatusNotImplemented).Error()))
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -68,7 +69,7 @@ func (a *App) SwitchEmailToLdap(email, password, code, ldapId, ldapPassword stri
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendSignInChangeEmail(user.Email, "AD/LDAP", user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -114,7 +115,7 @@ func (a *App) SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendSignInChangeEmail(user.Email, T("api.templates.signin_change_email.body.method_email"), user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -30,7 +29,7 @@ func (a *App) LoadLicense() {
|
||||
|
||||
if license != nil {
|
||||
if _, err := a.SaveLicense(licenseBytes); err != nil {
|
||||
l4g.Info("Failed to save license key loaded from disk err=%v", err.Error())
|
||||
mlog.Info(fmt.Sprintf("Failed to save license key loaded from disk err=%v", err.Error()))
|
||||
} else {
|
||||
licenseId = license.Id
|
||||
}
|
||||
@@ -40,9 +39,9 @@ func (a *App) LoadLicense() {
|
||||
if result := <-a.Srv.Store.License().Get(licenseId); result.Err == nil {
|
||||
record := result.Data.(*model.LicenseRecord)
|
||||
a.ValidateAndSetLicenseBytes([]byte(record.Bytes))
|
||||
l4g.Info("License key valid unlocking enterprise features.")
|
||||
mlog.Info("License key valid unlocking enterprise features.")
|
||||
} else {
|
||||
l4g.Info(utils.T("mattermost.load_license.find.warn"))
|
||||
mlog.Info("License key from https://mattermost.com required to unlock enterprise features.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +139,7 @@ func (a *App) ValidateAndSetLicenseBytes(b []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
l4g.Warn(utils.T("utils.license.load_license.invalid.warn"))
|
||||
mlog.Warn("No valid enterprise license found")
|
||||
}
|
||||
|
||||
func (a *App) SetClientLicense(m map[string]string) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -193,14 +193,14 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
// Remove the user as recipient when the user has muted the channel.
|
||||
if channelMuted, ok := channelMemberNotifyPropsMap[id][model.MARK_UNREAD_NOTIFY_PROP]; ok {
|
||||
if channelMuted == model.CHANNEL_MARK_UNREAD_MENTION {
|
||||
l4g.Debug("Channel muted for user_id %v, channel_mute %v", id, channelMuted)
|
||||
mlog.Debug(fmt.Sprintf("Channel muted for user_id %v, channel_mute %v", id, channelMuted))
|
||||
userAllowsEmails = false
|
||||
}
|
||||
}
|
||||
|
||||
//If email verification is required and user email is not verified don't send email.
|
||||
if a.Config().EmailSettings.RequireEmailVerification && !profileMap[id].EmailVerified {
|
||||
l4g.Error("Skipped sending notification email to %v, address not verified. [details: user_id=%v]", profileMap[id].Email, id)
|
||||
mlog.Error(fmt.Sprintf("Skipped sending notification email to %v, address not verified. [details: user_id=%v]", profileMap[id].Email, id))
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
// MUST be completed before push notifications send
|
||||
for _, uchan := range updateMentionChans {
|
||||
if result := <-uchan; result.Err != nil {
|
||||
l4g.Warn(utils.T("api.post.update_mention_count_and_forget.update_error"), post.Id, post.ChannelId, result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to update mention count, post_id=%v channel_id=%v err=%v", post.Id, post.ChannelId, result.Err), mlog.String("post_id", post.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
if *a.Config().EmailSettings.SendPushNotifications {
|
||||
pushServer := *a.Config().EmailSettings.PushNotificationServer
|
||||
if license := a.License(); pushServer == model.MHPNS && (license == nil || !*license.Features.MHPNS) {
|
||||
l4g.Warn(utils.T("api.post.send_notifications_and_forget.push_notification.mhpnsWarn"))
|
||||
mlog.Warn("api.post.send_notifications_and_forget.push_notification.mhpnsWarn FIXME: NOT FOUND IN TRANSLATIONS FILE")
|
||||
sendPushNotifications = false
|
||||
} else {
|
||||
sendPushNotifications = true
|
||||
@@ -330,7 +330,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
|
||||
var infos []*model.FileInfo
|
||||
if result := <-fchan; result.Err != nil {
|
||||
l4g.Warn(utils.T("api.post.send_notifications.files.error"), post.Id, result.Err)
|
||||
mlog.Warn(fmt.Sprint("api.post.send_notifications.files.error FIXME: NOT FOUND IN TRANSLATIONS FILE", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
} else {
|
||||
infos = result.Data.([]*model.FileInfo)
|
||||
}
|
||||
@@ -415,7 +415,7 @@ func (a *App) sendNotificationEmail(post *model.Post, user *model.User, channel
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil {
|
||||
l4g.Error(utils.T("api.post.send_notifications_and_forget.send.error"), user.Email, err)
|
||||
mlog.Error(fmt.Sprint("api.post.send_notifications_and_forget.send.error FIXME: NOT FOUND IN TRANSLATIONS FILE", user.Email, err))
|
||||
}
|
||||
})
|
||||
|
||||
@@ -577,7 +577,7 @@ func (a *App) GetMessageForNotification(post *model.Post, translateFunc i18n.Tra
|
||||
// extract the filenames from their paths and determine what type of files are attached
|
||||
var infos []*model.FileInfo
|
||||
if result := <-a.Srv.Store.FileInfo().GetForPost(post.Id, true, true); result.Err != nil {
|
||||
l4g.Warn(utils.T("api.post.get_message_for_notification.get_files.error"), post.Id, result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Encountered error when getting files for notification message, post_id=%v, err=%v", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
} else {
|
||||
infos = result.Data.([]*model.FileInfo)
|
||||
}
|
||||
@@ -617,7 +617,7 @@ func (a *App) sendPushNotification(post *model.Post, user *model.User, channel *
|
||||
msg := model.PushNotification{}
|
||||
if badge := <-a.Srv.Store.User().GetUnreadCount(user.Id); badge.Err != nil {
|
||||
msg.Badge = 1
|
||||
l4g.Error(utils.T("store.sql_user.get_unread_count.app_error"), user.Id, badge.Err)
|
||||
mlog.Error(fmt.Sprint("We could not get the unread message count for the user", user.Id, badge.Err), mlog.String("user_id", user.Id))
|
||||
} else {
|
||||
msg.Badge = int(badge.Data.(int64))
|
||||
}
|
||||
@@ -651,7 +651,7 @@ func (a *App) sendPushNotification(post *model.Post, user *model.User, channel *
|
||||
tmpMessage := *model.PushNotificationFromJson(strings.NewReader(msg.ToJson()))
|
||||
tmpMessage.SetDeviceIdAndPlatform(session.DeviceId)
|
||||
|
||||
l4g.Debug("Sending push notification to device %v for user %v with msg of '%v'", tmpMessage.DeviceId, user.Id, msg.Message)
|
||||
mlog.Debug(fmt.Sprintf("Sending push notification to device %v for user %v with msg of '%v'", tmpMessage.DeviceId, user.Id, msg.Message), mlog.String("user_id", user.Id))
|
||||
|
||||
a.Go(func(session *model.Session) func() {
|
||||
return func() {
|
||||
@@ -729,7 +729,7 @@ func (a *App) ClearPushNotification(userId string, channelId string) {
|
||||
|
||||
sessions, err := a.getMobileAppSessions(userId)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -739,12 +739,12 @@ func (a *App) ClearPushNotification(userId string, channelId string) {
|
||||
msg.ContentAvailable = 0
|
||||
if badge := <-a.Srv.Store.User().GetUnreadCount(userId); badge.Err != nil {
|
||||
msg.Badge = 0
|
||||
l4g.Error(utils.T("store.sql_user.get_unread_count.app_error"), userId, badge.Err)
|
||||
mlog.Error(fmt.Sprint("We could not get the unread message count for the user", userId, badge.Err), mlog.String("user_id", userId))
|
||||
} else {
|
||||
msg.Badge = int(badge.Data.(int64))
|
||||
}
|
||||
|
||||
l4g.Debug(utils.T("api.post.send_notifications_and_forget.clear_push_notification.debug"), msg.DeviceId, msg.ChannelId)
|
||||
mlog.Debug(fmt.Sprintf("Clearing push notification to %v with channel_id %v", msg.DeviceId, msg.ChannelId))
|
||||
|
||||
for _, session := range sessions {
|
||||
tmpMessage := *model.PushNotificationFromJson(strings.NewReader(msg.ToJson()))
|
||||
@@ -762,7 +762,7 @@ func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session
|
||||
request, _ := http.NewRequest("POST", strings.TrimRight(*a.Config().EmailSettings.PushNotificationServer, "/")+model.API_URL_SUFFIX_V1+"/send_push", strings.NewReader(msg.ToJson()))
|
||||
|
||||
if resp, err := a.HTTPClient(true).Do(request); err != nil {
|
||||
l4g.Error("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, err.Error())
|
||||
mlog.Error(fmt.Sprintf("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, err.Error()), mlog.String("user_id", session.UserId))
|
||||
} else {
|
||||
pushResponse := model.PushResponseFromJson(resp.Body)
|
||||
if resp.Body != nil {
|
||||
@@ -770,13 +770,13 @@ func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session
|
||||
}
|
||||
|
||||
if pushResponse[model.PUSH_STATUS] == model.PUSH_STATUS_REMOVE {
|
||||
l4g.Info("Device was reported as removed for UserId=%v SessionId=%v removing push for this session", session.UserId, session.Id)
|
||||
mlog.Info(fmt.Sprintf("Device was reported as removed for UserId=%v SessionId=%v removing push for this session", session.UserId, session.Id), mlog.String("user_id", session.UserId))
|
||||
a.AttachDeviceId(session.Id, "", session.ExpiresAt)
|
||||
a.ClearSessionCacheForUser(session.UserId)
|
||||
}
|
||||
|
||||
if pushResponse[model.PUSH_STATUS] == model.PUSH_STATUS_FAIL {
|
||||
l4g.Error("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, pushResponse[model.PUSH_STATUS_ERROR_MSG])
|
||||
mlog.Error(fmt.Sprintf("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, pushResponse[model.PUSH_STATUS_ERROR_MSG]), mlog.String("user_id", session.UserId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
app/oauth.go
11
app/oauth.go
@@ -6,14 +6,15 @@ package app
|
||||
import (
|
||||
"bytes"
|
||||
b64 "encoding/base64"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -226,7 +227,7 @@ func (a *App) GetOAuthAccessToken(clientId, grantType, redirectUri, code, secret
|
||||
accessData = &model.AccessData{ClientId: clientId, UserId: user.Id, Token: session.Token, RefreshToken: model.NewId(), RedirectUri: redirectUri, ExpiresAt: session.ExpiresAt, Scope: authData.Scope}
|
||||
|
||||
if result := <-a.Srv.Store.OAuth().SaveAccessData(accessData); result.Err != nil {
|
||||
l4g.Error(result.Err)
|
||||
mlog.Error(fmt.Sprint(result.Err))
|
||||
return nil, model.NewAppError("GetOAuthAccessToken", "api.oauth.get_access_token.internal_saving.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
@@ -295,7 +296,7 @@ func (a *App) newSessionUpdateToken(appName string, accessData *model.AccessData
|
||||
accessData.RefreshToken = model.NewId()
|
||||
accessData.ExpiresAt = session.ExpiresAt
|
||||
if result := <-a.Srv.Store.OAuth().UpdateAccessData(accessData); result.Err != nil {
|
||||
l4g.Error(result.Err)
|
||||
mlog.Error(fmt.Sprint(result.Err))
|
||||
return nil, model.NewAppError("newSessionUpdateToken", "web.get_access_token.internal_saving.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
accessRsp := &model.AccessResponse{
|
||||
@@ -528,7 +529,7 @@ func (a *App) CompleteSwitchWithOAuth(service string, userData io.ReadCloser, em
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendSignInChangeEmail(user.Email, strings.Title(service)+" SSO", user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -774,7 +775,7 @@ func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, *
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendSignInChangeEmail(user.Email, T("api.templates.signin_change_email.body.method_email"), user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
@@ -48,7 +47,7 @@ func (a *App) initBuiltInPlugins() {
|
||||
"ldapextras": &ldapextras.Plugin{},
|
||||
}
|
||||
for id, p := range plugins {
|
||||
l4g.Debug("Initializing built-in plugin: " + id)
|
||||
mlog.Debug("Initializing built-in plugin: " + id)
|
||||
api := &BuiltInPluginAPI{
|
||||
id: id,
|
||||
router: a.Srv.Router.PathPrefix("/plugins/" + id).Subrouter(),
|
||||
@@ -70,13 +69,13 @@ func (a *App) initBuiltInPlugins() {
|
||||
// and deactivate all other plugins.
|
||||
func (a *App) ActivatePlugins() {
|
||||
if a.PluginEnv == nil {
|
||||
l4g.Error("plugin env not initialized")
|
||||
mlog.Error("plugin env not initialized")
|
||||
return
|
||||
}
|
||||
|
||||
plugins, err := a.PluginEnv.Plugins()
|
||||
if err != nil {
|
||||
l4g.Error("failed to activate plugins: " + err.Error())
|
||||
mlog.Error("failed to activate plugins: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -92,13 +91,13 @@ func (a *App) ActivatePlugins() {
|
||||
|
||||
if pluginState.Enable && !active {
|
||||
if err := a.activatePlugin(plugin.Manifest); err != nil {
|
||||
l4g.Error("%v plugin enabled in config.json but failing to activate err=%v", plugin.Manifest.Id, err.DetailedError)
|
||||
mlog.Error(fmt.Sprintf("%v plugin enabled in config.json but failing to activate err=%v", plugin.Manifest.Id, err.DetailedError))
|
||||
continue
|
||||
}
|
||||
|
||||
} else if !pluginState.Enable && active {
|
||||
if err := a.deactivatePlugin(plugin.Manifest); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,7 +114,7 @@ func (a *App) activatePlugin(manifest *model.Manifest) *model.AppError {
|
||||
a.Publish(message)
|
||||
}
|
||||
|
||||
l4g.Info("Activated %v plugin", manifest.Id)
|
||||
mlog.Info(fmt.Sprintf("Activated %v plugin", manifest.Id))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -132,7 +131,7 @@ func (a *App) deactivatePlugin(manifest *model.Manifest) *model.AppError {
|
||||
a.Publish(message)
|
||||
}
|
||||
|
||||
l4g.Info("Deactivated %v plugin", manifest.Id)
|
||||
mlog.Info(fmt.Sprintf("Deactivated %v plugin", manifest.Id))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -370,15 +369,15 @@ func (a *App) InitPlugins(pluginPath, webappPath string, supervisorOverride plug
|
||||
return
|
||||
}
|
||||
|
||||
l4g.Info("Starting up plugins")
|
||||
mlog.Info("Starting up plugins")
|
||||
|
||||
if err := os.Mkdir(pluginPath, 0744); err != nil && !os.IsExist(err) {
|
||||
l4g.Error("failed to start up plugins: " + err.Error())
|
||||
mlog.Error("failed to start up plugins: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.Mkdir(webappPath, 0744); err != nil && !os.IsExist(err) {
|
||||
l4g.Error("failed to start up plugins: " + err.Error())
|
||||
mlog.Error("failed to start up plugins: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -400,15 +399,15 @@ func (a *App) InitPlugins(pluginPath, webappPath string, supervisorOverride plug
|
||||
if supervisorOverride != nil {
|
||||
options = append(options, pluginenv.SupervisorProvider(supervisorOverride))
|
||||
} else if err := sandbox.CheckSupport(); err != nil {
|
||||
l4g.Warn(err.Error())
|
||||
l4g.Warn("plugin sandboxing is not supported. plugins will run with the same access level as the server. See documentation to learn more: https://developers.mattermost.com/extend/plugins/security/")
|
||||
mlog.Warn(err.Error())
|
||||
mlog.Warn("plugin sandboxing is not supported. plugins will run with the same access level as the server. See documentation to learn more: https://developers.mattermost.com/extend/plugins/security/")
|
||||
options = append(options, pluginenv.SupervisorProvider(rpcplugin.SupervisorProvider))
|
||||
} else {
|
||||
options = append(options, pluginenv.SupervisorProvider(sandbox.SupervisorProvider))
|
||||
}
|
||||
|
||||
if env, err := pluginenv.New(options...); err != nil {
|
||||
l4g.Error("failed to start up plugins: " + err.Error())
|
||||
mlog.Error("failed to start up plugins: " + err.Error())
|
||||
return
|
||||
} else {
|
||||
a.PluginEnv = env
|
||||
@@ -416,15 +415,15 @@ func (a *App) InitPlugins(pluginPath, webappPath string, supervisorOverride plug
|
||||
|
||||
for id, asset := range prepackagedPlugins {
|
||||
if tarball, err := asset("plugin.tar.gz"); err != nil {
|
||||
l4g.Error("failed to install prepackaged plugin: " + err.Error())
|
||||
mlog.Error("failed to install prepackaged plugin: " + err.Error())
|
||||
} else if tarball != nil {
|
||||
a.removePlugin(id, true)
|
||||
if _, err := a.installPlugin(bytes.NewReader(tarball), true); err != nil {
|
||||
l4g.Error("failed to install prepackaged plugin: " + err.Error())
|
||||
mlog.Error("failed to install prepackaged plugin: " + err.Error())
|
||||
}
|
||||
if _, ok := a.Config().PluginSettings.PluginStates[id]; !ok && id != "zoom" {
|
||||
if err := a.EnablePlugin(id); err != nil {
|
||||
l4g.Error("failed to enable prepackaged plugin: " + err.Error())
|
||||
mlog.Error("failed to enable prepackaged plugin: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -441,7 +440,7 @@ func (a *App) InitPlugins(pluginPath, webappPath string, supervisorOverride plug
|
||||
}
|
||||
|
||||
for _, err := range a.PluginEnv.Hooks().OnConfigurationChange() {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -451,7 +450,7 @@ func (a *App) InitPlugins(pluginPath, webappPath string, supervisorOverride plug
|
||||
func (a *App) ServePluginRequest(w http.ResponseWriter, r *http.Request) {
|
||||
if a.PluginEnv == nil || !*a.Config().PluginSettings.Enable {
|
||||
err := model.NewAppError("ServePluginRequest", "app.plugin.disabled.app_error", nil, "Enable plugins to serve plugin requests", http.StatusNotImplemented)
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
w.WriteHeader(err.StatusCode)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Write([]byte(err.ToJson()))
|
||||
@@ -507,10 +506,10 @@ func (a *App) ShutDownPlugins() {
|
||||
return
|
||||
}
|
||||
|
||||
l4g.Info("Shutting down plugins")
|
||||
mlog.Info("Shutting down plugins")
|
||||
|
||||
for _, err := range a.PluginEnv.Shutdown() {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
a.RemoveConfigListener(a.PluginConfigListenerId)
|
||||
a.PluginConfigListenerId = ""
|
||||
@@ -533,7 +532,7 @@ func (a *App) SetPluginKey(pluginId string, key string, value []byte) *model.App
|
||||
result := <-a.Srv.Store.Plugin().SaveOrUpdate(kv)
|
||||
|
||||
if result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
}
|
||||
|
||||
return result.Err
|
||||
@@ -546,7 +545,7 @@ func (a *App) GetPluginKey(pluginId string, key string) ([]byte, *model.AppError
|
||||
if result.Err.StatusCode == http.StatusNotFound {
|
||||
return nil, nil
|
||||
}
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
return nil, result.Err
|
||||
}
|
||||
|
||||
@@ -559,7 +558,7 @@ func (a *App) DeletePluginKey(pluginId string, key string) *model.AppError {
|
||||
result := <-a.Srv.Store.Plugin().Delete(pluginId, getKeyHash(key))
|
||||
|
||||
if result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
}
|
||||
|
||||
return result.Err
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/mattermost/mattermost-server/app/plugin"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ func (p *Plugin) config() *Configuration {
|
||||
func (p *Plugin) OnConfigurationChange() {
|
||||
var configuration Configuration
|
||||
if err := p.api.LoadPluginConfiguration(&configuration); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
p.configuration.Store(&configuration)
|
||||
}
|
||||
|
||||
46
app/post.go
46
app/post.go
@@ -9,16 +9,18 @@ import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/dyatlov/go-opengraph/opengraph"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
"golang.org/x/net/html/charset"
|
||||
)
|
||||
|
||||
var linkWithTextRegex = regexp.MustCompile(`<([^<\|]+)\|([^>]+)>`)
|
||||
@@ -78,7 +80,7 @@ func (a *App) CreatePostAsUser(post *model.Post) (*model.Post, *model.AppError)
|
||||
// Update the LastViewAt only if the post does not have from_webhook prop set (eg. Zapier app)
|
||||
if _, ok := post.Props["from_webhook"]; !ok {
|
||||
if result := <-a.Srv.Store.Channel().UpdateLastViewedAt([]string{post.ChannelId}, post.UserId); result.Err != nil {
|
||||
l4g.Error(utils.T("api.post.create_post.last_viewed.error"), post.ChannelId, post.UserId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Encountered error updating last viewed, channel_id=%s, user_id=%s, err=%v", post.ChannelId, post.UserId, result.Err))
|
||||
}
|
||||
|
||||
if *a.Config().ServiceSettings.EnableChannelViewedMessages {
|
||||
@@ -182,7 +184,7 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
|
||||
|
||||
for _, fileId := range post.FileIds {
|
||||
if result := <-a.Srv.Store.FileInfo().AttachToPost(fileId, post.Id); result.Err != nil {
|
||||
l4g.Error(utils.T("api.post.create_post.attach_files.error"), post.Id, post.FileIds, post.UserId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Encountered error attaching files to post, post_id=%s, user_id=%s, file_ids=%v, err=%v", post.Id, post.FileIds, post.UserId, result.Err), mlog.String("post_id", post.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +268,7 @@ func (a *App) handlePostEvents(post *model.Post, user *model.User, channel *mode
|
||||
if triggerWebhooks {
|
||||
a.Go(func() {
|
||||
if err := a.handleWebhookEvents(post, team, channel, user); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -378,7 +380,7 @@ func (a *App) UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model
|
||||
if esInterface != nil && *a.Config().ElasticsearchSettings.EnableIndexing {
|
||||
a.Go(func() {
|
||||
if rchannel := <-a.Srv.Store.Channel().GetForPost(rpost.Id); rchannel.Err != nil {
|
||||
l4g.Error("Couldn't get channel %v for post %v for Elasticsearch indexing.", rpost.ChannelId, rpost.Id)
|
||||
mlog.Error(fmt.Sprintf("Couldn't get channel %v for post %v for Elasticsearch indexing.", rpost.ChannelId, rpost.Id))
|
||||
} else {
|
||||
esInterface.IndexPost(rpost, rchannel.Data.(*model.Channel).TeamId)
|
||||
}
|
||||
@@ -576,7 +578,7 @@ func (a *App) DeletePost(postId string) (*model.Post, *model.AppError) {
|
||||
|
||||
func (a *App) DeleteFlaggedPosts(postId string) {
|
||||
if result := <-a.Srv.Store.Preference().DeleteCategoryAndName(model.PREFERENCE_CATEGORY_FLAGGED_POST, postId); result.Err != nil {
|
||||
l4g.Warn(utils.T("api.post.delete_flagged_post.app_error.warn"), result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Unable to delete flagged post preference when deleting post, err=%v", result.Err))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -587,7 +589,7 @@ func (a *App) DeletePostFiles(post *model.Post) {
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.FileInfo().DeleteForPost(post.Id); result.Err != nil {
|
||||
l4g.Warn(utils.T("api.post.delete_post_files.app_error.warn"), post.Id, result.Err)
|
||||
mlog.Warn(fmt.Sprintf("Encountered error when deleting files for post, post_id=%v, err=%v", post.Id, result.Err), mlog.String("post_id", post.Id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,7 +607,7 @@ func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOr
|
||||
// Convert channel names to channel IDs
|
||||
for idx, channelName := range params.InChannels {
|
||||
if channel, err := a.GetChannelByName(channelName, teamId); err != nil {
|
||||
l4g.Error(err)
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
} else {
|
||||
params.InChannels[idx] = channel.Id
|
||||
}
|
||||
@@ -614,7 +616,7 @@ func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOr
|
||||
// Convert usernames to user IDs
|
||||
for idx, username := range params.FromUsers {
|
||||
if user, err := a.GetUserByUsername(username); err != nil {
|
||||
l4g.Error(err)
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
} else {
|
||||
params.FromUsers[idx] = user.Id
|
||||
}
|
||||
@@ -632,7 +634,7 @@ func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOr
|
||||
// We only allow the user to search in channels they are a member of.
|
||||
userChannels, err := a.GetChannelsForUser(teamId, userId)
|
||||
if err != nil {
|
||||
l4g.Error(err)
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -721,13 +723,16 @@ func (a *App) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph {
|
||||
|
||||
res, err := a.HTTPClient(false).Get(requestURL)
|
||||
if err != nil {
|
||||
l4g.Error("GetOpenGraphMetadata request failed for url=%v with err=%v", requestURL, err.Error())
|
||||
mlog.Error(fmt.Sprintf("GetOpenGraphMetadata request failed for url=%v with err=%v", requestURL, err.Error()))
|
||||
return og
|
||||
}
|
||||
defer consumeAndClose(res)
|
||||
|
||||
if err := og.ProcessHTML(res.Body); err != nil {
|
||||
l4g.Error("GetOpenGraphMetadata processing failed for url=%v with err=%v", requestURL, err.Error())
|
||||
contentType := res.Header.Get("Content-Type")
|
||||
body := forceHTMLEncodingToUTF8(res.Body, contentType)
|
||||
|
||||
if err := og.ProcessHTML(body); err != nil {
|
||||
mlog.Error(fmt.Sprintf("GetOpenGraphMetadata processing failed for url=%v with err=%v", requestURL, err.Error()))
|
||||
}
|
||||
|
||||
makeOpenGraphURLsAbsolute(og, requestURL)
|
||||
@@ -735,10 +740,19 @@ func (a *App) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph {
|
||||
return og
|
||||
}
|
||||
|
||||
func forceHTMLEncodingToUTF8(body io.Reader, contentType string) io.Reader {
|
||||
r, err := charset.NewReader(body, contentType)
|
||||
if err != nil {
|
||||
mlog.Error(fmt.Sprintf("forceHTMLEncodingToUTF8 failed to convert for contentType=%v with err=%v", contentType, err.Error()))
|
||||
return body
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func makeOpenGraphURLsAbsolute(og *opengraph.OpenGraph, requestURL string) {
|
||||
parsedRequestURL, err := url.Parse(requestURL)
|
||||
if err != nil {
|
||||
l4g.Warn("makeOpenGraphURLsAbsolute failed to parse url=%v", requestURL)
|
||||
mlog.Warn(fmt.Sprintf("makeOpenGraphURLsAbsolute failed to parse url=%v", requestURL))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -749,7 +763,7 @@ func makeOpenGraphURLsAbsolute(og *opengraph.OpenGraph, requestURL string) {
|
||||
|
||||
parsedResultURL, err := url.Parse(resultURL)
|
||||
if err != nil {
|
||||
l4g.Warn("makeOpenGraphURLsAbsolute failed to parse result url=%v", resultURL)
|
||||
mlog.Warn(fmt.Sprintf("makeOpenGraphURLsAbsolute failed to parse result url=%v", resultURL))
|
||||
return resultURL
|
||||
}
|
||||
|
||||
@@ -962,7 +976,7 @@ func (a *App) ImageProxyRemover() (f func(string) string) {
|
||||
func (a *App) MaxPostSize() int {
|
||||
maxPostSize := model.POST_MESSAGE_MAX_RUNES_V1
|
||||
if result := <-a.Srv.Store.Post().GetMaxPostSize(); result.Err != nil {
|
||||
l4g.Error(result.Err)
|
||||
mlog.Error(fmt.Sprint(result.Err))
|
||||
} else {
|
||||
maxPostSize = result.Data.(int)
|
||||
}
|
||||
|
||||
@@ -297,6 +297,34 @@ func TestImageProxy(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkForceHTMLEncodingToUTF8(b *testing.B) {
|
||||
HTML := `
|
||||
<html>
|
||||
<head>
|
||||
<meta property="og:url" content="https://example.com/apps/mattermost">
|
||||
<meta property="og:image" content="https://images.example.com/image.png">
|
||||
</head>
|
||||
</html>
|
||||
`
|
||||
ContentType := "text/html; utf-8"
|
||||
|
||||
b.Run("with converting", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
r := forceHTMLEncodingToUTF8(strings.NewReader(HTML), ContentType)
|
||||
|
||||
og := opengraph.NewOpenGraph()
|
||||
og.ProcessHTML(r)
|
||||
}
|
||||
})
|
||||
|
||||
b.Run("without converting", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
og := opengraph.NewOpenGraph()
|
||||
og.ProcessHTML(strings.NewReader(HTML))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestMakeOpenGraphURLsAbsolute(t *testing.T) {
|
||||
for name, tc := range map[string]struct {
|
||||
HTML string
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
"github.com/pkg/errors"
|
||||
@@ -74,14 +75,14 @@ func (rl *RateLimiter) GenerateKey(r *http.Request) string {
|
||||
func (rl *RateLimiter) RateLimitWriter(key string, w http.ResponseWriter) bool {
|
||||
limited, context, err := rl.throttledRateLimiter.RateLimit(key, 1)
|
||||
if err != nil {
|
||||
l4g.Critical("Internal server error when rate limiting. Rate Limiting broken. Error:" + err.Error())
|
||||
mlog.Critical("Internal server error when rate limiting. Rate Limiting broken. Error:" + err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
setRateLimitHeaders(w, context)
|
||||
|
||||
if limited {
|
||||
l4g.Error("Denied due to throttling settings code=429 key=%v", key)
|
||||
mlog.Error(fmt.Sprintf("Denied due to throttling settings code=429 key=%v", key))
|
||||
http.Error(w, "limit exceeded", 429)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ package app
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
func (a *App) GetRole(id string) (*model.Role, *model.AppError) {
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -38,7 +39,7 @@ func (a *App) DoSecurityUpdateCheck() {
|
||||
currentTime := model.GetMillis()
|
||||
|
||||
if (currentTime - lastSecurityTime) > SECURITY_UPDATE_PERIOD {
|
||||
l4g.Debug(utils.T("mattermost.security_checks.debug"))
|
||||
mlog.Debug("Checking for security update from Mattermost")
|
||||
|
||||
v := url.Values{}
|
||||
|
||||
@@ -75,7 +76,7 @@ func (a *App) DoSecurityUpdateCheck() {
|
||||
|
||||
res, err := http.Get(SECURITY_URL + "/security?" + v.Encode())
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("mattermost.security_info.error"))
|
||||
mlog.Error("Failed to get security update information from Mattermost.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -86,26 +87,26 @@ func (a *App) DoSecurityUpdateCheck() {
|
||||
if bulletin.AppliesToVersion == model.CurrentVersion {
|
||||
if props["SecurityBulletin_"+bulletin.Id] == "" {
|
||||
if results := <-a.Srv.Store.User().GetSystemAdminProfiles(); results.Err != nil {
|
||||
l4g.Error(utils.T("mattermost.system_admins.error"))
|
||||
mlog.Error("Failed to get system admins for security update information from Mattermost.")
|
||||
return
|
||||
} else {
|
||||
users := results.Data.(map[string]*model.User)
|
||||
|
||||
resBody, err := http.Get(SECURITY_URL + "/bulletins/" + bulletin.Id)
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("mattermost.security_bulletin.error"))
|
||||
mlog.Error("Failed to get security bulletin details")
|
||||
return
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(resBody.Body)
|
||||
res.Body.Close()
|
||||
if err != nil || resBody.StatusCode != 200 {
|
||||
l4g.Error(utils.T("mattermost.security_bulletin_read.error"))
|
||||
mlog.Error("Failed to read security bulletin details")
|
||||
return
|
||||
}
|
||||
|
||||
for _, user := range users {
|
||||
l4g.Info(utils.T("mattermost.send_bulletin.info"), bulletin.Id, user.Email)
|
||||
mlog.Info(fmt.Sprintf("Sending security bulletin for %v to %v", bulletin.Id, user.Email))
|
||||
a.SendMail(user.Email, utils.T("mattermost.bulletin.subject"), string(body))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/crypto/acme/autocert"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -50,8 +50,8 @@ type RecoveryLogger struct {
|
||||
}
|
||||
|
||||
func (rl *RecoveryLogger) Println(i ...interface{}) {
|
||||
l4g.Error("Please check the std error output for the stack trace")
|
||||
l4g.Error(i)
|
||||
mlog.Error("Please check the std error output for the stack trace")
|
||||
mlog.Error(fmt.Sprint(i))
|
||||
}
|
||||
|
||||
type CorsWrapper struct {
|
||||
@@ -97,12 +97,12 @@ func redirectHTTPToHTTPS(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (a *App) StartServer() error {
|
||||
l4g.Info(utils.T("api.server.start_server.starting.info"))
|
||||
mlog.Info("Starting Server...")
|
||||
|
||||
var handler http.Handler = &CorsWrapper{a.Config, a.Srv.Router}
|
||||
|
||||
if *a.Config().RateLimitSettings.Enable {
|
||||
l4g.Info(utils.T("api.server.start_server.rate.info"))
|
||||
mlog.Info("RateLimiter is enabled")
|
||||
|
||||
rateLimiter, err := NewRateLimiter(&a.Config().RateLimitSettings)
|
||||
if err != nil {
|
||||
@@ -117,6 +117,7 @@ func (a *App) StartServer() error {
|
||||
Handler: handlers.RecoveryHandler(handlers.RecoveryLogger(&RecoveryLogger{}), handlers.PrintRecoveryStack(true))(handler),
|
||||
ReadTimeout: time.Duration(*a.Config().ServiceSettings.ReadTimeout) * time.Second,
|
||||
WriteTimeout: time.Duration(*a.Config().ServiceSettings.WriteTimeout) * time.Second,
|
||||
ErrorLog: a.Log.StdLog(mlog.String("source", "httpserver")),
|
||||
}
|
||||
|
||||
addr := *a.Config().ServiceSettings.ListenAddress
|
||||
@@ -135,7 +136,7 @@ func (a *App) StartServer() error {
|
||||
}
|
||||
a.Srv.ListenAddr = listener.Addr().(*net.TCPAddr)
|
||||
|
||||
l4g.Info(utils.T("api.server.start_server.listening.info"), listener.Addr().String())
|
||||
mlog.Info(fmt.Sprintf("Server is listening on %v", listener.Addr().String()))
|
||||
|
||||
// Migration from old let's encrypt library
|
||||
if *a.Config().ServiceSettings.UseLetsEncrypt {
|
||||
@@ -151,24 +152,33 @@ func (a *App) StartServer() error {
|
||||
|
||||
if *a.Config().ServiceSettings.Forward80To443 {
|
||||
if host, port, err := net.SplitHostPort(addr); err != nil {
|
||||
l4g.Error("Unable to setup forwarding: " + err.Error())
|
||||
mlog.Error("Unable to setup forwarding: " + err.Error())
|
||||
} else if port != "443" {
|
||||
return fmt.Errorf(utils.T("api.server.start_server.forward80to443.enabled_but_listening_on_wrong_port"), port)
|
||||
} else {
|
||||
httpListenAddress := net.JoinHostPort(host, "http")
|
||||
|
||||
if *a.Config().ServiceSettings.UseLetsEncrypt {
|
||||
go http.ListenAndServe(httpListenAddress, m.HTTPHandler(nil))
|
||||
server := &http.Server{
|
||||
Addr: httpListenAddress,
|
||||
Handler: m.HTTPHandler(nil),
|
||||
ErrorLog: a.Log.StdLog(mlog.String("source", "le_forwarder_server")),
|
||||
}
|
||||
go server.ListenAndServe()
|
||||
} else {
|
||||
go func() {
|
||||
redirectListener, err := net.Listen("tcp", httpListenAddress)
|
||||
if err != nil {
|
||||
l4g.Error("Unable to setup forwarding: " + err.Error())
|
||||
mlog.Error("Unable to setup forwarding: " + err.Error())
|
||||
return
|
||||
}
|
||||
defer redirectListener.Close()
|
||||
|
||||
http.Serve(redirectListener, http.HandlerFunc(redirectHTTPToHTTPS))
|
||||
server := &http.Server{
|
||||
Handler: handler,
|
||||
ErrorLog: a.Log.StdLog(mlog.String("source", "forwarder_server")),
|
||||
}
|
||||
server.Serve(redirectListener)
|
||||
}()
|
||||
}
|
||||
}
|
||||
@@ -197,7 +207,7 @@ func (a *App) StartServer() error {
|
||||
err = a.Srv.Server.Serve(listener)
|
||||
}
|
||||
if err != nil && err != http.ErrServerClosed {
|
||||
l4g.Critical(utils.T("api.server.start_server.starting.critical"), err)
|
||||
mlog.Critical(fmt.Sprintf("Error starting server, err:%v", err))
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
close(a.Srv.didFinishListen)
|
||||
@@ -213,7 +223,7 @@ func (a *App) StopServer() {
|
||||
didShutdown := false
|
||||
for a.Srv.didFinishListen != nil && !didShutdown {
|
||||
if err := a.Srv.Server.Shutdown(ctx); err != nil {
|
||||
l4g.Warn(err.Error())
|
||||
mlog.Warn(err.Error())
|
||||
}
|
||||
timer := time.NewTimer(time.Millisecond * 50)
|
||||
select {
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
)
|
||||
|
||||
func (a *App) CreateSession(session *model.Session) (*model.Session, *model.AppError) {
|
||||
@@ -171,10 +170,10 @@ func (a *App) RevokeSessionsForDeviceId(userId string, deviceId string, currentS
|
||||
sessions := result.Data.([]*model.Session)
|
||||
for _, session := range sessions {
|
||||
if session.DeviceId == deviceId && session.Id != currentSessionId {
|
||||
l4g.Debug(utils.T("api.user.login.revoking.app_error"), session.Id, userId)
|
||||
mlog.Debug(fmt.Sprintf("Revoking sessionId=%v for userId=%v re-login with same device Id", session.Id, userId), mlog.String("user_id", userId))
|
||||
if err := a.RevokeSession(session); err != nil {
|
||||
// Soft error so we still remove the other sessions
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,7 +232,7 @@ func (a *App) UpdateLastActivityAtIfNeeded(session model.Session) {
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.Session().UpdateLastActivityAt(session.Id, now); result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.last_activity.error"), session.UserId, session.Id, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to update LastActivityAt for user_id=%v and session_id=%v, err=%v", session.UserId, session.Id, result.Err), mlog.String("user_id", session.UserId))
|
||||
}
|
||||
|
||||
session.LastActivityAt = now
|
||||
@@ -256,11 +255,11 @@ func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAc
|
||||
}
|
||||
|
||||
if result := <-uchan; result.Err != nil {
|
||||
l4g.Error(result.Err.Error())
|
||||
mlog.Error(result.Err.Error())
|
||||
} else {
|
||||
user := result.Data.(*model.User)
|
||||
if err := a.SendUserAccessTokenAddedEmail(user.Email, user.Locale); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"archive/zip"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"path/filepath"
|
||||
@@ -17,7 +18,7 @@ import (
|
||||
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -81,7 +82,7 @@ func SlackConvertTimeStamp(ts string) int64 {
|
||||
|
||||
timeStamp, err := strconv.ParseInt(timeString, 10, 64)
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_convert_timestamp.bad.warn"))
|
||||
mlog.Warn("Slack Import: Bad timestamp detected.")
|
||||
return 1
|
||||
}
|
||||
return timeStamp * 1000 // Convert to milliseconds
|
||||
@@ -105,7 +106,7 @@ func SlackParseChannels(data io.Reader) ([]SlackChannel, error) {
|
||||
|
||||
var channels []SlackChannel
|
||||
if err := decoder.Decode(&channels); err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_parse_channels.error"))
|
||||
mlog.Warn("Slack Import: Error occurred when parsing some Slack channels. Import may work anyway.")
|
||||
return channels, err
|
||||
}
|
||||
return channels, nil
|
||||
@@ -127,23 +128,23 @@ func SlackParsePosts(data io.Reader) ([]SlackPost, error) {
|
||||
|
||||
var posts []SlackPost
|
||||
if err := decoder.Decode(&posts); err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_parse_posts.error"))
|
||||
mlog.Warn("Slack Import: Error occurred when parsing some Slack posts. Import may work anyway.")
|
||||
return posts, err
|
||||
}
|
||||
return posts, nil
|
||||
}
|
||||
|
||||
func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map[string]*model.User {
|
||||
func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, importerLog *bytes.Buffer) map[string]*model.User {
|
||||
// Log header
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.created"))
|
||||
log.WriteString("===============\r\n\r\n")
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.created"))
|
||||
importerLog.WriteString("===============\r\n\r\n")
|
||||
|
||||
addedUsers := make(map[string]*model.User)
|
||||
|
||||
// Need the team
|
||||
var team *model.Team
|
||||
if result := <-a.Srv.Store.Team().Get(teamId); result.Err != nil {
|
||||
log.WriteString(utils.T("api.slackimport.slack_import.team_fail"))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_import.team_fail"))
|
||||
return addedUsers
|
||||
} else {
|
||||
team = result.Data.(*model.Team)
|
||||
@@ -155,8 +156,8 @@ func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Bu
|
||||
email := sUser.Profile.Email
|
||||
if email == "" {
|
||||
email = sUser.Username + "@example.com"
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.missing_email_address", map[string]interface{}{"Email": email, "Username": sUser.Username}))
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_users.missing_email_address.warn", map[string]interface{}{"Email": email, "Username": sUser.Username}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.missing_email_address", map[string]interface{}{"Email": email, "Username": sUser.Username}))
|
||||
mlog.Warn("Slack Import: User {{.Username}} does not have an email address in the Slack export. Used {{.Email}} as a placeholder. The user should update their email address once logged in to the system.")
|
||||
}
|
||||
|
||||
password := model.NewId()
|
||||
@@ -166,9 +167,9 @@ func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Bu
|
||||
existingUser := result.Data.(*model.User)
|
||||
addedUsers[sUser.Id] = existingUser
|
||||
if err := a.JoinUserToTeam(team, addedUsers[sUser.Id], ""); err != nil {
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing_failed", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing_failed", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username}))
|
||||
} else {
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username}))
|
||||
}
|
||||
continue
|
||||
}
|
||||
@@ -183,9 +184,9 @@ func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Bu
|
||||
|
||||
if mUser := a.OldImportUser(team, &newUser); mUser != nil {
|
||||
addedUsers[sUser.Id] = mUser
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.email_pwd", map[string]interface{}{"Email": newUser.Email, "Password": password}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.email_pwd", map[string]interface{}{"Email": newUser.Email, "Password": password}))
|
||||
} else {
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_users.unable_import", map[string]interface{}{"Username": sUser.Username}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_users.unable_import", map[string]interface{}{"Username": sUser.Username}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,10 +228,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
switch {
|
||||
case sPost.Type == "message" && (sPost.SubType == "" || sPost.SubType == "file_share"):
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.without_user.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -248,19 +249,19 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
for _, fileId := range newPost.FileIds {
|
||||
if result := <-a.Srv.Store.FileInfo().AttachToPost(fileId, newPost.Id); result.Err != nil {
|
||||
l4g.Error(utils.T("api.slackimport.slack_add_posts.attach_files.error"), newPost.Id, newPost.FileIds, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Slack Import: An error occurred when attaching files to a message, post_id=%s, file_ids=%v, err=%v.", newPost.Id, newPost.FileIds, result.Err))
|
||||
}
|
||||
}
|
||||
|
||||
case sPost.Type == "message" && sPost.SubType == "file_comment":
|
||||
if sPost.Comment == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_comment.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as it has no comments.")
|
||||
continue
|
||||
} else if sPost.Comment.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_usr.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.Comment.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -272,10 +273,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "bot_message":
|
||||
if botUser == nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.bot_user_no_exists.warn"))
|
||||
mlog.Warn("Slack Import: Unable to import the bot message as the bot user does not exist.")
|
||||
continue
|
||||
} else if sPost.BotId == "" {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.no_bot_id.warn"))
|
||||
mlog.Warn("Slack Import: Unable to import bot message as the BotId field is missing.")
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -296,10 +297,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportIncomingWebhookPost(post, props)
|
||||
case sPost.Type == "message" && (sPost.SubType == "channel_join" || sPost.SubType == "channel_leave"):
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_usr.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -323,10 +324,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "me_message":
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.without_user.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -338,10 +339,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "channel_topic":
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_usr.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -354,10 +355,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "channel_purpose":
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_usr.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -370,10 +371,10 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
a.OldImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "channel_name":
|
||||
if sPost.User == "" {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.msg_no_usr.debug"))
|
||||
mlog.Debug("Slack Import: Unable to import the message as the user field is missing.")
|
||||
continue
|
||||
} else if users[sPost.User] == nil {
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
mlog.Debug(fmt.Sprintf("Slack Import: Unable to add the message as the Slack user %v does not exist in Mattermost.", sPost.User))
|
||||
continue
|
||||
}
|
||||
newPost := model.Post{
|
||||
@@ -385,7 +386,7 @@ func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []Slack
|
||||
}
|
||||
a.OldImportPost(&newPost)
|
||||
default:
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.unsupported.warn"), sPost.Type, sPost.SubType)
|
||||
mlog.Warn(fmt.Sprintf("Slack Import: Unable to import the message as its type is not supported: post_type=%v, post_subtype=%v.", sPost.Type, sPost.SubType))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,7 +396,7 @@ func (a *App) SlackUploadFile(sPost SlackPost, uploads map[string]*zip.File, tea
|
||||
if file, ok := uploads[sPost.File.Id]; ok {
|
||||
openFile, err := file.Open()
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.upload_file_open_failed.warn", map[string]interface{}{"FileId": sPost.File.Id, "Error": err.Error()}))
|
||||
mlog.Warn("Slack Import: Unable to open the file {{.FileId}} from the Slack export: {{.Error}}.")
|
||||
return nil, false
|
||||
}
|
||||
defer openFile.Close()
|
||||
@@ -403,17 +404,17 @@ func (a *App) SlackUploadFile(sPost SlackPost, uploads map[string]*zip.File, tea
|
||||
timestamp := utils.TimeFromMillis(SlackConvertTimeStamp(sPost.TimeStamp))
|
||||
uploadedFile, err := a.OldImportFile(timestamp, openFile, teamId, channelId, userId, filepath.Base(file.Name))
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.upload_file_upload_failed.warn", map[string]interface{}{"FileId": sPost.File.Id, "Error": err.Error()}))
|
||||
mlog.Warn("Slack Import: An error occurred when uploading file {{.FileId}}: {{.Error}}.")
|
||||
return nil, false
|
||||
}
|
||||
|
||||
return uploadedFile, true
|
||||
} else {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.upload_file_not_found.warn", map[string]interface{}{"FileId": sPost.File.Id}))
|
||||
mlog.Warn("Slack Import: Unable to import file {{.FileId}} as the file is missing from the Slack export zip file.")
|
||||
return nil, false
|
||||
}
|
||||
} else {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_posts.upload_file_not_in_json.warn"))
|
||||
mlog.Warn("Slack Import: Unable to attach the file to the post as the latter has no file section present in Slack export.")
|
||||
return nil, false
|
||||
}
|
||||
}
|
||||
@@ -421,7 +422,7 @@ func (a *App) SlackUploadFile(sPost SlackPost, uploads map[string]*zip.File, tea
|
||||
func (a *App) deactivateSlackBotUser(user *model.User) {
|
||||
_, err := a.UpdateActive(user, false)
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_deactivate_bot_user.failed_to_deactivate", err))
|
||||
mlog.Warn("Slack Import: Unable to deactivate the user account used for the bot.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,32 +440,32 @@ func (a *App) addSlackUsersToChannel(members []string, users map[string]*model.U
|
||||
|
||||
func SlackSanitiseChannelProperties(channel model.Channel) model.Channel {
|
||||
if utf8.RuneCountInString(channel.DisplayName) > model.CHANNEL_DISPLAY_NAME_MAX_RUNES {
|
||||
l4g.Warn("api.slackimport.slack_sanitise_channel_properties.display_name_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName})
|
||||
mlog.Warn(fmt.Sprint("api.slackimport.slack_sanitise_channel_properties.display_name_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName}))
|
||||
channel.DisplayName = truncateRunes(channel.DisplayName, model.CHANNEL_DISPLAY_NAME_MAX_RUNES)
|
||||
}
|
||||
|
||||
if len(channel.Name) > model.CHANNEL_NAME_MAX_LENGTH {
|
||||
l4g.Warn("api.slackimport.slack_sanitise_channel_properties.name_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName})
|
||||
mlog.Warn(fmt.Sprint("api.slackimport.slack_sanitise_channel_properties.name_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName}))
|
||||
channel.Name = channel.Name[0:model.CHANNEL_NAME_MAX_LENGTH]
|
||||
}
|
||||
|
||||
if utf8.RuneCountInString(channel.Purpose) > model.CHANNEL_PURPOSE_MAX_RUNES {
|
||||
l4g.Warn("api.slackimport.slack_sanitise_channel_properties.purpose_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName})
|
||||
mlog.Warn(fmt.Sprint("api.slackimport.slack_sanitise_channel_properties.purpose_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName}))
|
||||
channel.Purpose = truncateRunes(channel.Purpose, model.CHANNEL_PURPOSE_MAX_RUNES)
|
||||
}
|
||||
|
||||
if utf8.RuneCountInString(channel.Header) > model.CHANNEL_HEADER_MAX_RUNES {
|
||||
l4g.Warn("api.slackimport.slack_sanitise_channel_properties.header_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName})
|
||||
mlog.Warn(fmt.Sprint("api.slackimport.slack_sanitise_channel_properties.header_too_long.warn", map[string]interface{}{"ChannelName": channel.DisplayName}))
|
||||
channel.Header = truncateRunes(channel.Header, model.CHANNEL_HEADER_MAX_RUNES)
|
||||
}
|
||||
|
||||
return channel
|
||||
}
|
||||
|
||||
func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User, log *bytes.Buffer) map[string]*model.Channel {
|
||||
func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User, importerLog *bytes.Buffer) map[string]*model.Channel {
|
||||
// Write Header
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_channels.added"))
|
||||
log.WriteString("=================\r\n\r\n")
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_channels.added"))
|
||||
importerLog.WriteString("=================\r\n\r\n")
|
||||
|
||||
addedChannels := make(map[string]*model.Channel)
|
||||
for _, sChannel := range slackchannels {
|
||||
@@ -482,7 +483,7 @@ func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, post
|
||||
if result := <-a.Srv.Store.Channel().GetByName(teamId, sChannel.Name, true); result.Err == nil {
|
||||
// The channel already exists as an active channel. Merge with the existing one.
|
||||
mChannel = result.Data.(*model.Channel)
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_channels.merge", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_channels.merge", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
|
||||
} else if result := <-a.Srv.Store.Channel().GetDeletedByName(teamId, sChannel.Name); result.Err == nil {
|
||||
// The channel already exists but has been deleted. Generate a random string for the handle instead.
|
||||
newChannel.Name = model.NewId()
|
||||
@@ -493,14 +494,14 @@ func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, post
|
||||
// Haven't found an existing channel to merge with. Try importing it as a new one.
|
||||
mChannel = a.OldImportChannel(&newChannel)
|
||||
if mChannel == nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_add_channels.import_failed.warn"), newChannel.DisplayName)
|
||||
log.WriteString(utils.T("api.slackimport.slack_add_channels.import_failed", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
|
||||
mlog.Warn(fmt.Sprintf("Slack Import: Unable to import Slack channel: %s.", newChannel.DisplayName))
|
||||
importerLog.WriteString(utils.T("api.slackimport.slack_add_channels.import_failed", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
a.addSlackUsersToChannel(sChannel.Members, users, mChannel, log)
|
||||
log.WriteString(newChannel.DisplayName + "\r\n")
|
||||
a.addSlackUsersToChannel(sChannel.Members, users, mChannel, importerLog)
|
||||
importerLog.WriteString(newChannel.DisplayName + "\r\n")
|
||||
addedChannels[sChannel.Id] = mChannel
|
||||
a.SlackAddPosts(teamId, mChannel, posts[sChannel.Name], users, uploads, botUser)
|
||||
}
|
||||
@@ -513,7 +514,7 @@ func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) m
|
||||
for _, user := range users {
|
||||
r, err := regexp.Compile("<@" + user.Id + `(\|` + user.Username + ")?>")
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_convert_user_mentions.compile_regexp_failed.warn"), user.Id, user.Username)
|
||||
mlog.Warn(fmt.Sprint("Slack Import: Unable to compile the @mention, matching regular expression for the Slack user {{.Username}} (id={{.UserID}}).", user.Id, user.Username), mlog.String("user_id", user.Id))
|
||||
continue
|
||||
}
|
||||
regexes["@"+user.Username] = r
|
||||
@@ -541,7 +542,7 @@ func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]Sla
|
||||
for _, channel := range channels {
|
||||
r, err := regexp.Compile("<#" + channel.Id + `(\|` + channel.Name + ")?>")
|
||||
if err != nil {
|
||||
l4g.Warn(utils.T("api.slackimport.slack_convert_channel_mentions.compile_regexp_failed.warn"), channel.Id, channel.Name)
|
||||
mlog.Warn(fmt.Sprint("Slack Import: Unable to compile the !channel, matching regular expression for the Slack channel {{.ChannelName}} (id={{.ChannelID}}).", channel.Id, channel.Name))
|
||||
continue
|
||||
}
|
||||
regexes["~"+channel.Name] = r
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"fmt"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -208,7 +209,7 @@ func (a *App) SetStatusOnline(userId string, sessionId string, manual bool) {
|
||||
}
|
||||
|
||||
if result := <-schan; result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.save_status.error"), userId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to save status for user_id=%v, err=%v", userId, result.Err), mlog.String("user_id", userId))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +293,7 @@ func (a *App) SaveAndBroadcastStatus(status *model.Status) *model.AppError {
|
||||
a.AddStatusCache(status)
|
||||
|
||||
if result := <-a.Srv.Store.Status().SaveOrUpdate(status); result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.save_status.error"), status.UserId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to save status for user_id=%v, err=%v", status.UserId, result.Err))
|
||||
}
|
||||
|
||||
event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_STATUS_CHANGE, "", "", status.UserId, nil)
|
||||
@@ -320,7 +321,7 @@ func (a *App) SetStatusOutOfOffice(userId string) {
|
||||
a.AddStatusCache(status)
|
||||
|
||||
if result := <-a.Srv.Store.Status().SaveOrUpdate(status); result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.save_status.error"), userId, result.Err)
|
||||
mlog.Error(fmt.Sprintf("Failed to save status for user_id=%v, err=%v", userId, result.Err), mlog.String("user_id", userId))
|
||||
}
|
||||
|
||||
event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_STATUS_CHANGE, "", "", status.UserId, nil)
|
||||
|
||||
32
app/team.go
32
app/team.go
@@ -13,9 +13,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/disintegration/imaging"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -103,6 +103,7 @@ func (a *App) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) {
|
||||
oldTeam.AllowOpenInvite = team.AllowOpenInvite
|
||||
oldTeam.CompanyName = team.CompanyName
|
||||
oldTeam.AllowedDomains = team.AllowedDomains
|
||||
oldTeam.LastTeamIconUpdate = team.LastTeamIconUpdate
|
||||
|
||||
if result := <-a.Srv.Store.Team().Update(oldTeam); result.Err != nil {
|
||||
return nil, result.Err
|
||||
@@ -387,8 +388,8 @@ func (a *App) JoinUserToTeam(team *model.Team, user *model.User, userRequestorId
|
||||
shouldBeAdmin := team.Email == user.Email
|
||||
|
||||
// Soft error if there is an issue joining the default channels
|
||||
if err := a.JoinDefaultChannels(team.Id, user, shouldBeAdmin, userRequestorId); err != nil {
|
||||
l4g.Error(utils.T("api.user.create_user.joining.error"), user.Id, team.Id, err)
|
||||
if err := a.JoinDefaultChannels(team.Id, user, channelRole, userRequestorId); err != nil {
|
||||
mlog.Error(fmt.Sprintf("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", user.Id, team.Id, err), mlog.String("user_id", user.Id))
|
||||
}
|
||||
|
||||
a.ClearSessionCacheForUser(user.Id)
|
||||
@@ -676,11 +677,11 @@ func (a *App) LeaveTeam(team *model.Team, user *model.User, requestorId string)
|
||||
if *a.Config().ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages {
|
||||
if requestorId == user.Id {
|
||||
if err := a.postLeaveTeamMessage(user, channel); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
} else {
|
||||
if err := a.postRemoveFromTeamMessage(user, channel); err != nil {
|
||||
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
|
||||
mlog.Error(fmt.Sprint("Failed to post join/leave message", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -946,7 +947,7 @@ func (a *App) GetTeamIdFromQuery(query url.Values) (string, *model.AppError) {
|
||||
} else if len(inviteId) > 0 {
|
||||
if result := <-a.Srv.Store.Team().GetByInviteId(inviteId); result.Err != nil {
|
||||
// soft fail, so we still create user but don't auto-join team
|
||||
l4g.Error("%v", result.Err)
|
||||
mlog.Error(fmt.Sprintf("%v", result.Err))
|
||||
} else {
|
||||
return result.Data.(*model.Team).Id, nil
|
||||
}
|
||||
@@ -1045,7 +1046,7 @@ func (a *App) SetTeamIconFromFile(teamId string, file multipart.File) *model.App
|
||||
curTime := model.GetMillis()
|
||||
|
||||
if result := <-a.Srv.Store.Team().UpdateLastTeamIconUpdate(teamId, curTime); result.Err != nil {
|
||||
return model.NewAppError("SetTeamIcon", "api.team.set_team_icon.update.app_error", nil, result.Err.Error(), http.StatusBadRequest)
|
||||
return model.NewAppError("SetTeamIcon", "api.team.team_icon.update.app_error", nil, result.Err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
// manually set time to avoid possible cluster inconsistencies
|
||||
@@ -1055,3 +1056,20 @@ func (a *App) SetTeamIconFromFile(teamId string, file multipart.File) *model.App
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) RemoveTeamIcon(teamId string) *model.AppError {
|
||||
team, err := a.GetTeam(teamId)
|
||||
if err != nil {
|
||||
return model.NewAppError("RemoveTeamIcon", "api.team.remove_team_icon.get_team.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.Team().UpdateLastTeamIconUpdate(teamId, 0); result.Err != nil {
|
||||
return model.NewAppError("RemoveTeamIcon", "api.team.team_icon.update.app_error", nil, result.Err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
team.LastTeamIconUpdate = 0
|
||||
|
||||
a.sendTeamEvent(team, model.WEBSOCKET_EVENT_UPDATE_TEAM)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
44
app/user.go
44
app/user.go
@@ -22,10 +22,10 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/golang/freetype"
|
||||
"github.com/mattermost/mattermost-server/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -118,7 +118,7 @@ func (a *App) CreateUserWithInviteId(user *model.User, inviteId string) (*model.
|
||||
a.AddDirectChannels(team.Id, ruser)
|
||||
|
||||
if err := a.SendWelcomeEmail(ruser.Id, ruser.Email, ruser.EmailVerified, ruser.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
return ruser, nil
|
||||
@@ -131,7 +131,7 @@ func (a *App) CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)
|
||||
}
|
||||
|
||||
if err := a.SendWelcomeEmail(ruser.Id, ruser.Email, ruser.EmailVerified, ruser.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
return ruser, nil
|
||||
@@ -155,7 +155,7 @@ func (a *App) CreateUserFromSignup(user *model.User) (*model.User, *model.AppErr
|
||||
}
|
||||
|
||||
if err := a.SendWelcomeEmail(ruser.Id, ruser.Email, ruser.EmailVerified, ruser.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
return ruser, nil
|
||||
@@ -172,7 +172,7 @@ func (a *App) IsUserSignUpAllowed() *model.AppError {
|
||||
func (a *App) IsFirstUserAccount() bool {
|
||||
if a.SessionCacheLength() == 0 {
|
||||
if cr := <-a.Srv.Store.User().GetTotalUsersCount(); cr.Err != nil {
|
||||
l4g.Error(cr.Err)
|
||||
mlog.Error(fmt.Sprint(cr.Err))
|
||||
return false
|
||||
} else {
|
||||
count := cr.Data.(int64)
|
||||
@@ -227,20 +227,20 @@ func (a *App) createUser(user *model.User) (*model.User, *model.AppError) {
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.User().Save(user); result.Err != nil {
|
||||
l4g.Error(utils.T("api.user.create_user.save.error"), result.Err)
|
||||
mlog.Error(fmt.Sprintf("Couldn't save the user err=%v", result.Err))
|
||||
return nil, result.Err
|
||||
} else {
|
||||
ruser := result.Data.(*model.User)
|
||||
|
||||
if user.EmailVerified {
|
||||
if err := a.VerifyUserEmail(ruser.Id); err != nil {
|
||||
l4g.Error(utils.T("api.user.create_user.verified.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to set email verified err=%v", err))
|
||||
}
|
||||
}
|
||||
|
||||
pref := model.Preference{UserId: ruser.Id, Category: model.PREFERENCE_CATEGORY_TUTORIAL_STEPS, Name: ruser.Id, Value: "0"}
|
||||
if presult := <-a.Srv.Store.Preference().Save(&model.Preferences{pref}); presult.Err != nil {
|
||||
l4g.Error(utils.T("api.user.create_user.tutorial.error"), presult.Err.Message)
|
||||
mlog.Error(fmt.Sprintf("Encountered error saving tutorial preference, err=%v", presult.Err.Message))
|
||||
}
|
||||
|
||||
ruser.Sanitize(map[string]bool{})
|
||||
@@ -306,7 +306,7 @@ func (a *App) CreateOAuthUser(service string, userData io.Reader, teamId string)
|
||||
|
||||
err = a.AddDirectChannels(teamId, user)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -851,7 +851,7 @@ func (a *App) SetProfileImageFromFile(userId string, file multipart.File) *model
|
||||
a.InvalidateCacheForUser(userId)
|
||||
|
||||
if user, err := a.GetUser(userId); err != nil {
|
||||
l4g.Error(utils.T("api.user.get_me.getting.error"), userId)
|
||||
mlog.Error(fmt.Sprintf("Error in getting users profile for id=%v forcing logout", userId), mlog.String("user_id", userId))
|
||||
} else {
|
||||
options := a.Config().GetSanitizeOptions()
|
||||
user.SanitizeProfile(options)
|
||||
@@ -1056,14 +1056,14 @@ func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User,
|
||||
if rusers[0].Email != rusers[1].Email {
|
||||
a.Go(func() {
|
||||
if err := a.SendEmailChangeEmail(rusers[1].Email, rusers[0].Email, rusers[0].Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
if a.Config().EmailSettings.RequireEmailVerification {
|
||||
a.Go(func() {
|
||||
if err := a.SendEmailVerification(rusers[0]); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1072,7 +1072,7 @@ func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User,
|
||||
if rusers[0].Username != rusers[1].Username {
|
||||
a.Go(func() {
|
||||
if err := a.SendChangeUsernameEmail(rusers[1].Username, rusers[0].Username, rusers[0].Email, rusers[0].Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1117,12 +1117,12 @@ func (a *App) UpdateMfa(activate bool, userId, token string) *model.AppError {
|
||||
var err *model.AppError
|
||||
|
||||
if user, err = a.GetUser(userId); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if err := a.SendMfaChangeEmail(user.Email, activate, user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1160,7 +1160,7 @@ func (a *App) UpdatePasswordSendEmail(user *model.User, newPassword, method stri
|
||||
|
||||
a.Go(func() {
|
||||
if err := a.SendPasswordChangeEmail(user.Email, method, user.Locale, a.GetSiteURL()); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1194,7 +1194,7 @@ func (a *App) ResetPasswordFromToken(userSuppliedTokenString, newPassword string
|
||||
}
|
||||
|
||||
if err := a.DeleteToken(token); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -1278,7 +1278,7 @@ func (a *App) UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent
|
||||
|
||||
if result := <-schan; result.Err != nil {
|
||||
// soft error since the user roles were still updated
|
||||
l4g.Error(result.Err)
|
||||
mlog.Error(fmt.Sprint(result.Err))
|
||||
}
|
||||
|
||||
a.ClearSessionCacheForUser(user.Id)
|
||||
@@ -1294,9 +1294,9 @@ func (a *App) UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent
|
||||
}
|
||||
|
||||
func (a *App) PermanentDeleteUser(user *model.User) *model.AppError {
|
||||
l4g.Warn(utils.T("api.user.permanent_delete_user.attempting.warn"), user.Email, user.Id)
|
||||
mlog.Warn(fmt.Sprintf("Attempting to permanently delete account %v id=%v", user.Email, user.Id), mlog.String("user_id", user.Id))
|
||||
if user.IsInRole(model.SYSTEM_ADMIN_ROLE_ID) {
|
||||
l4g.Warn(utils.T("api.user.permanent_delete_user.system_admin.warn"), user.Email)
|
||||
mlog.Warn(fmt.Sprintf("You are deleting %v that is a system administrator. You may need to set another account as the system administrator using the command line tools.", user.Email))
|
||||
}
|
||||
|
||||
if _, err := a.UpdateActive(user, false); err != nil {
|
||||
@@ -1351,7 +1351,7 @@ func (a *App) PermanentDeleteUser(user *model.User) *model.AppError {
|
||||
return result.Err
|
||||
}
|
||||
|
||||
l4g.Warn(utils.T("api.user.permanent_delete_user.deleted.warn"), user.Email, user.Id)
|
||||
mlog.Warn(fmt.Sprintf("Permanently deleted account %v id=%v", user.Email, user.Id), mlog.String("user_id", user.Id))
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1395,7 +1395,7 @@ func (a *App) VerifyEmailFromToken(userSuppliedTokenString string) *model.AppErr
|
||||
return err
|
||||
}
|
||||
if err := a.DeleteToken(token); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/gorilla/websocket"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
@@ -138,9 +137,9 @@ func (c *WebConn) readPump() {
|
||||
if err := c.WebSocket.ReadJSON(&req); err != nil {
|
||||
// browsers will appear as CloseNoStatusReceived
|
||||
if websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived) {
|
||||
l4g.Debug(fmt.Sprintf("websocket.read: client side closed socket userId=%v", c.UserId))
|
||||
mlog.Debug(fmt.Sprintf("websocket.read: client side closed socket userId=%v", c.UserId))
|
||||
} else {
|
||||
l4g.Debug(fmt.Sprintf("websocket.read: closing websocket for userId=%v error=%v", c.UserId, err.Error()))
|
||||
mlog.Debug(fmt.Sprintf("websocket.read: closing websocket for userId=%v error=%v", c.UserId, err.Error()))
|
||||
}
|
||||
|
||||
return
|
||||
@@ -177,7 +176,7 @@ func (c *WebConn) writePump() {
|
||||
if msg.EventType() == model.WEBSOCKET_EVENT_TYPING ||
|
||||
msg.EventType() == model.WEBSOCKET_EVENT_STATUS_CHANGE ||
|
||||
msg.EventType() == model.WEBSOCKET_EVENT_CHANNEL_VIEWED {
|
||||
l4g.Info(fmt.Sprintf("websocket.slow: dropping message userId=%v type=%v channelId=%v", c.UserId, msg.EventType(), evt.Broadcast.ChannelId))
|
||||
mlog.Info(fmt.Sprintf("websocket.slow: dropping message userId=%v type=%v channelId=%v", c.UserId, msg.EventType(), evt.Broadcast.ChannelId))
|
||||
skipSend = true
|
||||
}
|
||||
}
|
||||
@@ -196,9 +195,9 @@ func (c *WebConn) writePump() {
|
||||
|
||||
if len(c.Send) >= SEND_DEADLOCK_WARN {
|
||||
if evtOk {
|
||||
l4g.Error(fmt.Sprintf("websocket.full: message userId=%v type=%v channelId=%v size=%v", c.UserId, msg.EventType(), evt.Broadcast.ChannelId, len(msg.ToJson())))
|
||||
mlog.Error(fmt.Sprintf("websocket.full: message userId=%v type=%v channelId=%v size=%v", c.UserId, msg.EventType(), evt.Broadcast.ChannelId, len(msg.ToJson())))
|
||||
} else {
|
||||
l4g.Error(fmt.Sprintf("websocket.full: message userId=%v type=%v size=%v", c.UserId, msg.EventType(), len(msg.ToJson())))
|
||||
mlog.Error(fmt.Sprintf("websocket.full: message userId=%v type=%v size=%v", c.UserId, msg.EventType(), len(msg.ToJson())))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,9 +205,9 @@ func (c *WebConn) writePump() {
|
||||
if err := c.WebSocket.WriteMessage(websocket.TextMessage, msgBytes); err != nil {
|
||||
// browsers will appear as CloseNoStatusReceived
|
||||
if websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived) {
|
||||
l4g.Debug(fmt.Sprintf("websocket.send: client side closed socket userId=%v", c.UserId))
|
||||
mlog.Debug(fmt.Sprintf("websocket.send: client side closed socket userId=%v", c.UserId))
|
||||
} else {
|
||||
l4g.Debug(fmt.Sprintf("websocket.send: closing websocket for userId=%v, error=%v", c.UserId, err.Error()))
|
||||
mlog.Debug(fmt.Sprintf("websocket.send: closing websocket for userId=%v, error=%v", c.UserId, err.Error()))
|
||||
}
|
||||
|
||||
return
|
||||
@@ -226,9 +225,9 @@ func (c *WebConn) writePump() {
|
||||
if err := c.WebSocket.WriteMessage(websocket.PingMessage, []byte{}); err != nil {
|
||||
// browsers will appear as CloseNoStatusReceived
|
||||
if websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived) {
|
||||
l4g.Debug(fmt.Sprintf("websocket.ticker: client side closed socket userId=%v", c.UserId))
|
||||
mlog.Debug(fmt.Sprintf("websocket.ticker: client side closed socket userId=%v", c.UserId))
|
||||
} else {
|
||||
l4g.Debug(fmt.Sprintf("websocket.ticker: closing websocket for userId=%v error=%v", c.UserId, err.Error()))
|
||||
mlog.Debug(fmt.Sprintf("websocket.ticker: closing websocket for userId=%v error=%v", c.UserId, err.Error()))
|
||||
}
|
||||
|
||||
return
|
||||
@@ -237,7 +236,7 @@ func (c *WebConn) writePump() {
|
||||
return
|
||||
case <-authTicker.C:
|
||||
if c.GetSessionToken() == "" {
|
||||
l4g.Debug(fmt.Sprintf("websocket.authTicker: did not authenticate ip=%v", c.WebSocket.RemoteAddr()))
|
||||
mlog.Debug(fmt.Sprintf("websocket.authTicker: did not authenticate ip=%v", c.WebSocket.RemoteAddr()))
|
||||
return
|
||||
}
|
||||
authTicker.Stop()
|
||||
@@ -261,7 +260,7 @@ func (webCon *WebConn) IsAuthenticated() bool {
|
||||
|
||||
session, err := webCon.App.GetSession(webCon.GetSessionToken())
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.websocket.invalid_session.error"), err.Error())
|
||||
mlog.Error(fmt.Sprintf("Invalid session err=%v", err.Error()))
|
||||
webCon.SetSessionToken("")
|
||||
webCon.SetSession(nil)
|
||||
webCon.SetSessionExpiresAt(0)
|
||||
@@ -334,7 +333,7 @@ func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool {
|
||||
|
||||
if webCon.AllChannelMembers == nil {
|
||||
if result := <-webCon.App.Srv.Store.Channel().GetAllChannelMembersForUser(webCon.UserId, true); result.Err != nil {
|
||||
l4g.Error("webhub.shouldSendEvent: " + result.Err.Error())
|
||||
mlog.Error("webhub.shouldSendEvent: " + result.Err.Error())
|
||||
return false
|
||||
} else {
|
||||
webCon.AllChannelMembers = result.Data.(map[string]string)
|
||||
@@ -365,7 +364,7 @@ func (webCon *WebConn) IsMemberOfTeam(teamId string) bool {
|
||||
if currentSession == nil || len(currentSession.Token) == 0 {
|
||||
session, err := webCon.App.GetSession(webCon.GetSessionToken())
|
||||
if err != nil {
|
||||
l4g.Error(utils.T("api.websocket.invalid_session.error"), err.Error())
|
||||
mlog.Error(fmt.Sprintf("Invalid session err=%v", err.Error()))
|
||||
return false
|
||||
} else {
|
||||
webCon.SetSession(session)
|
||||
|
||||
@@ -13,10 +13,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -66,7 +64,7 @@ func (a *App) TotalWebsocketConnections() int {
|
||||
func (a *App) HubStart() {
|
||||
// Total number of hubs is twice the number of CPUs.
|
||||
numberOfHubs := runtime.NumCPU() * 2
|
||||
l4g.Info(utils.T("api.web_hub.start.starting.debug"), numberOfHubs)
|
||||
mlog.Info(fmt.Sprintf("Starting %v websocket hubs", numberOfHubs))
|
||||
|
||||
a.Hubs = make([]*Hub, numberOfHubs)
|
||||
a.HubsStopCheckingForDeadlock = make(chan bool, 1)
|
||||
@@ -89,7 +87,7 @@ func (a *App) HubStart() {
|
||||
case <-ticker.C:
|
||||
for _, hub := range a.Hubs {
|
||||
if len(hub.broadcast) >= DEADLOCK_WARN {
|
||||
l4g.Error("Hub processing might be deadlock on hub %v goroutine %v with %v events in the buffer", hub.connectionIndex, hub.goroutineId, len(hub.broadcast))
|
||||
mlog.Error(fmt.Sprintf("Hub processing might be deadlock on hub %v goroutine %v with %v events in the buffer", hub.connectionIndex, hub.goroutineId, len(hub.broadcast)))
|
||||
buf := make([]byte, 1<<16)
|
||||
runtime.Stack(buf, true)
|
||||
output := fmt.Sprintf("%s", buf)
|
||||
@@ -97,7 +95,7 @@ func (a *App) HubStart() {
|
||||
|
||||
for _, part := range splits {
|
||||
if strings.Contains(part, fmt.Sprintf("%v", hub.goroutineId)) {
|
||||
l4g.Error("Trace for possible deadlock goroutine %v", part)
|
||||
mlog.Error(fmt.Sprintf("Trace for possible deadlock goroutine %v", part))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,12 +109,12 @@ func (a *App) HubStart() {
|
||||
}
|
||||
|
||||
func (a *App) HubStop() {
|
||||
l4g.Info(utils.T("api.web_hub.start.stopping.debug"))
|
||||
mlog.Info("stopping websocket hub connections")
|
||||
|
||||
select {
|
||||
case a.HubsStopCheckingForDeadlock <- true:
|
||||
default:
|
||||
l4g.Warn("We appear to have already sent the stop checking for deadlocks command")
|
||||
mlog.Warn("We appear to have already sent the stop checking for deadlocks command")
|
||||
}
|
||||
|
||||
for _, hub := range a.Hubs {
|
||||
@@ -367,7 +365,7 @@ func (h *Hub) Start() {
|
||||
|
||||
doStart = func() {
|
||||
h.goroutineId = getGoroutineId()
|
||||
l4g.Debug("Hub for index %v is starting with goroutine %v", h.connectionIndex, h.goroutineId)
|
||||
mlog.Debug(fmt.Sprintf("Hub for index %v is starting with goroutine %v", h.connectionIndex, h.goroutineId))
|
||||
|
||||
connections := newHubConnectionIndex()
|
||||
|
||||
@@ -378,6 +376,7 @@ func (h *Hub) Start() {
|
||||
atomic.StoreInt64(&h.connectionCount, int64(len(connections.All())))
|
||||
case webCon := <-h.unregister:
|
||||
connections.Remove(webCon)
|
||||
atomic.StoreInt64(&h.connectionCount, int64(len(connections.All())))
|
||||
|
||||
if len(webCon.UserId) == 0 {
|
||||
continue
|
||||
@@ -403,7 +402,7 @@ func (h *Hub) Start() {
|
||||
select {
|
||||
case webCon.Send <- msg:
|
||||
default:
|
||||
l4g.Error(fmt.Sprintf("webhub.broadcast: cannot send, closing websocket for userId=%v", webCon.UserId))
|
||||
mlog.Error(fmt.Sprintf("webhub.broadcast: cannot send, closing websocket for userId=%v", webCon.UserId))
|
||||
close(webCon.Send)
|
||||
connections.Remove(webCon)
|
||||
}
|
||||
@@ -437,12 +436,12 @@ func (h *Hub) Start() {
|
||||
doRecover = func() {
|
||||
if !h.ExplicitStop {
|
||||
if r := recover(); r != nil {
|
||||
l4g.Error(fmt.Sprintf("Recovering from Hub panic. Panic was: %v", r))
|
||||
mlog.Error(fmt.Sprintf("Recovering from Hub panic. Panic was: %v", r))
|
||||
} else {
|
||||
l4g.Error("Webhub stopped unexpectedly. Recovering.")
|
||||
mlog.Error("Webhub stopped unexpectedly. Recovering.")
|
||||
}
|
||||
|
||||
l4g.Error(string(debug.Stack()))
|
||||
mlog.Error(string(debug.Stack()))
|
||||
|
||||
go doRecoverableStart()
|
||||
}
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
@@ -107,7 +108,7 @@ func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.
|
||||
req.Header.Set("Content-Type", contentType)
|
||||
req.Header.Set("Accept", "application/json")
|
||||
if resp, err := a.HTTPClient(false).Do(req); err != nil {
|
||||
l4g.Error(utils.T("api.post.handle_webhook_events_and_forget.event_post.error"), err.Error())
|
||||
mlog.Error(fmt.Sprintf("Event POST failed, err=%s", err.Error()))
|
||||
} else {
|
||||
defer consumeAndClose(resp)
|
||||
|
||||
@@ -134,7 +135,7 @@ func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.
|
||||
}
|
||||
|
||||
if _, err := a.CreateWebhookPost(hook.CreatorId, channel, text, webhookResp.Username, webhookResp.IconURL, webhookResp.Props, webhookResp.Type, postRootId); err != nil {
|
||||
l4g.Error(utils.T("api.post.handle_webhook_events_and_forget.create_post.error"), err)
|
||||
mlog.Error(fmt.Sprintf("Failed to create response post, err=%v", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -91,7 +91,7 @@ func (wr *WebSocketRouter) ServeWebSocket(conn *WebConn, r *model.WebSocketReque
|
||||
}
|
||||
|
||||
func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError) {
|
||||
l4g.Error(utils.T("api.web_socket_router.log.error"), r.Seq, conn.UserId, err.SystemMessage(utils.T), err.DetailedError)
|
||||
mlog.Error(fmt.Sprintf("websocket routing error: seq=%v uid=%v %v [details: %v]", r.Seq, conn.UserId, err.SystemMessage(utils.T), err.DetailedError))
|
||||
|
||||
err.DetailedError = ""
|
||||
errorResp := model.NewWebSocketError(r.Seq, err)
|
||||
|
||||
@@ -5,6 +5,7 @@ package commands
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/cmd"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/mattermost/mattermost-server/cmd"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/cmd"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -36,13 +36,12 @@ func jobserverCmdF(command *cobra.Command, args []string) {
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
defer l4g.Close()
|
||||
defer a.Shutdown()
|
||||
|
||||
a.LoadLicense()
|
||||
|
||||
// Run jobs
|
||||
l4g.Info("Starting Mattermost job server")
|
||||
mlog.Info("Starting Mattermost job server")
|
||||
if !noJobs {
|
||||
a.Jobs.StartWorkers()
|
||||
}
|
||||
@@ -55,10 +54,10 @@ func jobserverCmdF(command *cobra.Command, args []string) {
|
||||
<-signalChan
|
||||
|
||||
// Cleanup anything that isn't handled by a defer statement
|
||||
l4g.Info("Stopping Mattermost job server")
|
||||
mlog.Info("Stopping Mattermost job server")
|
||||
|
||||
a.Jobs.StopSchedulers()
|
||||
a.Jobs.StopWorkers()
|
||||
|
||||
l4g.Info("Stopped Mattermost job server")
|
||||
mlog.Info("Stopped Mattermost job server")
|
||||
}
|
||||
|
||||
@@ -4,18 +4,19 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/api"
|
||||
"github.com/mattermost/mattermost-server/api4"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/cmd"
|
||||
"github.com/mattermost/mattermost-server/manualtesting"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
"github.com/mattermost/mattermost-server/web"
|
||||
@@ -61,7 +62,7 @@ func runServer(configFileLocation string, disableConfigWatch bool, interruptChan
|
||||
|
||||
a, err := app.New(options...)
|
||||
if err != nil {
|
||||
l4g.Critical(err.Error())
|
||||
mlog.Critical(err.Error())
|
||||
return err
|
||||
}
|
||||
defer a.Shutdown()
|
||||
@@ -69,17 +70,17 @@ func runServer(configFileLocation string, disableConfigWatch bool, interruptChan
|
||||
utils.TestConnection(a.Config())
|
||||
|
||||
pwd, _ := os.Getwd()
|
||||
l4g.Info(utils.T("mattermost.current_version"), model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise)
|
||||
l4g.Info(utils.T("mattermost.entreprise_enabled"), model.BuildEnterpriseReady)
|
||||
l4g.Info(utils.T("mattermost.working_dir"), pwd)
|
||||
l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(configFileLocation))
|
||||
mlog.Info(fmt.Sprintf("Current version is %v (%v/%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise))
|
||||
mlog.Info(fmt.Sprintf("Enterprise Enabled: %v", model.BuildEnterpriseReady))
|
||||
mlog.Info(fmt.Sprintf("Current working directory is %v", pwd))
|
||||
mlog.Info(fmt.Sprintf("Loaded config file from %v", utils.FindConfigFile(configFileLocation)))
|
||||
|
||||
backend, appErr := a.FileBackend()
|
||||
if appErr == nil {
|
||||
appErr = backend.TestConnection()
|
||||
}
|
||||
if appErr != nil {
|
||||
l4g.Error("Problem with file storage settings: " + appErr.Error())
|
||||
mlog.Error("Problem with file storage settings: " + appErr.Error())
|
||||
}
|
||||
|
||||
if model.BuildEnterpriseReady == "true" {
|
||||
@@ -99,7 +100,7 @@ func runServer(configFileLocation string, disableConfigWatch bool, interruptChan
|
||||
|
||||
serverErr := a.StartServer()
|
||||
if serverErr != nil {
|
||||
l4g.Critical(serverErr.Error())
|
||||
mlog.Critical(serverErr.Error())
|
||||
return serverErr
|
||||
}
|
||||
|
||||
@@ -111,7 +112,7 @@ func runServer(configFileLocation string, disableConfigWatch bool, interruptChan
|
||||
license := a.License()
|
||||
|
||||
if license == nil && len(a.Config().SqlSettings.DataSourceReplicas) > 1 {
|
||||
l4g.Warn(utils.T("store.sql.read_replicas_not_licensed.critical"))
|
||||
mlog.Warn("More than 1 read replica functionality disabled by current license. Please contact your system administrator about upgrading your enterprise license.")
|
||||
a.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.SqlSettings.DataSourceReplicas = cfg.SqlSettings.DataSourceReplicas[:1]
|
||||
})
|
||||
@@ -171,7 +172,7 @@ func runServer(configFileLocation string, disableConfigWatch bool, interruptChan
|
||||
if a.Elasticsearch != nil {
|
||||
a.Go(func() {
|
||||
if err := a.Elasticsearch.Start(); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -241,7 +242,7 @@ func runSessionCleanupJob(a *app.App) {
|
||||
|
||||
func resetStatuses(a *app.App) {
|
||||
if result := <-a.Srv.Store.Status().ResetAll(); result.Err != nil {
|
||||
l4g.Error(utils.T("mattermost.reset_status.error"), result.Err.Error())
|
||||
mlog.Error(fmt.Sprint("mattermost.reset_status.error FIXME: NOT FOUND IN TRANSLATIONS FILE", result.Err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,11 +261,11 @@ func notifyReady() {
|
||||
// notify systemd that the server is ready.
|
||||
systemdSocket := os.Getenv("NOTIFY_SOCKET")
|
||||
if systemdSocket != "" {
|
||||
l4g.Info("Sending systemd READY notification.")
|
||||
mlog.Info("Sending systemd READY notification.")
|
||||
|
||||
err := sendSystemdReadyNotification(systemdSocket)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/cmd"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
@@ -644,7 +643,7 @@ func migrateAuthToSamlCmdF(command *cobra.Command, args []string) error {
|
||||
if err := migrate.MigrateToSaml(fromAuth, matches, autoFlag, dryRunFlag); err != nil {
|
||||
return errors.New("Error while migrating users: " + err.Error())
|
||||
}
|
||||
l4g.Close()
|
||||
|
||||
cmd.CommandPrettyPrintln("Successfully migrated accounts.")
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ func InitDBCommandContext(configFileLocation string) (*app.App, error) {
|
||||
}
|
||||
model.AppErrorInit(utils.T)
|
||||
|
||||
utils.ConfigureCmdLineLog()
|
||||
|
||||
a, err := app.New(app.ConfigFile(configFileLocation))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -118,9 +118,10 @@
|
||||
"LogSettings": {
|
||||
"EnableConsole": true,
|
||||
"ConsoleLevel": "DEBUG",
|
||||
"ConsoleJson": true,
|
||||
"EnableFile": true,
|
||||
"FileLevel": "INFO",
|
||||
"FileFormat": "",
|
||||
"FileJson": true,
|
||||
"FileLocation": "",
|
||||
"EnableWebhookDebugging": true,
|
||||
"EnableDiagnostics": true
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
package einterfaces
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"mime/multipart"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
type BrandInterface interface {
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
package einterfaces
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"io"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
type OauthProvider interface {
|
||||
|
||||
120
i18n/de.json
120
i18n/de.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Dieser Kanal wurde in einen privaten Kanal umgewandelt."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Für die Erstellung eines Direktnachrichtenkanals muss der createDirectChannel-API-Service verwendet werden"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v hat den Kanal verlassen."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Fehler beim Senden der Kanalkonversation als private Nachricht"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Fehler beim Abrufen des Nutzers während der Umwandlung des öffentlichen Kanals in einen privaten Kanal"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s hat diesen öffentlichen Kanal in einen privaten Kanal umgewandelt"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Fehler beim Senden der Anzeigenamen-Aktualisierungsnachricht"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "hilfe"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Fehler beim Laden des aktuellen Kanals."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Konnte den Kanal {{.Channel}} nicht finden. Bitte nutzen Sie den [Kanal-Handle](https://about.mattermost.com/default-channel-handle-documentation), um Kanäle zu identifizieren."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Sie können keinen Benutzer aus einem Direktnachrichtenkanal entfernen."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Es trat ein Fehler beim Betreten des Kanals auf."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Der Benutzer konnte nicht gefunden werden."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Öffentlichen Kanal beitreten"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "stumm"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Konnte den Kanal {{.Channel}} nicht finden. Bitte nutzen Sie den [Kanal-Handle](https://about.mattermost.com/default-channel-handle-documentation), um Kanäle zu identifizieren."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "Sie werden keine Benachrichtigungen mehr für {{.Channel}} erhalten bis die Stummschaltung aufgehoben wurde."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Fehler beim Betreten des Standardkanals user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Fehlender Hash oder URL-Anfrage-Daten."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Fehlende Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Dieser Server erlaubt keine offenen Registrierungen. Bitte wenden Sie sich an Ihren Administrator, um eine Einladung zu erhalten."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Fehler beim Abruf des Benutzerprofils mit id=%v erzwingt Abmeldung"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Initialisiere Benutzer-API-Routen"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Ungültiger {{.Name}} Parameter"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Es muss eine Team-ID angegeben werden um einen Kanal zu erstellen"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Fehler beim Erstellen der Spalte aufgrund fehlendem Treiber"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Fehler beim Erstellen des Index %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Fehler beim Erstellen des Index aufgrund fehlendem Treiber"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Fehler beim Abruf der maximalen Länge für Spalte %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Fehler beim Öffnen der SQL Verbindung zu err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Fehler beim Öffnen der SQL Verbindung %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "Das Datenbankschema der Version %v scheint veraltet zu sein"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Das Datenbankschema wurde auf Version %v gesetzt"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Versuche Datenbankschema auf Version %v zu aktualisieren"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Es trat ein Fehler beim Löschen der Einstellungen auf"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Lösche alle ungenutzten Pre-Release-Funktionen"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Es trat ein Fehler beim Sichen der Einstellungen auf"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Konnte die Rollen nicht abrufen"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Konnte die neue Rolle nicht speichern"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Die Datenbankversion konnte nicht abgerufen werden"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Es trat ein Fehler beim Speichern der Systemeinstellung auf"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Benachrichtigungseinstellung Absenderadresse fehlt oder ist ungültig."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Benachrichtigungseinstellung Empfängeradresse fehlt oder ist ungültig."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
168
i18n/en.json
168
i18n/en.json
@@ -782,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "help"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Error to retrieve the current channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "You can't add someone to a direct message channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "An error occurred while joining the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "We couldn't find the user."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Join the open channel"
|
||||
@@ -810,54 +858,6 @@
|
||||
"id": "api.command_join.success",
|
||||
"translation": "Joined channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "We couldn't find the user."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Error to retrieve the current channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "An error occurred while joining the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "You can't add someone to a direct message channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_kick.name",
|
||||
"translation": "kick"
|
||||
@@ -950,14 +950,6 @@
|
||||
"id": "api.command_mute.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.hint",
|
||||
"translation": "~[channel]"
|
||||
@@ -966,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2458,6 +2458,10 @@
|
||||
"id": "api.team.set_team_icon.encode.app_error",
|
||||
"translation": "Could not encode team icon"
|
||||
},
|
||||
{
|
||||
"id": "api.team.remove_team_icon.get_team.app_error",
|
||||
"translation": "An error occurred getting the team"
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.get_team.app_error",
|
||||
"translation": "An error occurred getting the team"
|
||||
@@ -2482,6 +2486,10 @@
|
||||
"id": "api.team.set_team_icon.too_large.app_error",
|
||||
"translation": "Unable to upload team icon. File is too large."
|
||||
},
|
||||
{
|
||||
"id": "api.team.team_icon.update.app_error",
|
||||
"translation": "An error occurred updating the team icon"
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.write_file.app_error",
|
||||
"translation": "Could not save team icon"
|
||||
@@ -2846,14 +2854,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Missing Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "This server does not allow open signups. Please speak with your Administrator to receive an invitation."
|
||||
@@ -2902,6 +2910,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Error in getting users profile for id=%v forcing logout"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Initializing user API routes"
|
||||
@@ -3138,10 +3150,6 @@
|
||||
"id": "api.user.upload_profile_user.parse.app_error",
|
||||
"translation": "Could not parse multipart form"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.upload_profile_user.storage.app_error",
|
||||
"translation": "Unable to upload file. Image storage is not configured."
|
||||
@@ -3298,6 +3306,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Invalid {{.Name}} parameter"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Must specify the team ID to create a channel"
|
||||
@@ -5770,10 +5782,6 @@
|
||||
"id": "store.sql.closing.info",
|
||||
"translation": "Closing SqlStore"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.column_exists.critical",
|
||||
"translation": "Failed to check if column exists %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.column_exists_missing_driver.critical",
|
||||
"translation": "Failed to check if column exists because of missing driver"
|
||||
@@ -5862,10 +5870,6 @@
|
||||
"id": "store.sql.table_column_type.critical",
|
||||
"translation": "Failed to get data type for column %s from table %s: %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.table_exists.critical",
|
||||
"translation": "Failed to check if table exists %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.too_short_ciphertext",
|
||||
"translation": "ciphertext too short"
|
||||
@@ -6562,14 +6566,6 @@
|
||||
"id": "store.sql_post.search.disabled",
|
||||
"translation": "Searching has been disabled on this server. Please contact your System Administrator."
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_post.search.warn",
|
||||
"translation": "Query error searching posts: %v"
|
||||
@@ -6774,6 +6770,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Unable to get roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6890,6 +6890,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "We couldn't get the database version"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "We encountered an error saving the system property"
|
||||
@@ -7466,10 +7470,6 @@
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
"translation": "Failed to write email message"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg_data.app_error",
|
||||
"translation": "Failed to add email message data"
|
||||
|
||||
120
i18n/es.json
120
i18n/es.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Este canal ha sido convertido a un Canal Privado."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "Este es el canal predeterminado y no se puede convertir como canal privado."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "El canal que intentas convertir ya es un canal privado."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Debe usar el servicio del api createDirectChannel para crear un canal de mensajes directos"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v abandonó el canal."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "No se pudo publicar el mensaje sobre la conversión del canal como privado"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "No se pudo recuperar el usuario, durante la conversión del canal de público a privado"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s convirtió el canal de público a privado"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "No se pudo publicar el mensaje de actualización del nombre del canal"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "help"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Error al recuperar el canal actual."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "No se encontró el canal {{.Channel}}. Por favor utiliza el [identificador del canal](https://about.mattermost.com/default-channel-handle-documentation) para identificar canales."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invita un usuario a un canal"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "No se puede remover a alguien de un canal de mensajes directos."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Ocurrió un error al unirse al canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[usuario] ~[canal]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Falta Nombre de Usuario y Canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "No pudimos encontrar el usuario."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "No tienes suficientes permisos para agregar a {{.User}} en {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} agregado al canal {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} ya está en el canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Unirte a un canal público"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "No se encontró el canal especificado. Por favor utiliza el [identificador del canal](https://about.mattermost.com/default-channel-handle-documentation) para identificar canales."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "No se pudo silenciar el canal {{.Channel}} porque no eres miembro."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "No recibirás notificaciones para {{.Channel}} mientras el canal es silenciado."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Se encontró un problema al unirse a los canales predeterminados user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Falta el Hash o la URL en los datos de la consulta."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Falta el Id de invitación."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Falta Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Este servidor no permite registros sin invitación. Por favor comunícate con un administrador para recibir una invitación."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Error obteniendo el pérfil de usuario para id=%v forzando el cierre de sesión"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "No se pudo obtener la imagen del perfil, usuario no encontrado."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Inicializando rutas del API para los usuarios"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Parámetro {{.Name}} inválido"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Conexión fallida: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Debe especificar el ID del equipo crear un canal"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Falla al crear la columna porque el controlador no se encuentra"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Falla al crear el indice %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Falla al crear el indice porque el controlador no se encuentra"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Falla al obtener la máxima longitud de la columna %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Falla al abrir una conexión SQL a err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Falla al abrir una conexión SQL %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "La versión del esquema de la base de datos %v parece estar desactualizada"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "El esquema de la base de datos ha sido asignado a la versión %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Intentando actualizar el esquema de la base de datos a la versión %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Encontramos un error mientras eliminabamos las preferencias"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Eliminando las características de pre-release"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Encontramos un error mientras buscamos las preferencias"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "No se pudo obtener los roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "No se pudo eliminar permanentemente todos los roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "No se pudo guardar el nuevo rol"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "No podemos obtener la versión de base de datos"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "No se pudo eliminar permanentemente la entrada en la tabla del sistema"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Entrontramos un error mientras se guardaban las propiedades del sistema"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Notificación la Dirección del remitente falta o no es válida."
|
||||
"translation": "Error ajuste \"Dirección Desde\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Notificación la Dirección de recepción falta o no es válida."
|
||||
"translation": "Error ajuste \"Dirección Para\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/fr.json
120
i18n/fr.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Ce canal a été converti en canal privé."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Vous devez utiliser le service d'API createDirectChannel pour la création d'un canal de messages personnels"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v a quitté le canal."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Impossible de publier le message indiquant le changement du nom d'affichage"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "aide"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Impossible de récupérer le canal courant."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Vous ne pouvez pas retirer un utilisateur d'un canal de messages personnels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Une erreur s'est produite en rejoignant le canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Utilisateur introuvable"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Rejoint un canal ouvert"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Problème en tentant de rejoindre les canaux par défaut user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Hash ou URL de requête manquant."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Invite Id manquant"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Ce serveur ne permet pas d'inscriptions ouvertes. Veuillez contacter votre administrateur pour recevoir une invitation."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Erreur lors de la récupération du profil pour id=%v déconnexion forcée"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Initialisation des routes de l'API utilisateur"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Paramètre {{.Name}} invalide"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Veuillez spécifier l'identifiant d'équipe afin de créer un canal"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Impossible de créer la colonne en raison d'un driver manquant"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Impossible de créer l'index %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Impossible de créer l'index en raison d'un driver manquant"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Échec de récupération de la taille maximale de la colonne %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Impossible d'ouvrir une connexion SQL vers err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Impossible d'ouvrir une connexion SQL %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "La version du schéma de la base de données %v semble être dépassée"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Le schéma de la base de données a été migré en version %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Tentative de mise à niveau du schéma de la base de données vers la version %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Nous avons rencontré une erreur durant la suppression des préférences"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Suppression de toutes les fonctionnalités en accès anticipé non utilisées"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Nous avons rencontré une erreur durant la recherche des préférences"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Impossible de récupérer le message"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Impossible de déterminer la version de la base de donnée"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Nous avons rencontré une erreur lors de l'enregistrement de la propriété système"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Le paramètre de notification depuis l'adresse est manquant ou invalide."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Le paramètre de notification à l'adresse est manquant ou invalide."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/it.json
120
i18n/it.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Questo canale è stato convertito in un Canale Privato."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Bisogna usare il servizio createDirectChannel API per la creazione dei messaggi diretti nel canale"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v ha lasciato il canale."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Impossibile pubblicare la conversione del canale a messaggio privato"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Impossibile recuperare gli utenti durante la conversione del canale da pubblico a privato"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s ha cambiato il canale da pubblico a privato"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Errore nell'invio del messaggio di aggiornamento del nome"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "aiuto"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Errore nel caricamento del canale corrente."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Impossibile trovare il canale {{.Channel}}. Usare [channel handle](https://about.mattermost.com/default-channel-handle-documentation) per identificare i canali."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invita un utente in un canale"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Non puoi rimuovere qualcuno da un canale diretto."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Si è verificato un errore durante l'entrata nel canale."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Nome utente e Canale Mancanti."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Non è stato possibile trovare l'utente."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invita"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "Non si hanno permessi sufficienti per aggiungere {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} aggiunto al canale {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} è già membro del canale."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Entra nel canale aperto"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "silenzia"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Impossibile trovare il canale specificato. Usare [channel handle](https://about.mattermost.com/default-channel-handle-documentation) per identificare i canali."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Impossibile silenziare il canale {{.Channel}}, non ne sei membro."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "Non riceverai ulteriori notifiche per {{.Channel}} fino a quando sarà silenziato."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Si è verificato un errore entrando nel canale di default user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Hash o URL mancante nell'interrogazione."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Id invito mancante."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Questo server non supporta la registrazione pubblica. Contatta un amministratore per ricevere un invito."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Errore nel caricamento del profilo utente id=%v uscita forzata"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Impossibile trovare l'immagine del profilo utente, utente non trovato."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Inizializzazione API Routes per l'utente"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Parametro {{.Name}} non valido"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connessione non riuscita: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "E' necessario specificare l'ID del gruppo per creare un canale"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Creazione della colonna fallita a causa di un driver mancante"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Creazione indice fallita %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Fallita creazione indice a causa di driver amncanti"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Recupero della lunghezza massima della colonna fallito %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Impossibile aprire la connessione SQL ad err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Impossibile aprire la connessione SQL %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "La versione dello schema per il database %v sembra essere datata"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Lo schema del database è stato impostato alla versione %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Tentativo di aggiornamento dello schema del database alla versione %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Errore riscontrato durante l'eliminazione delle preferenze"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Eliminazione in corso di qualsiasi funzionalità in anteprima non utilizzata"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Errore riscontrato durante la ricerca delle preferenze"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Impossibile recuperare i ruoli"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Impossibile salvare il nuovo ruolo"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Non è stato possibile trovare la versione del database"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Riscontrato un errore nel salvataggio della proprietà di sistema"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Impostazione indirizzo mittente notifica assente o non specificata."
|
||||
"translation": "Errore durante l'impostazione del campo \"Indirizzo Mittente\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Impostazione indirizzo destinatario assente o non specificata."
|
||||
"translation": "Errore durante l'impostazione del campo \"Indirizzo Destinatario\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
140
i18n/ja.json
140
i18n/ja.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "このチャンネルは非公開チャンネルに変更されました。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "ダイレクトメッセージチャンネルを作成するにはcreateDirectChannel APIを使用してください"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v がチャンネルから脱退しました。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "チャンネル変更について非公開メッセージとして投稿できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "公開チャンネルを非公開チャンネルに変更する際にユーザーを取得できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s がチャンネルを公開から非公開に変更しました"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "表示名更新メッセージを投稿できませんでした"
|
||||
@@ -517,7 +513,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_away.desc",
|
||||
"translation": "離席状態に設定します"
|
||||
"translation": "離席状態に設定する"
|
||||
},
|
||||
{
|
||||
"id": "api.command_away.name",
|
||||
@@ -637,7 +633,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_code.desc",
|
||||
"translation": "テキストをコードブロックとして表示します"
|
||||
"translation": "テキストをコードブロックとして表示する"
|
||||
},
|
||||
{
|
||||
"id": "api.command_code.hint",
|
||||
@@ -653,7 +649,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_collapse.desc",
|
||||
"translation": "画像プレビューの自動折りたたみをオンにします"
|
||||
"translation": "画像プレビューの自動折りたたみをオンにする"
|
||||
},
|
||||
{
|
||||
"id": "api.command_collapse.name",
|
||||
@@ -713,7 +709,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_expand.desc",
|
||||
"translation": "画像プレビューの自動折りたたみをオフにします"
|
||||
"translation": "画像プレビューの自動折りたたみをオフにする"
|
||||
},
|
||||
{
|
||||
"id": "api.command_expand.name",
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "ヘルプ"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "現在のチャンネルを取得する際にエラーが発生しました。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "チャンネル {{.Channel}} が見つかりませんでした。チャンネルの指定には[チャンネルのハンドル名](https://about.mattermost.com/default-channel-handle-documentation)を使用してください"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "ユーザーをチャンネルに招待する"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "ダイレクトメッセージチャンネルにメンバーを追加できません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "チャンネルに参加する際にエラーが発生しました。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[ユーザー名] ~[チャンネル]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "ユーザー名とチャンネルが存在しません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "ユーザーが見付かりませんでした。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "招待"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "{{.User}} を {{.Channel}} に追加する権限がありません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} がチャンネル {{.Channel}} に追加されました。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} は既にチャンネルに追加されています。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "公開されているチャンネルに参加する"
|
||||
@@ -900,7 +944,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.desc",
|
||||
"translation": "現在のチャンネル、もしくは指定された [チャンネル] のデスクトップ、電子メール、プッシュ通知をオフにします"
|
||||
"translation": "現在のチャンネル、もしくは指定された [チャンネル] のデスクトップ、電子メール、プッシュ通知をオフにする。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.error",
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "ミュート"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "指定したチャンネルが見つかりませんでした。チャンネルの指定には[チャンネルのハンドル名](https://about.mattermost.com/default-channel-handle-documentation)を使用してください"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "あなたはメンバーではないため、チャンネル {{.Channel}} をミュートできません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "チャンネルミュートがオフになるまで {{.Channel}} の通知を受け取らなくなります。"
|
||||
@@ -924,15 +976,15 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_unmute",
|
||||
"translation": "{{.Channel}} のミュートはオフになっています。"
|
||||
"translation": "{{.Channel}} はミュートされていません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_unmute_direct_msg",
|
||||
"translation": "このチャンネルのミュートはオフになっています。"
|
||||
"translation": "このチャンネルはミュートされていません。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_offline.desc",
|
||||
"translation": "オフライン状態に設定します"
|
||||
"translation": "オフライン状態に設定する"
|
||||
},
|
||||
{
|
||||
"id": "api.command_offline.name",
|
||||
@@ -944,7 +996,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_online.desc",
|
||||
"translation": "オンライン状態に設定します"
|
||||
"translation": "オンライン状態に設定する"
|
||||
},
|
||||
{
|
||||
"id": "api.command_online.name",
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "デフォルトのチャンネルへの参加に問題が発生しました user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "クエリデータのハッシュ、もしくはURLが見つかりません。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "招待IDが存在しません。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "トークンが存在しません。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "このサーバーは誰でも自由に利用登録できるように設定されていません。システム管理者に招待してもらってください。"
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "id=%vのユーザーのプロフィールを取得できません。強制的にログアウトします"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "ユーザーが見付からないため、プロフィール画像を取得できませんでした。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "ユーザーAPIルートを初期化しています"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "不正な{{.Name}}パラメーターです"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "接続できませんでした: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "チャンネルを作成するにはチームIDを指定しなければなりません"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "ドライバーが不足しているため列の作成ができませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "インデックス%vが作成できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "ドライバーが不足しているためインデックスが作成できませんでした"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "列%vの最大長を取得できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "SQL接続を開けませんでした: %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "SQL接続%vを開けませんでした"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "%vのデータベーススキーマのバージョンは古くなっています"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "データベーススキーマはバージョン%vに設定されました"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "データベーススキームのバージョンを%vにアップグレードしようとしています"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "設定を削除する際にエラーが発生しました"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "未使用のプリリリースの機能を削除しています"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "設定を探す際にエラーが発生しました"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "役割を取得できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "すべての役割を完全に削除できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "新しい役割を保存できませんでした"
|
||||
@@ -6692,7 +6740,7 @@
|
||||
},
|
||||
{
|
||||
"id": "store.sql_session.save.cleanup.error",
|
||||
"translation": "Saveにおけるセッションを クリーンアップできませんでした err=%v"
|
||||
"translation": "保存する際のセッションをクリーンアップできませんでした err=%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_session.save.existing.app_error",
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "データベースのバージョンを取得できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "システムテーブルのエントリーを完全に削除できませんでした"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "システム設定値を保存する際にエラーが発生しました"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "通知の送信元電子メールアドレス設定が存在しないか不正です。"
|
||||
"translation": "設定エラー \"送信元電子メールアドレス\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "通知の送信先電子メールアドレス設定が存在しないか不正です。"
|
||||
"translation": "設定エラー \"宛先電子メールアドレス\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/ko.json
120
i18n/ko.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "이 채널은 비공개 채널로 변경되었습니다."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "개인 메시지 채널을 만들기 위해서는 반드시 createDirectChannel API 서비스를 이용해야 함"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v 가 채널을 떠났습니다."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "displayname 업데이트 메시지 등록 실패"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "도움말"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "현재 채널을 찾는 중 오류가 발생하였습니다."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "개인 메시지 채널에서 다른 사용자를 제거할 수 없습니다."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "채널에 참가하는 중 오류가 발생했습니다."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "사용자를 찾을 수 없습니다"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "열린 채널에 참가"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "음소거"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "기본 채널에 참여하는데 실패했습니다. user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Missing Hash or URL query data."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Missing Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "This server does not allow open signups. Please speak with your Administrator to receive an invitation."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "id=%v 강제 로그아웃 중 유저 프로필을 가져오다가 오류가 발생했습니다"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "사용자 API 경로 초기화 중"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "적절하지 않은 {{.Name}} 파라미터"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Must specify the team ID to create a channel"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Failed to create column because of missing driver"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Failed to create index %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Failed to create index because of missing driver"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Failed to get max length of column %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Failed to open sql connection to err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Failed to open sql connection %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "The database schema version of %v appears to be out of date"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "The database schema has been set to version %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Attempting to upgrade the database schema version to %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "We encountered an error while deleting preferences"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Deleting any unused pre-release features"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "We encountered an error while finding preferences"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "내용을 가져올수 없습니다."
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "We couldn't get the database version"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "We encountered an error saving the system property"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Notification From Address setting is missing or invalid."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Notification To Address setting is missing or invalid."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/nl.json
120
i18n/nl.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "This kanaal is omgezet naar een privékanaal."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "U moet de 'createDirectChannel' API service gebruiken om een direct kanaal aan te maken"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v heeft het kanaal verlaten."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Fout bij het weergeven van het bericht over de bijgewerkte weergavenaam"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "help"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Error to retrieve the current channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "You can't add someone to a direct message channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Er is een fout opgetreden tijdens het deelnemen aan het kanaal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "De gebruiker kan niet gevonden worden"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Neem deel aan het open kanaal"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Er is een fout opgetreden tijdens het deelnemen aan de standaard kanalen user_id=%s, team_id=%s, fout=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Missing Hash or URL query data."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Missing Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Deze server staat zelf aanmelden niet toe. Neem contact op met uw systeembeheerder voor een uitnodiging."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Probleem bij het ophalen van het gebruikersprofiel voor id=%v, uitlog actie geforceerd"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Initialisatie van de gebruikers api"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Ongeldige {{.Name}} parameter"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Must specify the team ID to create a channel"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Stuurprogramma mist bij het aanmaken van de kolom"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Fout bij het aanmaken van een index %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Stuurprogramma mist bij het aanmaken van een index"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Fout bij het bepalen van de maximale lengte van kolom %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Fout bij het starten van sql verbinding, fout; %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Fout bij het openen van de sql verbinding %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "Database schema versie %v lijkt niet bijgewerkt te zijn"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Het database schema is gezet op versie %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Poging om de database schema te upgraden naar versie %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Er is een probleem opgetreden tijden het verwijderen van voorkeuren"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Verdijderen van alle ongebruikte pre-release mogelijkheden"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Er is een probleem opgestreden tijdens het opzoeken van voorkeuren"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Bericht kan niet opgehaald worden"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "We konden de database versie niet ophalen"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Er is een probleem opgetreden tijdens het opslaan van de systeem instellingen"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Notification From Address setting is missing or invalid."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Notification To Address setting is missing or invalid."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/pl.json
120
i18n/pl.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "This channel has been converted to a Private Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Do tworzenia kanału wiadomości bezpośrednich należy użyć usługi API createDirectChannel"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v opuszcza kanał."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Nie udało się wysłać wiadomości aktualizującej wyświetlaną nazwę"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "pomoc"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Błąd pobierania aktualnego kanału."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Nie można usunąć kogoś z kanału prywatnej wiadomości."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Wystąpił błąd podczas dołączania do kanału."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Nie odnaleziono użytkownika."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Dołącz do otwartego kanału"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Wystąpił problem podczas dołączania do domyślnych kanalów user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Brakujące zapytanie Hash albo URL."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Brak identyfikatora zaproszenia."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Ten serwer nie zezwala na otwartą rejestrację. Skontaktuj się ze swoim administratorem aby otrzymać zaproszenie."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Błąd w trakcie pobierania profilu użytkowników dla id=%v wymusza wylogowanie"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Inicjowanie tras api użytkownika"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Nieprawidłowy parametr {{.Name}}"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "ID zespołu musi być określone aby można było stworzyć kanał"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Nie udało się utworzyć kolumny gdyż brakuje sterownika"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Nie udało się utworzyć indeksu %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Nie udało się utworzyć indeksu gdyż brakuje sterownika"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Nie udało się pobrać maksymalnej długości kolumny %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Nie można otworzyć połączenia sql błąd:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Niepowodzenie podczas otwierania połączenia sql %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "Schemat bazy danych w wersji %v wydaje się być nieaktualny"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Schemat bazy danych został zaktualizowany do wersji %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Przystępuję do aktualizacji schematu bazy danych do wersji %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Wystąpił błąd w trakcie kasowania ustawień"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Usuwanie wszystkich nieużywanych funkcji wstępnych"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Wystąpił błąd w trakcie pobierania ustawień"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Nie można pobrać wiadomości"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Nie mogliśmy pobrać wersji bazy danych"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Napotkaliśmy błąd zapisując właściwość systemową"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Notification From Address setting is missing or invalid."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Notification To Address setting is missing or invalid."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/pt-BR.json
120
i18n/pt-BR.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Este canal foi convertido para um Canal Privado."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Deve-se usar a API de serviço createDirectChannel para criação do canal de mensagens diretas"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v deixou o canal."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Falha ao postar a conversão do canal em mensagem privada"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Falha ao recuperar usuário durante a conversão do canal de público para privado"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s convertido de canal publico para privado"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Falha ao postar a mensagem para atualização do nome de exibição"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "ajuda"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Error ao obter o canal atual."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Não foi possível encontrar o canal {{.Channel}}. Por favor use o [identificador de canal](https://about.mattermost.com/default-channel-handle-documentation) para identificar os canais."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Você não pode remover a pessoa de um canal de mensagens diretas"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Ocorreu um erro enquanto conectava ao canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Não foi possível encontrar o usuário."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "convite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "Você não tem permissão suficiente para adicionar {{.User}} em {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} adicionado ao canal {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} já está no canal."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Junte-se ao canal aberto"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mudo"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Não foi possível encontrar o canal {{.Channel}}. Por favor use o [identificador de canal](https://about.mattermost.com/default-channel-handle-documentation) para identificar os canais."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Não foi possível silenciar o canal {{.Channel}} porque você não é um membro."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "Você não irá receber notificações de {{.Channel}} até que o mudo do canal seja desativado."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Encontrado um problema ao se juntar ao canal padrão user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Falta a Hash ou URL nos dados da consulta."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Falta Id do Convite."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Faltando Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Este servidor não permite inscrições abertas. Por favor, fale com o seu Administrador para receber um convite."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Erro na obtenção do perfil dos usuários para id=%v forçando o logout"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Inicializando as rotas de API user"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Parâmetro {{.Name}} inválido"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "É necessário informar o ID da equipe para criar um canal"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Falha ao criar a couna devido a falta do driver"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Falha ao criar o índice %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Falha para criar o índice devido a falta do driver"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Falha ao obter o comprimento máximo da coluna %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Falha ao abrir a conexão SQL err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Falha ao abrir a conexão SQL %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "A versão do esquema do banco de dados %v parece estar desatualizada"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "O esquema do banco de dados foi ajustado para a versão %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Tentando atualizar o esquema do banco de dados para versão %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Encontramos um erro enquanto deletava as preferências"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Excluindo recursos de pré-lançamento não utilizados"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Encontramos um erro ao procurar as preferências"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Não foi possível obter as funções"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Não foi possível salvar a função"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Não foi possível obter a versão do banco de dados"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Encontramos um erro ao salvar as propriedades do sistema"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Endereço de remetente de email para notificação está faltando ou é inválido."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Endereço de email para notificação está faltando ou é inválido."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/ru.json
120
i18n/ru.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Канал преобразован в приватный."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Нужно использовать createDirectChannel из API для создания канала личных сообщений"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v покинул канал."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Ну удалось отправить сообщение об обновлении отображаемого имени канала"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "помощь"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Ошибка получения текущего канала."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Вы не можете удалить кого-либо из канала прямого сообщения."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Во время присоединения к каналу произошла ошибка."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Не удалось найти пользователя"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Присоединиться к отрытому каналу"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "mute"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "Could not find the specified channel. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "You will not receive notifications for {{.Channel}} until channel mute is turned off."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Возникла проблема при присоединении к каналам по умолчанию user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Missing Hash or URL query data."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Отсутствует Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Этот сервер не разрешает открытую регистрацию. Пожалуйста, поговорите с администратором для получения приглашения."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "Ошибка при получении профиля пользователя для id=%v, принудительный выход"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Инициализация API пользователей"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "Недопустимый параметр {{.Name}}"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Для создания канала необходимо указать ID команды"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Не удалось создать колонку по причине отсутствующего драйвера"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "Не удалось создать индекс %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Не удалось создать индекс из-за отсутствия драйвера"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "Не удалось получить максимальную длину колонки %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "Не удалось открыть SQL соединение с err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "Не удалось открыть SQL соединение %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "Похоже, версия схемы базы данных %v устарела."
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Для схемы базы данных установлена версия %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Попытка обновить схему базы данных до версии %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Возникла ошибка при удалении настроек"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Удаление всех неиспользуемых пред-релизных функций"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Возникла ошибка при поиске настроек"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Не удалось получить post"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Unable to save new role"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Не удалось получить версию базы данных"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Возникла ошибка при сохранении свойства системы"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "Notification From Address setting is missing or invalid."
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "Notification To Address setting is missing or invalid."
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/tr.json
120
i18n/tr.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "Bu kanal Özel Kanala dönüştürüldü."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "Doğrudan ileti kanalı eklemek için createDirectChannel API hizmeti kullanılmalıdır"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v kanaldan ayrıldı."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Kanal sohbeti özel ileti olarak gönderilemedi"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Herkese açık kanal, özel kanala dönüştürülürken kullanıcı alınamadı"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s herkese açık kanalı özel kanala dönüştürdü"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "Görüntülenecek ad güncelleme iletisi gönderilemedi"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "yardım"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "Geçerli kanal alınırken sorun çıktı."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "{{.Channel}} kanalı belirlenemedi. Lütfen kanalları belirtmek için [channel handle](https://about.mattermost.com/default-channel-handle-documentation) kullanın."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "Bir kişiyi doğrudan ileti kanalından çıkaramazsınız."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "Kanala katılınılırken bir sorun çıktı."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "Kullanıcı bulunamadı."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "Açık kanala katılın"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "bildirimleri kapat"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "{{.Channel}} kanalı belirlenemedi. Lütfen kanalları belirtmek için [channel handle](https://about.mattermost.com/default-channel-handle-documentation) kullanın."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "Bildirimleri açana kadar {{.Channel}} kanalından bildirim almayacaksınız."
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "Varsayılan kanallara katılırken bir sorun çıktı. Kullanıcı Kodu: %v, Takım Kodu: %v, Hata: %v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "Missing Hash or URL query data."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "Missing Invite Id."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "Sunucu hesap açılmasına izin vermiyor. Lütfen bir çağrı almak için yönetici ile görüşün."
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "%v kodlu kullanıcı profili alınırken sorun çıktı, oturum kapatılıyor"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "Kullanıcı API rotaları hazırlanıyor"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "{{.Name}} parametresi geçersiz"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "Bir kanal eklemek için takım kodu belirtilmelidir"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "Sütun eksik sürücü nedeniyle oluşturulamadı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "%v dizini oluşturulamadı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "Dizin eksik sürücü nedeniyle oluşturulamadı"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "%v sütununun en fazla uzunluğu alınamadı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "SQL bağlantısı açılamadı. Hata: %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "SQL bağlantısı açılamadı %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "%v veritabanı şeması sürümü eskimiş gibi görünüyor"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "Veritabanı şeması %v sürümüne ayarlandı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "Veritabanı şeması %v sürümüne yükseltilmeye çalışılıyor"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "Ayarlar silinirken bir sorun çıktı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "Kullanılmayan ön yayın özellikleri siliniyor"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "Ayarlar bulunurken bir sorun çıktı"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "Roller alınamadı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "Yeni rol kaydedilemedi"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "Veritabanı sürümü alınamadı"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "Sistem özelliği kaydedilirken bir sorun çıktı"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "E-posta adresinden eklenemedi"
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "E-posta adresi eklenemedi"
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
146
i18n/zh-CN.json
146
i18n/zh-CN.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "此频道已转换到私有频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "必须使用 createDirectChannel API 创建私信频道"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v 已退出该频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "Failed to post channel conversion to private message"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "Failed to retrieve user while converting the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s converted the channel from public to private"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "发送显示名更新信息时失败"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "帮助"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "获取当前频道错误。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "无法找到频道 {{.Channel}}。请使用[频道识别](https://about.mattermost.com/default-channel-handle-documentation) 以分辨频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "邀请用户到频道"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "您不能添加成员到私信频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "加入频道时发生错误。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[用户名] ~[频道]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "缺少用户名和频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "无法找到该用户。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "邀请"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "您没有足够的权限在 {{.Channel}} 添加 {{.User}}。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "已添加 {{.User}} 到 {{.Channel}} 频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} 已在频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "添加到公开频道"
|
||||
@@ -796,7 +840,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.hint",
|
||||
"translation": "[频道]"
|
||||
"translation": "~[频道]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.list.app_error",
|
||||
@@ -900,20 +944,28 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.desc",
|
||||
"translation": "Turns off desktop, email and push notifications for the current channel or the [channel] specified."
|
||||
"translation": "关闭当前频道或指定[频道]的桌面、邮件以及推送通知。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.error",
|
||||
"translation": "Could not find the channel {{.Channel}}. Please use the [channel handle](https://about.mattermost.com/default-channel-handle-documentation) to identify channels."
|
||||
"translation": "无法找到频道 {{.Channel}}。请使用[频道识别](https://about.mattermost.com/default-channel-handle-documentation) 以分辨频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.hint",
|
||||
"translation": "[频道]"
|
||||
"translation": "~[频道]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "静音"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "无法找到指定的频道。请使用[频道识别](https://about.mattermost.com/default-channel-handle-documentation) 以分辨频道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "无法静音频道 {{.Channel}} 因为您不是成员。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "您将不会收到 {{.Channel}} 的通知直到取消频道静音。"
|
||||
@@ -1698,11 +1750,11 @@
|
||||
},
|
||||
{
|
||||
"id": "api.post.check_for_out_of_channel_mentions.message.multiple",
|
||||
"translation": "{{.Usernames}}和{{.LastUsername}}被提到了,但是他们不会收到通知,因为他们不在这个频道。"
|
||||
"translation": "@{{.Usernames}} 与 @{{.LastUsername}} 被提到了,但是他们因不在这个频道而不会收到通知。"
|
||||
},
|
||||
{
|
||||
"id": "api.post.check_for_out_of_channel_mentions.message.one",
|
||||
"translation": "{{.Username}}被提到了,但是他因不在此频道而不会收到通知。"
|
||||
"translation": "@{{.Username}} 被提到了,但是他因不在此频道而不会收到通知。"
|
||||
},
|
||||
{
|
||||
"id": "api.post.create_post.attach_files.error",
|
||||
@@ -2216,7 +2268,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.slackimport.slack_sanitise_channel_properties.name_too_long.warn",
|
||||
"translation": "Slack 导入:频道 {{.ChannelName}} 的 Handle 过长。导入时会被截断。"
|
||||
"translation": "Slack 导入:频道 {{.ChannelName}} 的识别过长。导入时会被截断。"
|
||||
},
|
||||
{
|
||||
"id": "api.slackimport.slack_sanitise_channel_properties.purpose_too_long.warn",
|
||||
@@ -2392,7 +2444,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.array.app_error",
|
||||
"translation": "请求中图片为空"
|
||||
"translation": "请求中 'image' 为空"
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.decode.app_error",
|
||||
@@ -2400,7 +2452,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.decode_config.app_error",
|
||||
"translation": "Could not decode team icon metadata"
|
||||
"translation": "无法解码团队图标元数据"
|
||||
},
|
||||
{
|
||||
"id": "api.team.set_team_icon.encode.app_error",
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "加入默认通道遇到一个问题 user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "无效的哈系或 URL 查询数据。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "无效的邀请 id。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "缺少令牌。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "这个服务员不允许注册。请与管理员联系,获取邀请。"
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "获取用户配置文件中的错误 id=%v 强制注销"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "无法获取个人资料图片,用户不存在。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "正在初始化用户 API 路由"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "无效的参数 {{.Name}}"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "连接失败:{{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "必须指定团队ID才能创建频道"
|
||||
@@ -3748,7 +3808,7 @@
|
||||
},
|
||||
{
|
||||
"id": "app.plugin.cluster.save_config.app_error",
|
||||
"translation": "The plugin configuration in your config.json file must be updated manually when using ReadOnlyConfig with clustering enabled."
|
||||
"translation": "当机群开启并使用 ReadOnlyConfig 时,config.json 文件中的插件设置必须手动上传。"
|
||||
},
|
||||
{
|
||||
"id": "app.plugin.config.app_error",
|
||||
@@ -3820,7 +3880,7 @@
|
||||
},
|
||||
{
|
||||
"id": "app.timezones.failed_deserialize.app_error",
|
||||
"translation": "读取时区配置文件失败 file={{.Filename}}, err={{.Error}}"
|
||||
"translation": "反序列化区配置文件失败 file={{.Filename}}, err={{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.timezones.load_config.app_error",
|
||||
@@ -5044,7 +5104,7 @@
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.message_export.global_relay.config_missing.app_error",
|
||||
"translation": "Message export job ExportFormat is set to 'globalrelay', but GlobalRelaySettings are missing"
|
||||
"translation": "消息导出任务 ExportFormat 为 'globalrelay',但缺少 GlobalRelaySettings"
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.message_export.global_relay.customer_type.app_error",
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "未能创建列,因为缺少驱动程序"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "创建索引失败 %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "未能创建索引,因为缺少驱动程序"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "未能获取列的最大长度%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "打开数据库连接失败 err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "打开数据库连接失败 %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "数据库结构版本 %v 似乎过旧"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "数据库结构版本设为 %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "试图将数据库结构版本升级到 %v"
|
||||
@@ -6496,7 +6544,7 @@
|
||||
},
|
||||
{
|
||||
"id": "store.sql_post.query_max_post_size.max_post_size_bytes",
|
||||
"translation": "Post.Message supports at most %d characters (%d bytes)"
|
||||
"translation": "Post.Message 最多支持 %d 字符 (%d 字节)"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_post.query_max_post_size.unrecognized_driver",
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "我们删除偏好设置时出现错误"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "删除任何未使用的预发行功能"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "我们在查找偏好设置时遇到了一个错误"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "无法获取角色"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "我们无法永久删除所有角色"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "无法保存新角色"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "我们无法获得数据库版本"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "我们无法永久删除系统表数据"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "我们保存系统属性时遇到了一个错误"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "缺少或无效的从寄件人地址通知设定。"
|
||||
"translation": "设定 \"From Address\" 错误"
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "缺少或无效的通知到收件人地址设定。"
|
||||
"translation": "设定 \"To Address\" 错误"
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
120
i18n/zh-TW.json
120
i18n/zh-TW.json
@@ -215,6 +215,14 @@
|
||||
"id": "api.channel.change_channel_privacy.public_to_private",
|
||||
"translation": "此頻道已轉為私人頻道。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||
"translation": "This default channel cannot be converted into a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.convert_channel_to_private.private_channel_error",
|
||||
"translation": "The channel requested to convert is already a private channel."
|
||||
},
|
||||
{
|
||||
"id": "api.channel.create_channel.direct_channel.app_error",
|
||||
"translation": "必須使用 createDirectChannel API 服務來建立直接訊息頻道"
|
||||
@@ -331,18 +339,6 @@
|
||||
"id": "api.channel.leave.left",
|
||||
"translation": "%v 退出頻道。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.create_post.error",
|
||||
"translation": "將頻道對話發送至私人傳訊時失敗。"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.retrieve_user.error",
|
||||
"translation": "將頻道從公開轉換成私人時無法擷取使用者"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_convert_channel_to_private.updated_from",
|
||||
"translation": "%s 已將頻道從公開轉換成私人"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.post_update_channel_displayname_message_and_forget.create_post.error",
|
||||
"translation": "發送顯示名稱更新訊息時失敗"
|
||||
@@ -786,6 +782,54 @@
|
||||
"id": "api.command_help.name",
|
||||
"translation": "help"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.app_error",
|
||||
"translation": "取得當前頻道時錯誤。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.channel.error",
|
||||
"translation": "找不到頻道 {{.Channel}}. 請用[頻道識別](https://about.mattermost.com/default-channel-handle-documentation)以分辨頻道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.desc",
|
||||
"translation": "Invite a user to a channel"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.directchannel.app_error",
|
||||
"translation": "無法將成員從直接通訊頻道中移除。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.fail.app_error",
|
||||
"translation": "加入頻道時發生錯誤。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.hint",
|
||||
"translation": "@[username] ~[channel]"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_message.app_error",
|
||||
"translation": "Missing Username and Channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.missing_user.app_error",
|
||||
"translation": "找不到使用者"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.name",
|
||||
"translation": "invite"
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.permission.app_error",
|
||||
"translation": "You don't have enough permissions to add {{.User}} in {{.Channel}}."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.success",
|
||||
"translation": "{{.User}} added to {{.Channel}} channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_invite.user_already_in_channel.app_error",
|
||||
"translation": "{{.User}} is already in the channel."
|
||||
},
|
||||
{
|
||||
"id": "api.command_join.desc",
|
||||
"translation": "加入公開頻道"
|
||||
@@ -914,6 +958,14 @@
|
||||
"id": "api.command_mute.name",
|
||||
"translation": "靜音"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.no_channel.error",
|
||||
"translation": "找不到頻道 {{.Channel}}. 請用[頻道識別](https://about.mattermost.com/default-channel-handle-documentation)以分辨頻道。"
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.not_member.error",
|
||||
"translation": "Could not mute channel {{.Channel}} as you are not a member."
|
||||
},
|
||||
{
|
||||
"id": "api.command_mute.success_mute",
|
||||
"translation": "直到頻道靜音關閉為止,將不會收到來自{{.Channel}}的通知。"
|
||||
@@ -2794,14 +2846,14 @@
|
||||
"id": "api.user.create_user.joining.error",
|
||||
"translation": "加入預設頻道時遇到錯誤 user_id=%s, team_id=%s, err=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_hash_or_data.app_error",
|
||||
"translation": "缺少雜湊或 URL 查詢資料。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_invite_id.app_error",
|
||||
"translation": "缺少邀請 ID。"
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.missing_token.app_error",
|
||||
"translation": "Missing Token."
|
||||
},
|
||||
{
|
||||
"id": "api.user.create_user.no_open_server",
|
||||
"translation": "本機不開放自由註冊,請從管理員處取得邀請。"
|
||||
@@ -2850,6 +2902,10 @@
|
||||
"id": "api.user.get_me.getting.error",
|
||||
"translation": "取得使用者 id=%v 資訊時遇到錯誤,強制登出"
|
||||
},
|
||||
{
|
||||
"id": "api.user.get_profile_image.not_found.app_error",
|
||||
"translation": "Unable to get profile image, user not found."
|
||||
},
|
||||
{
|
||||
"id": "api.user.init.debug",
|
||||
"translation": "正在初始化使用者 API 路徑"
|
||||
@@ -3242,6 +3298,10 @@
|
||||
"id": "api.websocket_handler.invalid_param.app_error",
|
||||
"translation": "無效的參數 {{.Name}}"
|
||||
},
|
||||
{
|
||||
"id": "app.admin.test_email.failure",
|
||||
"translation": "Connection unsuccessful: {{.Error}}"
|
||||
},
|
||||
{
|
||||
"id": "app.channel.create_channel.no_team_id.app_error",
|
||||
"translation": "建立頻道時必須指定團隊 ID"
|
||||
@@ -5742,10 +5802,6 @@
|
||||
"id": "store.sql.create_column_missing_driver.critical",
|
||||
"translation": "因為找不到驅動,建立欄位失敗"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index.critical",
|
||||
"translation": "建立索引 %v 失敗"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.create_index_missing_driver.critical",
|
||||
"translation": "因為找不到驅動,建立索引失敗"
|
||||
@@ -5770,10 +5826,6 @@
|
||||
"id": "store.sql.maxlength_column.critical",
|
||||
"translation": "取得欄位 %v 最大長度失敗"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.critical",
|
||||
"translation": "開啟 SQL 連線失敗 err:%v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.open_conn.panic",
|
||||
"translation": "開啟 SQL 連線失敗 %v"
|
||||
@@ -5794,10 +5846,6 @@
|
||||
"id": "store.sql.schema_out_of_date.warn",
|
||||
"translation": "%v 的資料庫結構描述版本似乎過期了"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_set.info",
|
||||
"translation": "資料庫結構描述已被設定為版本 %v"
|
||||
},
|
||||
{
|
||||
"id": "store.sql.schema_upgrade_attempt.warn",
|
||||
"translation": "正在嘗試將資料庫結構描述版本升級至 %v"
|
||||
@@ -6530,10 +6578,6 @@
|
||||
"id": "store.sql_preference.delete.app_error",
|
||||
"translation": "刪除偏好設定時遇到錯誤"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.delete_unused_features.debug",
|
||||
"translation": "正在刪除所有沒有使用的預先發佈功能"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_preference.get.app_error",
|
||||
"translation": "尋找偏好設定時遇到錯誤"
|
||||
@@ -6642,6 +6686,10 @@
|
||||
"id": "store.sql_role.get_by_names.app_error",
|
||||
"translation": "無法取得角色"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.permanent_delete_all.app_error",
|
||||
"translation": "We could not permanently delete all the roles"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_role.save.insert.app_error",
|
||||
"translation": "無法儲存新角色"
|
||||
@@ -6758,6 +6806,10 @@
|
||||
"id": "store.sql_system.get_version.app_error",
|
||||
"translation": "無法取得資料庫版本"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.permanent_delete_by_name.app_error",
|
||||
"translation": "We could not permanently delete the system table entry"
|
||||
},
|
||||
{
|
||||
"id": "store.sql_system.save.app_error",
|
||||
"translation": "儲存系統參數時遇到錯誤"
|
||||
@@ -7328,7 +7380,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.from_address.app_error",
|
||||
"translation": "缺少通知信寄件人地址設定或是該設定無效。"
|
||||
"translation": "Error setting \"From Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.msg.app_error",
|
||||
@@ -7344,7 +7396,7 @@
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.send_mail.to_address.app_error",
|
||||
"translation": "缺少通知信收件人地址設定或是該設定無效。"
|
||||
"translation": "Error setting \"To Address\""
|
||||
},
|
||||
{
|
||||
"id": "utils.mail.test.configured.error",
|
||||
|
||||
@@ -5,11 +5,12 @@ package jobs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -125,10 +126,10 @@ func (srv *JobServer) CancellationWatcher(ctx context.Context, jobId string, can
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
l4g.Debug("CancellationWatcher for Job: %v Aborting as job has finished.", jobId)
|
||||
mlog.Debug(fmt.Sprintf("CancellationWatcher for Job: %v Aborting as job has finished.", jobId))
|
||||
return
|
||||
case <-time.After(CANCEL_WATCHER_POLLING_INTERVAL * time.Millisecond):
|
||||
l4g.Debug("CancellationWatcher for Job: %v polling.", jobId)
|
||||
mlog.Debug(fmt.Sprintf("CancellationWatcher for Job: %v polling.", jobId))
|
||||
if result := <-srv.Store.Job().Get(jobId); result.Err == nil {
|
||||
jobStatus := result.Data.(*model.Job)
|
||||
if jobStatus.Status == model.JOB_STATUS_CANCEL_REQUESTED {
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
package jobs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -35,7 +36,7 @@ func (srv *JobServer) MakeWatcher(workers *Workers, pollingInterval int) *Watche
|
||||
}
|
||||
|
||||
func (watcher *Watcher) Start() {
|
||||
l4g.Debug("Watcher Started")
|
||||
mlog.Debug("Watcher Started")
|
||||
|
||||
// Delay for some random number of milliseconds before starting to ensure that multiple
|
||||
// instances of the jobserver don't poll at a time too close to each other.
|
||||
@@ -43,14 +44,14 @@ func (watcher *Watcher) Start() {
|
||||
<-time.After(time.Duration(rand.Intn(watcher.pollingInterval)) * time.Millisecond)
|
||||
|
||||
defer func() {
|
||||
l4g.Debug("Watcher Finished")
|
||||
mlog.Debug("Watcher Finished")
|
||||
watcher.stopped <- true
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-watcher.stop:
|
||||
l4g.Debug("Watcher: Received stop signal")
|
||||
mlog.Debug("Watcher: Received stop signal")
|
||||
return
|
||||
case <-time.After(time.Duration(watcher.pollingInterval) * time.Millisecond):
|
||||
watcher.PollAndNotify()
|
||||
@@ -59,14 +60,14 @@ func (watcher *Watcher) Start() {
|
||||
}
|
||||
|
||||
func (watcher *Watcher) Stop() {
|
||||
l4g.Debug("Watcher Stopping")
|
||||
mlog.Debug("Watcher Stopping")
|
||||
watcher.stop <- true
|
||||
<-watcher.stopped
|
||||
}
|
||||
|
||||
func (watcher *Watcher) PollAndNotify() {
|
||||
if result := <-watcher.srv.Store.Job().GetAllByStatus(model.JOB_STATUS_PENDING); result.Err != nil {
|
||||
l4g.Error("Error occurred getting all pending statuses: %v", result.Err.Error())
|
||||
mlog.Error(fmt.Sprintf("Error occurred getting all pending statuses: %v", result.Err.Error()))
|
||||
} else {
|
||||
jobs := result.Data.([]*model.Job)
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
package jobs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ type Schedulers struct {
|
||||
}
|
||||
|
||||
func (srv *JobServer) InitSchedulers() *Schedulers {
|
||||
l4g.Debug("Initialising schedulers.")
|
||||
mlog.Debug("Initialising schedulers.")
|
||||
|
||||
schedulers := &Schedulers{
|
||||
stop: make(chan bool),
|
||||
@@ -59,10 +59,10 @@ func (schedulers *Schedulers) Start() *Schedulers {
|
||||
|
||||
go func() {
|
||||
schedulers.startOnce.Do(func() {
|
||||
l4g.Info("Starting schedulers.")
|
||||
mlog.Info("Starting schedulers.")
|
||||
|
||||
defer func() {
|
||||
l4g.Info("Schedulers stopped.")
|
||||
mlog.Info("Schedulers stopped.")
|
||||
close(schedulers.stopped)
|
||||
}()
|
||||
|
||||
@@ -78,7 +78,7 @@ func (schedulers *Schedulers) Start() *Schedulers {
|
||||
for {
|
||||
select {
|
||||
case <-schedulers.stop:
|
||||
l4g.Debug("Schedulers received stop signal.")
|
||||
mlog.Debug("Schedulers received stop signal.")
|
||||
return
|
||||
case now = <-time.After(1 * time.Minute):
|
||||
cfg := schedulers.jobs.Config()
|
||||
@@ -93,8 +93,8 @@ func (schedulers *Schedulers) Start() *Schedulers {
|
||||
if scheduler != nil {
|
||||
if scheduler.Enabled(cfg) {
|
||||
if _, err := schedulers.scheduleJob(cfg, scheduler); err != nil {
|
||||
l4g.Warn("Failed to schedule job with scheduler: %v", scheduler.Name())
|
||||
l4g.Error(err)
|
||||
mlog.Warn(fmt.Sprintf("Failed to schedule job with scheduler: %v", scheduler.Name()))
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
} else {
|
||||
schedulers.setNextRunTime(cfg, idx, now, true)
|
||||
}
|
||||
@@ -119,7 +119,7 @@ func (schedulers *Schedulers) Start() *Schedulers {
|
||||
}
|
||||
|
||||
func (schedulers *Schedulers) Stop() *Schedulers {
|
||||
l4g.Info("Stopping schedulers.")
|
||||
mlog.Info("Stopping schedulers.")
|
||||
close(schedulers.stop)
|
||||
<-schedulers.stopped
|
||||
return schedulers
|
||||
@@ -130,7 +130,7 @@ func (schedulers *Schedulers) setNextRunTime(cfg *model.Config, idx int, now tim
|
||||
|
||||
if !pendingJobs {
|
||||
if pj, err := schedulers.jobs.CheckForPendingJobsByType(scheduler.JobType()); err != nil {
|
||||
l4g.Error("Failed to set next job run time: " + err.Error())
|
||||
mlog.Error("Failed to set next job run time: " + err.Error())
|
||||
schedulers.nextRunTimes[idx] = nil
|
||||
return
|
||||
} else {
|
||||
@@ -140,13 +140,13 @@ func (schedulers *Schedulers) setNextRunTime(cfg *model.Config, idx int, now tim
|
||||
|
||||
lastSuccessfulJob, err := schedulers.jobs.GetLastSuccessfulJobByType(scheduler.JobType())
|
||||
if err != nil {
|
||||
l4g.Error("Failed to set next job run time: " + err.Error())
|
||||
mlog.Error("Failed to set next job run time: " + err.Error())
|
||||
schedulers.nextRunTimes[idx] = nil
|
||||
return
|
||||
}
|
||||
|
||||
schedulers.nextRunTimes[idx] = scheduler.NextScheduleTime(cfg, now, pendingJobs, lastSuccessfulJob)
|
||||
l4g.Debug("Next run time for scheduler %v: %v", scheduler.Name(), schedulers.nextRunTimes[idx])
|
||||
mlog.Debug(fmt.Sprintf("Next run time for scheduler %v: %v", scheduler.Name(), schedulers.nextRunTimes[idx]))
|
||||
}
|
||||
|
||||
func (schedulers *Schedulers) scheduleJob(cfg *model.Config, scheduler model.Scheduler) (*model.Job, *model.AppError) {
|
||||
@@ -164,6 +164,6 @@ func (schedulers *Schedulers) scheduleJob(cfg *model.Config, scheduler model.Sch
|
||||
}
|
||||
|
||||
func (schedulers *Schedulers) handleConfigChange(oldConfig *model.Config, newConfig *model.Config) {
|
||||
l4g.Debug("Schedulers received config change.")
|
||||
mlog.Debug("Schedulers received config change.")
|
||||
schedulers.configChanged <- newConfig
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ package jobs
|
||||
import (
|
||||
"sync"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ func (srv *JobServer) InitWorkers() *Workers {
|
||||
}
|
||||
|
||||
func (workers *Workers) Start() *Workers {
|
||||
l4g.Info("Starting workers")
|
||||
mlog.Info("Starting workers")
|
||||
|
||||
workers.startOnce.Do(func() {
|
||||
if workers.DataRetention != nil && (*workers.ConfigService.Config().DataRetentionSettings.EnableMessageDeletion || *workers.ConfigService.Config().DataRetentionSettings.EnableFileDeletion) {
|
||||
@@ -152,7 +152,7 @@ func (workers *Workers) Stop() *Workers {
|
||||
workers.LdapSync.Stop()
|
||||
}
|
||||
|
||||
l4g.Info("Stopped workers")
|
||||
mlog.Info("Stopped workers")
|
||||
|
||||
return workers
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
package manualtesting
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"hash/fnv"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
@@ -11,9 +12,9 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/api"
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
@@ -34,7 +35,7 @@ func Init(api3 *api.API) {
|
||||
|
||||
func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
// Let the world know
|
||||
l4g.Info(utils.T("manaultesting.manual_test.setup.info"))
|
||||
mlog.Info("Setting up for manual test...")
|
||||
|
||||
// URL Parameters
|
||||
params, err := url.ParseQuery(r.URL.RawQuery)
|
||||
@@ -51,7 +52,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
hash := hasher.Sum32()
|
||||
rand.Seed(int64(hash))
|
||||
} else {
|
||||
l4g.Debug(utils.T("manaultesting.manual_test.uid.debug"))
|
||||
mlog.Debug("No uid in URL")
|
||||
}
|
||||
|
||||
// Create a client for tests to use
|
||||
@@ -63,7 +64,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
var teamID string
|
||||
var userID string
|
||||
if ok1 && ok2 {
|
||||
l4g.Info(utils.T("manaultesting.manual_test.create.info"))
|
||||
mlog.Info("Creating user and team")
|
||||
// Create team for testing
|
||||
team := &model.Team{
|
||||
DisplayName: teamDisplayName[0],
|
||||
@@ -155,7 +156,7 @@ func getChannelID(a *app.App, channelname string, teamid string, userid string)
|
||||
// Grab all the channels
|
||||
result := <-a.Srv.Store.Channel().GetChannels(teamid, userid)
|
||||
if result.Err != nil {
|
||||
l4g.Debug(utils.T("manaultesting.get_channel_id.unable.debug"))
|
||||
mlog.Debug("Unable to get channels")
|
||||
return "", false
|
||||
}
|
||||
|
||||
@@ -166,6 +167,6 @@ func getChannelID(a *app.App, channelname string, teamid string, userid string)
|
||||
return channel.Id, true
|
||||
}
|
||||
}
|
||||
l4g.Debug(utils.T("manaultesting.get_channel_id.no_found.debug"), channelname, strconv.Itoa(len(data)))
|
||||
mlog.Debug(fmt.Sprintf("Could not find channel: %v, %v possibilities searched", channelname, strconv.Itoa(len(data))))
|
||||
return "", false
|
||||
}
|
||||
|
||||
@@ -6,9 +6,8 @@ package manualtesting
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
const LINK_POST_TEXT = `
|
||||
@@ -23,7 +22,7 @@ https://medium.com/@slackhq/11-useful-tips-for-getting-the-most-of-slack-5dfb3d1
|
||||
`
|
||||
|
||||
func testAutoLink(env TestEnvironment) *model.AppError {
|
||||
l4g.Info(utils.T("manaultesting.test_autolink.info"))
|
||||
mlog.Info("Manual Auto Link Test")
|
||||
channelID, err := getChannelID(env.Context.App, model.DEFAULT_CHANNEL, env.CreatedTeamId, env.CreatedUserId)
|
||||
if !err {
|
||||
return model.NewAppError("/manualtest", "manaultesting.test_autolink.unable.app_error", nil, "", http.StatusInternalServerError)
|
||||
|
||||
42
mlog/global.go
Обычный файл
42
mlog/global.go
Обычный файл
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package mlog
|
||||
|
||||
import (
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
var globalLogger *Logger
|
||||
|
||||
func InitGlobalLogger(logger *Logger) {
|
||||
globalLogger = logger
|
||||
Debug = globalLogger.Debug
|
||||
Info = globalLogger.Info
|
||||
Warn = globalLogger.Warn
|
||||
Error = globalLogger.Error
|
||||
Critical = globalLogger.Critical
|
||||
}
|
||||
|
||||
func RedirectStdLog(logger *Logger) {
|
||||
zap.RedirectStdLogAt(logger.zap.With(zap.String("source", "stdlog")), zapcore.ErrorLevel)
|
||||
}
|
||||
|
||||
type LogFunc func(string, ...Field)
|
||||
|
||||
// DON'T USE THIS Modify the level on the app logger
|
||||
func GloballyDisableDebugLogForTest() {
|
||||
globalLogger.consoleLevel.SetLevel(zapcore.ErrorLevel)
|
||||
}
|
||||
|
||||
// DON'T USE THIS Modify the level on the app logger
|
||||
func GloballyEnableDebugLogForTest() {
|
||||
globalLogger.consoleLevel.SetLevel(zapcore.DebugLevel)
|
||||
}
|
||||
|
||||
var Debug LogFunc
|
||||
var Info LogFunc
|
||||
var Warn LogFunc
|
||||
var Error LogFunc
|
||||
var Critical LogFunc
|
||||
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Ссылка в новой задаче
Block a user