Merge pull request #1501 from matrix-org/luke/groups-are-communities

Groups -> Communities
This commit is contained in:
Luke Barnard 2017-10-19 12:16:15 +01:00 committed by GitHub
commit fd65cb1396
6 changed files with 53 additions and 50 deletions

View file

@ -28,7 +28,7 @@ import SdkConfig from './SdkConfig';
const FEATURES = [ const FEATURES = [
{ {
id: 'feature_groups', id: 'feature_groups',
name: _td("Groups"), name: _td("Communities"),
}, },
{ {
id: 'feature_pinning', id: 'feature_pinning',

View file

@ -70,7 +70,7 @@ const CategoryRoomList = React.createClass({
ev.preventDefault(); ev.preventDefault();
const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog");
Modal.createTrackedDialog('Add Rooms to Group Summary', '', AddressPickerDialog, { Modal.createTrackedDialog('Add Rooms to Group Summary', '', AddressPickerDialog, {
title: _t('Add rooms to the group summary'), title: _t('Add rooms to the community summary'),
description: _t("Which rooms would you like to add to this summary?"), description: _t("Which rooms would you like to add to this summary?"),
placeholder: _t("Room name or alias"), placeholder: _t("Room name or alias"),
button: _t("Add to summary"), button: _t("Add to summary"),
@ -246,7 +246,7 @@ const RoleUserList = React.createClass({
ev.preventDefault(); ev.preventDefault();
const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog");
Modal.createTrackedDialog('Add Users to Group Summary', '', AddressPickerDialog, { Modal.createTrackedDialog('Add Users to Group Summary', '', AddressPickerDialog, {
title: _t('Add users to the group summary'), title: _t('Add users to the community summary'),
description: _t("Who would you like to add to this summary?"), description: _t("Who would you like to add to this summary?"),
placeholder: _t("Name or matrix ID"), placeholder: _t("Name or matrix ID"),
button: _t("Add to summary"), button: _t("Add to summary"),
@ -267,7 +267,7 @@ const RoleUserList = React.createClass({
} }
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog( Modal.createTrackedDialog(
'Failed to add the following users to the group summary', 'Failed to add the following users to the community summary',
'', ErrorDialog, '', ErrorDialog,
{ {
title: _t( title: _t(
@ -339,7 +339,7 @@ const FeaturedUser = React.createClass({
const displayName = this.props.summaryInfo.displayname || this.props.summaryInfo.user_id; const displayName = this.props.summaryInfo.displayname || this.props.summaryInfo.user_id;
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog( Modal.createTrackedDialog(
'Failed to remove user from group summary', 'Failed to remove user from community summary',
'', ErrorDialog, '', ErrorDialog,
{ {
title: _t( title: _t(
@ -547,10 +547,10 @@ export default React.createClass({
saving: false, saving: false,
}); });
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Failed to save group profile", e); console.error("Failed to save community profile", e);
Modal.createTrackedDialog('Failed to update group', '', ErrorDialog, { Modal.createTrackedDialog('Failed to update group', '', ErrorDialog, {
title: _t('Error'), title: _t('Error'),
description: _t('Failed to update group'), description: _t('Failed to update community'),
}); });
}).done(); }).done();
}, },
@ -586,7 +586,7 @@ export default React.createClass({
_onLeaveClick: function() { _onLeaveClick: function() {
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createTrackedDialog('Leave Group', '', QuestionDialog, { Modal.createTrackedDialog('Leave Group', '', QuestionDialog, {
title: _t("Leave Group"), title: _t("Leave Community"),
description: _t("Leave %(groupName)s?", {groupName: this.props.groupId}), description: _t("Leave %(groupName)s?", {groupName: this.props.groupId}),
button: _t("Leave"), button: _t("Leave"),
danger: true, danger: true,
@ -634,12 +634,12 @@ export default React.createClass({
<TintableSvg src="img/icons-room-add.svg" width="24" height="24" /> <TintableSvg src="img/icons-room-add.svg" width="24" height="24" />
</div> </div>
<div className="mx_GroupView_rooms_header_addButton_label"> <div className="mx_GroupView_rooms_header_addButton_label">
{ _t('Add rooms to this group') } { _t('Add rooms to this community') }
</div> </div>
</AccessibleButton>) : <div />; </AccessibleButton>) : <div />;
return <div className="mx_GroupView_rooms"> return <div className="mx_GroupView_rooms">
<div className="mx_GroupView_rooms_header"> <div className="mx_GroupView_rooms_header">
<h3>Rooms</h3> <h3>{ _t('Rooms') }</h3>
{ addButton } { addButton }
</div> </div>
<RoomDetailList rooms={this._groupStore.getGroupRooms()} /> <RoomDetailList rooms={this._groupStore.getGroupRooms()} />
@ -884,7 +884,7 @@ export default React.createClass({
nameNode = <EditableText ref="nameEditor" nameNode = <EditableText ref="nameEditor"
className="mx_GroupView_editable" className="mx_GroupView_editable"
placeholderClassName="mx_GroupView_placeholder" placeholderClassName="mx_GroupView_placeholder"
placeholder={_t("Group Name")} placeholder={_t('Community Name')}
blurToCancel={false} blurToCancel={false}
initialValue={this.state.profileForm.name} initialValue={this.state.profileForm.name}
onValueChanged={this._onNameChange} onValueChanged={this._onNameChange}
@ -900,7 +900,6 @@ export default React.createClass({
onValueChanged={this._onShortDescChange} onValueChanged={this._onShortDescChange}
tabIndex="2" tabIndex="2"
dir="auto" />; dir="auto" />;
rightButtons.push( rightButtons.push(
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton" <AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
onClick={this._onSaveClick} key="_saveButton" onClick={this._onSaveClick} key="_saveButton"
@ -983,17 +982,17 @@ export default React.createClass({
if (this.state.error.httpStatus === 404) { if (this.state.error.httpStatus === 404) {
return ( return (
<div className="mx_GroupView_error"> <div className="mx_GroupView_error">
Group { this.props.groupId } not found { _t('Community %(groupId)s not found', {groupId: this.props.groupId}) }
</div> </div>
); );
} else { } else {
let extraText; let extraText;
if (this.state.error.errcode === 'M_UNRECOGNIZED') { if (this.state.error.errcode === 'M_UNRECOGNIZED') {
extraText = <div>{ _t('This Home server does not support groups') }</div>; extraText = <div>{ _t('This Home server does not support communities') }</div>;
} }
return ( return (
<div className="mx_GroupView_error"> <div className="mx_GroupView_error">
Failed to load { this.props.groupId } { _t('Failed to load %(groupId)', {groupId: this.props.groupId }) }
{ extraText } { extraText }
</div> </div>
); );

View file

@ -63,7 +63,7 @@ export default withMatrixClient(React.createClass({
_onCreateGroupClick: function() { _onCreateGroupClick: function() {
const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog"); const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog");
Modal.createTrackedDialog('Create Group', '', CreateGroupDialog); Modal.createTrackedDialog('Create Community', '', CreateGroupDialog);
}, },
_fetch: function() { _fetch: function() {
@ -90,12 +90,12 @@ export default withMatrixClient(React.createClass({
); );
}); });
content = <div> content = <div>
<div>{ _t('You are a member of these groups:') }</div> <div>{ _t('You are a member of these communities:') }</div>
{ groupNodes } { groupNodes }
</div>; </div>;
} else if (this.state.error) { } else if (this.state.error) {
content = <div className="mx_MyGroups_error"> content = <div className="mx_MyGroups_error">
{ _t('Error whilst fetching joined groups') } { _t('Error whilst fetching joined communities') }
</div>; </div>;
} else { } else {
content = <Loader />; content = <Loader />;
@ -106,27 +106,27 @@ export default withMatrixClient(React.createClass({
<div className='mx_MyGroups_joinCreateBox'> <div className='mx_MyGroups_joinCreateBox'>
<div className="mx_MyGroups_createBox"> <div className="mx_MyGroups_createBox">
<div className="mx_MyGroups_joinCreateHeader"> <div className="mx_MyGroups_joinCreateHeader">
{ _t('Create a new group') } { _t('Create a new community') }
</div> </div>
<AccessibleButton className='mx_MyGroups_joinCreateButton' onClick={this._onCreateGroupClick}> <AccessibleButton className='mx_MyGroups_joinCreateButton' onClick={this._onCreateGroupClick}>
<TintableSvg src="img/icons-create-room.svg" width="50" height="50" /> <TintableSvg src="img/icons-create-room.svg" width="50" height="50" />
</AccessibleButton> </AccessibleButton>
{ _t( { _t(
'Create a group to represent your community! '+ 'Create a community to represent your community! '+
'Define a set of rooms and your own custom homepage '+ 'Define a set of rooms and your own custom homepage '+
'to mark out your space in the Matrix universe.', 'to mark out your space in the Matrix universe.',
) } ) }
</div> </div>
<div className="mx_MyGroups_joinBox"> <div className="mx_MyGroups_joinBox">
<div className="mx_MyGroups_joinCreateHeader"> <div className="mx_MyGroups_joinCreateHeader">
{ _t('Join an existing group') } { _t('Join an existing community') }
</div> </div>
<AccessibleButton className='mx_MyGroups_joinCreateButton' onClick={this._onJoinGroupClick}> <AccessibleButton className='mx_MyGroups_joinCreateButton' onClick={this._onJoinGroupClick}>
<TintableSvg src="img/icons-create-room.svg" width="50" height="50" /> <TintableSvg src="img/icons-create-room.svg" width="50" height="50" />
</AccessibleButton> </AccessibleButton>
{ _tJsx( { _tJsx(
'To join an existing group you\'ll have to '+ 'To join an existing community you\'ll have to '+
'know its group identifier; this will look '+ 'know its community identifier; this will look '+
'something like <i>+example:matrix.org</i>.', 'something like <i>+example:matrix.org</i>.',
/<i>(.*)<\/i>/, /<i>(.*)<\/i>/,
(sub) => <i>{ sub }</i>, (sub) => <i>{ sub }</i>,

View file

@ -22,7 +22,7 @@ const GroupsButton = function(props) {
const ActionButton = sdk.getComponent('elements.ActionButton'); const ActionButton = sdk.getComponent('elements.ActionButton');
return ( return (
<ActionButton action="view_my_groups" <ActionButton action="view_my_groups"
label={_t("Groups")} label={_t("Communities")}
iconPath="img/icons-groups.svg" iconPath="img/icons-groups.svg"
size={props.size} size={props.size}
tooltip={props.tooltip} tooltip={props.tooltip}

View file

@ -63,9 +63,9 @@ module.exports = React.createClass({
validateGroupId: function(groupId) { validateGroupId: function(groupId) {
if (!GROUP_ID_REGEX.test(groupId)) { if (!GROUP_ID_REGEX.test(groupId)) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Invalid related group ID', '', ErrorDialog, { Modal.createTrackedDialog('Invalid related community ID', '', ErrorDialog, {
title: _t('Invalid group ID'), title: _t('Invalid community ID'),
description: _t('\'%(groupId)s\' is not a valid group ID', { groupId }), description: _t('\'%(groupId)s\' is not a valid community ID', { groupId }),
}); });
return false; return false;
} }
@ -105,7 +105,7 @@ module.exports = React.createClass({
const localDomain = this.context.matrixClient.getDomain(); const localDomain = this.context.matrixClient.getDomain();
const EditableItemList = sdk.getComponent('elements.EditableItemList'); const EditableItemList = sdk.getComponent('elements.EditableItemList');
return (<div> return (<div>
<h3>{ _t('Related Groups') }</h3> <h3>{ _t('Related Communities') }</h3>
<EditableItemList <EditableItemList
items={this.state.newGroupsList} items={this.state.newGroupsList}
className={"mx_RelatedGroupSettings"} className={"mx_RelatedGroupSettings"}
@ -114,10 +114,10 @@ module.exports = React.createClass({
onItemAdded={this.onGroupAdded} onItemAdded={this.onGroupAdded}
onItemEdited={this.onGroupEdited} onItemEdited={this.onGroupEdited}
onItemRemoved={this.onGroupDeleted} onItemRemoved={this.onGroupDeleted}
itemsLabel={_t('Related groups for this room:')} itemsLabel={_t('Related communities for this room:')}
noItemsLabel={_t('This room has no related groups')} noItemsLabel={_t('This room has no related communities')}
placeholder={_t( placeholder={_t(
'New group ID (e.g. +foo:%(localDomain)s)', {localDomain}, 'New community ID (e.g. +foo:%(localDomain)s)', {localDomain},
)} )}
/> />
</div>); </div>);

View file

@ -150,7 +150,7 @@
"%(widgetName)s widget modified by %(senderName)s": "%(widgetName)s widget modified by %(senderName)s", "%(widgetName)s widget modified by %(senderName)s": "%(widgetName)s widget modified by %(senderName)s",
"%(widgetName)s widget added by %(senderName)s": "%(widgetName)s widget added by %(senderName)s", "%(widgetName)s widget added by %(senderName)s": "%(widgetName)s widget added by %(senderName)s",
"%(widgetName)s widget removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s", "%(widgetName)s widget removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s",
"Groups": "Groups", "Communities": "Communities",
"Message Pinning": "Message Pinning", "Message Pinning": "Message Pinning",
"%(displayName)s is typing": "%(displayName)s is typing", "%(displayName)s is typing": "%(displayName)s is typing",
"%(names)s and one other are typing": "%(names)s and one other are typing", "%(names)s and one other are typing": "%(names)s and one other are typing",
@ -416,12 +416,12 @@
"Local addresses for this room:": "Local addresses for this room:", "Local addresses for this room:": "Local addresses for this room:",
"This room has no local addresses": "This room has no local addresses", "This room has no local addresses": "This room has no local addresses",
"New address (e.g. #foo:%(localDomain)s)": "New address (e.g. #foo:%(localDomain)s)", "New address (e.g. #foo:%(localDomain)s)": "New address (e.g. #foo:%(localDomain)s)",
"Invalid group ID": "Invalid group ID", "Invalid community ID": "Invalid community ID",
"'%(groupId)s' is not a valid group ID": "'%(groupId)s' is not a valid group ID", "'%(groupId)s' is not a valid community ID": "'%(groupId)s' is not a valid community ID",
"Related Groups": "Related Groups", "Related Communities": "Related Communities",
"Related groups for this room:": "Related groups for this room:", "Related communities for this room:": "Related communities for this room:",
"This room has no related groups": "This room has no related groups", "This room has no related communities": "This room has no related communities",
"New group ID (e.g. +foo:%(localDomain)s)": "New group ID (e.g. +foo:%(localDomain)s)", "New community ID (e.g. +foo:%(localDomain)s)": "New community ID (e.g. +foo:%(localDomain)s)",
"Disable URL previews by default for participants in this room": "Disable URL previews by default for participants in this room", "Disable URL previews by default for participants in this room": "Disable URL previews by default for participants in this room",
"URL previews are %(globalDisableUrlPreview)s by default for participants in this room.": "URL previews are %(globalDisableUrlPreview)s by default for participants in this room.", "URL previews are %(globalDisableUrlPreview)s by default for participants in this room.": "URL previews are %(globalDisableUrlPreview)s by default for participants in this room.",
"disabled": "disabled", "disabled": "disabled",
@ -654,28 +654,28 @@
"You must <a>register</a> to use this functionality": "You must <a>register</a> to use this functionality", "You must <a>register</a> to use this functionality": "You must <a>register</a> to use this functionality",
"You must join the room to see its files": "You must join the room to see its files", "You must join the room to see its files": "You must join the room to see its files",
"There are no visible files in this room": "There are no visible files in this room", "There are no visible files in this room": "There are no visible files in this room",
"Add rooms to the group summary": "Add rooms to the group summary", "Add rooms to the community summary": "Add rooms to the community summary",
"Which rooms would you like to add to this summary?": "Which rooms would you like to add to this summary?", "Which rooms would you like to add to this summary?": "Which rooms would you like to add to this summary?",
"Add to summary": "Add to summary", "Add to summary": "Add to summary",
"Failed to add the following rooms to the summary of %(groupId)s:": "Failed to add the following rooms to the summary of %(groupId)s:", "Failed to add the following rooms to the summary of %(groupId)s:": "Failed to add the following rooms to the summary of %(groupId)s:",
"Add a Room": "Add a Room", "Add a Room": "Add a Room",
"Failed to remove the room from the summary of %(groupId)s": "Failed to remove the room from the summary of %(groupId)s", "Failed to remove the room from the summary of %(groupId)s": "Failed to remove the room from the summary of %(groupId)s",
"The room '%(roomName)s' could not be removed from the summary.": "The room '%(roomName)s' could not be removed from the summary.", "The room '%(roomName)s' could not be removed from the summary.": "The room '%(roomName)s' could not be removed from the summary.",
"Add users to the group summary": "Add users to the group summary", "Add users to the community summary": "Add users to the community summary",
"Who would you like to add to this summary?": "Who would you like to add to this summary?", "Who would you like to add to this summary?": "Who would you like to add to this summary?",
"Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:", "Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:",
"Add a User": "Add a User", "Add a User": "Add a User",
"Failed to remove a user from the summary of %(groupId)s": "Failed to remove a user from the summary of %(groupId)s", "Failed to remove a user from the summary of %(groupId)s": "Failed to remove a user from the summary of %(groupId)s",
"The user '%(displayName)s' could not be removed from the summary.": "The user '%(displayName)s' could not be removed from the summary.", "The user '%(displayName)s' could not be removed from the summary.": "The user '%(displayName)s' could not be removed from the summary.",
"Failed to upload image": "Failed to upload image", "Failed to upload image": "Failed to upload image",
"Failed to update group": "Failed to update group", "Failed to update community": "Failed to update community",
"Unable to accept invite": "Unable to accept invite", "Unable to accept invite": "Unable to accept invite",
"Unable to reject invite": "Unable to reject invite", "Unable to reject invite": "Unable to reject invite",
"Leave Group": "Leave Group", "Leave Community": "Leave Community",
"Leave %(groupName)s?": "Leave %(groupName)s?", "Leave %(groupName)s?": "Leave %(groupName)s?",
"Leave": "Leave", "Leave": "Leave",
"Unable to leave room": "Unable to leave room", "Unable to leave room": "Unable to leave room",
"Add rooms to this group": "Add rooms to this group", "Add rooms to this community": "Add rooms to this community",
"Featured Rooms:": "Featured Rooms:", "Featured Rooms:": "Featured Rooms:",
"Featured Users:": "Featured Users:", "Featured Users:": "Featured Users:",
"%(inviter)s has invited you to join this group": "%(inviter)s has invited you to join this group", "%(inviter)s has invited you to join this group": "%(inviter)s has invited you to join this group",
@ -684,9 +684,12 @@
"Community Member Settings": "Community Member Settings", "Community Member Settings": "Community Member Settings",
"Publish this community on your profile": "Publish this community on your profile", "Publish this community on your profile": "Publish this community on your profile",
"Long Description (HTML)": "Long Description (HTML)", "Long Description (HTML)": "Long Description (HTML)",
"Community Name": "Community Name",
"Description": "Description", "Description": "Description",
"Community Settings": "Community Settings", "Community Settings": "Community Settings",
"This Home server does not support groups": "This Home server does not support groups", "Community %(groupId)s not found": "Community %(groupId)s not found",
"This Home server does not support communities": "This Home server does not support communities",
"Failed to load %(groupId)": "Failed to load %(groupId)",
"Reject invitation": "Reject invitation", "Reject invitation": "Reject invitation",
"Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?", "Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?",
"Failed to reject invitation": "Failed to reject invitation", "Failed to reject invitation": "Failed to reject invitation",
@ -695,12 +698,13 @@
"Signed Out": "Signed Out", "Signed Out": "Signed Out",
"For security, this session has been signed out. Please sign in again.": "For security, this session has been signed out. Please sign in again.", "For security, this session has been signed out. Please sign in again.": "For security, this session has been signed out. Please sign in again.",
"Logout": "Logout", "Logout": "Logout",
"You are a member of these groups:": "You are a member of these groups:", "You are a member of these communities:": "You are a member of these communities:",
"Error whilst fetching joined groups": "Error whilst fetching joined groups", "Error whilst fetching joined communities": "Error whilst fetching joined communities",
"Create a new group": "Create a new group", "Groups": "Groups",
"Create a group to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.": "Create a group to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.", "Create a new community": "Create a new community",
"Join an existing group": "Join an existing group", "Create a community to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.": "Create a community to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.",
"To join an existing group you'll have to know its group identifier; this will look something like <i>+example:matrix.org</i>.": "To join an existing group you'll have to know its group identifier; this will look something like <i>+example:matrix.org</i>.", "Join an existing community": "Join an existing community",
"To join an existing community you'll have to know its community identifier; this will look something like <i>+example:matrix.org</i>.": "To join an existing community you'll have to know its community identifier; this will look something like <i>+example:matrix.org</i>.",
"You have no visible notifications": "You have no visible notifications", "You have no visible notifications": "You have no visible notifications",
"Scroll to bottom of page": "Scroll to bottom of page", "Scroll to bottom of page": "Scroll to bottom of page",
"Connectivity to the server has been lost.": "Connectivity to the server has been lost.", "Connectivity to the server has been lost.": "Connectivity to the server has been lost.",