From 36c74d7b47253249ec83aedacf409a93de1d182f Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Mon, 3 Apr 2017 08:42:05 -0400 Subject: PLT-5873 Renamed private groups to private channels (#5924) * PLT-5873 Renamed private groups to private channels in web app * PLT-5873 Renamed private groups to private channels in server --- webapp/components/new_channel_flow.jsx | 63 ++++++++++++---------------------- 1 file changed, 21 insertions(+), 42 deletions(-) (limited to 'webapp/components/new_channel_flow.jsx') diff --git a/webapp/components/new_channel_flow.jsx b/webapp/components/new_channel_flow.jsx index eb67c9cba..55e47b149 100644 --- a/webapp/components/new_channel_flow.jsx +++ b/webapp/components/new_channel_flow.jsx @@ -9,43 +9,17 @@ import {cleanUpUrlable} from 'utils/url.jsx'; import NewChannelModal from './new_channel_modal.jsx'; import ChangeURLModal from './change_url_modal.jsx'; -import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl'; +import {FormattedMessage} from 'react-intl'; import {createChannel} from 'actions/channel_actions.jsx'; import {browserHistory} from 'react-router/es6'; const SHOW_NEW_CHANNEL = 1; const SHOW_EDIT_URL = 2; const SHOW_EDIT_URL_THEN_COMPLETE = 3; -const messages = defineMessages({ - channel: { - id: 'channel_flow.channel', - defaultMessage: 'Channel' - }, - group: { - id: 'channel_flow.group', - defaultMessage: 'Group' - }, - change: { - id: 'channel_flow.changeUrlTitle', - defaultMessage: 'Change {term} URL' - }, - set: { - id: 'channel_flow.set_url_title', - defaultMessage: 'Set {term} URL' - }, - create: { - id: 'channel_flow.create', - defaultMessage: 'Create {term}' - }, - changeUrlDescription: { - id: 'channel_flow.changeUrlDescription', - defaultMessage: 'Some characters are not allowed in URLs and may be removed.' - } -}); import React from 'react'; -class NewChannelFlow extends React.Component { +export default class NewChannelFlow extends React.Component { constructor(props) { super(props); @@ -182,9 +156,6 @@ class NewChannelFlow extends React.Component { let changeURLTitle = ''; let changeURLSubmitButtonText = ''; - let channelTerm = ''; - - const {formatMessage} = this.props.intl; // Only listen to flow state if we are being shown if (this.props.show) { @@ -192,21 +163,34 @@ class NewChannelFlow extends React.Component { case SHOW_NEW_CHANNEL: if (this.state.channelType === 'O') { showChannelModal = true; - channelTerm = formatMessage(messages.channel); } else { showGroupModal = true; - channelTerm = formatMessage(messages.group); } break; case SHOW_EDIT_URL: showChangeURLModal = true; - changeURLTitle = formatMessage(messages.change, {term: channelTerm}); - changeURLSubmitButtonText = formatMessage(messages.change, {term: channelTerm}); + changeURLTitle = ( + + ); + changeURLSubmitButtonText = changeURLTitle; break; case SHOW_EDIT_URL_THEN_COMPLETE: showChangeURLModal = true; - changeURLTitle = formatMessage(messages.set, {term: channelTerm}); - changeURLSubmitButtonText = formatMessage(messages.create, {term: channelTerm}); + changeURLTitle = ( + + ); + changeURLSubmitButtonText = ( + + ); break; } } @@ -239,8 +223,6 @@ class NewChannelFlow extends React.Component {