mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Extracting i18n functionality to i18n core library (#16914)
* extracting i18n functionality to i18n core library * Removing utils.T * Adding documentation and changing one function name for better explanation * Changing other missing utils.T * Adding license string * Renaming corelibs to pkg * Renaming corelibs to pkg (moving directory) * Renaming from pkg to shared * Fixing bodyPage.Html casing * Fixing merges * Fixing merge problem * Fixing tests
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v5/app"
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
"github.com/mattermost/mattermost-server/v5/services/mailservice"
|
||||
"github.com/mattermost/mattermost-server/v5/utils"
|
||||
"github.com/mattermost/mattermost-server/v5/shared/i18n"
|
||||
"github.com/mattermost/mattermost-server/v5/utils/testutils"
|
||||
)
|
||||
|
||||
@@ -2794,7 +2794,7 @@ func TestInviteUsersToTeam(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
require.True(t, okMsg, "should return true")
|
||||
nameFormat := *th.App.Config().TeamSettings.TeammateNameDisplay
|
||||
expectedSubject := utils.T("api.templates.invite_subject",
|
||||
expectedSubject := i18n.T("api.templates.invite_subject",
|
||||
map[string]interface{}{"SenderName": th.SystemAdminUser.GetDisplayName(nameFormat),
|
||||
"TeamDisplayName": th.BasicTeam.DisplayName,
|
||||
"SiteName": th.App.ClientConfig()["SiteName"]})
|
||||
@@ -2805,7 +2805,7 @@ func TestInviteUsersToTeam(t *testing.T) {
|
||||
okMsg, resp = th.LocalClient.InviteUsersToTeam(th.BasicTeam.Id, emailList)
|
||||
CheckNoError(t, resp)
|
||||
require.True(t, okMsg, "should return true")
|
||||
expectedSubject = utils.T("api.templates.invite_subject",
|
||||
expectedSubject = i18n.T("api.templates.invite_subject",
|
||||
map[string]interface{}{"SenderName": "Administrator",
|
||||
"TeamDisplayName": th.BasicTeam.DisplayName,
|
||||
"SiteName": th.App.ClientConfig()["SiteName"]})
|
||||
@@ -2925,7 +2925,7 @@ func TestInviteGuestsToTeam(t *testing.T) {
|
||||
require.True(t, okMsg, "should return true")
|
||||
|
||||
nameFormat := *th.App.Config().TeamSettings.TeammateNameDisplay
|
||||
expectedSubject := utils.T("api.templates.invite_guest_subject",
|
||||
expectedSubject := i18n.T("api.templates.invite_guest_subject",
|
||||
map[string]interface{}{"SenderName": th.SystemAdminUser.GetDisplayName(nameFormat),
|
||||
"TeamDisplayName": th.BasicTeam.DisplayName,
|
||||
"SiteName": th.App.ClientConfig()["SiteName"]})
|
||||
|
||||
Reference in New Issue
Block a user