MM-11008: Fix translation and change the code to be auto-extracted (#9009)
Этот коммит содержится в:
коммит произвёл
Elias Nahum
родитель
41d2a9f435
Коммит
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 {
|
func (a *App) postChannelPrivacyMessage(user *model.User, channel *model.Channel) *model.AppError {
|
||||||
privacy := (map[string]string{
|
message := (map[string]string{
|
||||||
model.CHANNEL_OPEN: "private_to_public",
|
model.CHANNEL_OPEN: utils.T("api.channel.change_channel_privacy.private_to_public"),
|
||||||
model.CHANNEL_PRIVATE: "public_to_private",
|
model.CHANNEL_PRIVATE: utils.T("api.channel.change_channel_privacy.public_to_private"),
|
||||||
})[channel.Type]
|
})[channel.Type]
|
||||||
post := &model.Post{
|
post := &model.Post{
|
||||||
ChannelId: channel.Id,
|
ChannelId: channel.Id,
|
||||||
Message: utils.T("api.channel.change_channel_privacy." + privacy),
|
Message: message,
|
||||||
Type: model.POST_CHANGE_CHANNEL_PRIVACY,
|
Type: model.POST_CHANGE_CHANNEL_PRIVACY,
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
Props: model.StringInterface{
|
Props: model.StringInterface{
|
||||||
|
|||||||
@@ -99,6 +99,14 @@
|
|||||||
"id": "api.channel.add_user_to_channel.type.app_error",
|
"id": "api.channel.add_user_to_channel.type.app_error",
|
||||||
"translation": "Can not add user to this channel type"
|
"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",
|
"id": "api.channel.convert_channel_to_private.default_channel_error",
|
||||||
"translation": "This default channel cannot be converted into a private channel."
|
"translation": "This default channel cannot be converted into a private channel."
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user