mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-11008: Fix translation and change the code to be auto-extracted (#9009)
This commit is contained in:
committed by
Elias Nahum
parent
41d2a9f435
commit
164e030d33
@@ -397,13 +397,13 @@ func (a *App) UpdateChannelPrivacy(oldChannel *model.Channel, user *model.User)
|
||||
}
|
||||
|
||||
func (a *App) postChannelPrivacyMessage(user *model.User, channel *model.Channel) *model.AppError {
|
||||
privacy := (map[string]string{
|
||||
model.CHANNEL_OPEN: "private_to_public",
|
||||
model.CHANNEL_PRIVATE: "public_to_private",
|
||||
message := (map[string]string{
|
||||
model.CHANNEL_OPEN: utils.T("api.channel.change_channel_privacy.private_to_public"),
|
||||
model.CHANNEL_PRIVATE: utils.T("api.channel.change_channel_privacy.public_to_private"),
|
||||
})[channel.Type]
|
||||
post := &model.Post{
|
||||
ChannelId: channel.Id,
|
||||
Message: utils.T("api.channel.change_channel_privacy." + privacy),
|
||||
Message: message,
|
||||
Type: model.POST_CHANGE_CHANNEL_PRIVACY,
|
||||
UserId: user.Id,
|
||||
Props: model.StringInterface{
|
||||
|
||||
@@ -99,6 +99,14 @@
|
||||
"id": "api.channel.add_user_to_channel.type.app_error",
|
||||
"translation": "Can not add user to this channel type"
|
||||
},
|
||||
{
|
||||
"id": "api.channel.change_channel_privacy.private_to_public",
|
||||
"translation": "This channel has been converted to a Public Channel and can be joined by any team member."
|
||||
},
|
||||
{
|
||||
"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."
|
||||
|
||||
Reference in New Issue
Block a user