summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-06-26 22:06:01 +0200
committerElias Nahum <nahumhbl@gmail.com>2018-06-26 16:06:01 -0400
commit164e030d33b03cab347ddcdf064615cb9e144317 (patch)
treeddb702f836ed7645093de078a9b65a1327a0646c
parent41d2a9f4352b9ee32bfa77da9ffed03b302d1314 (diff)
downloadchat-164e030d33b03cab347ddcdf064615cb9e144317.tar.gz
chat-164e030d33b03cab347ddcdf064615cb9e144317.tar.bz2
chat-164e030d33b03cab347ddcdf064615cb9e144317.zip
MM-11008: Fix translation and change the code to be auto-extracted (#9009)
-rw-r--r--app/channel.go8
-rw-r--r--i18n/en.json8
2 files changed, 12 insertions, 4 deletions
diff --git a/app/channel.go b/app/channel.go
index 7637e9d21..7394d813b 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -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{
diff --git a/i18n/en.json b/i18n/en.json
index 190aa4cea..ede4f1db2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -100,6 +100,14 @@
"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."
},