Groups -> Communities in the UI
Translation files still need updating, and this would be much simpler with a script that could automate the tedium
This commit is contained in:
parent
6f20445a42
commit
eaa5dd5f22
5 changed files with 36 additions and 36 deletions
|
@ -28,7 +28,7 @@ import SdkConfig from './SdkConfig';
|
||||||
const FEATURES = [
|
const FEATURES = [
|
||||||
{
|
{
|
||||||
id: 'feature_groups',
|
id: 'feature_groups',
|
||||||
name: _td("Groups"),
|
name: _td("Communities"),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -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(
|
||||||
|
@ -537,10 +537,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();
|
||||||
},
|
},
|
||||||
|
@ -576,7 +576,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,
|
||||||
|
@ -631,12 +631,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()} />
|
||||||
|
@ -740,7 +740,7 @@ export default React.createClass({
|
||||||
|
|
||||||
return <div className="mx_GroupView_membershipSection mx_GroupView_membershipSection_invited">
|
return <div className="mx_GroupView_membershipSection mx_GroupView_membershipSection_invited">
|
||||||
<div className="mx_GroupView_membershipSection_description">
|
<div className="mx_GroupView_membershipSection_description">
|
||||||
{ _t("%(inviter)s has invited you to join this group", {inviter: group.inviter.userId}) }
|
{ _t("%(inviter)s has invited you to join this community", {inviter: group.inviter.userId}) }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_GroupView_membership_buttonContainer">
|
<div className="mx_GroupView_membership_buttonContainer">
|
||||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||||
|
@ -756,9 +756,9 @@ export default React.createClass({
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
} else if (group.myMembership === 'join') {
|
} else if (group.myMembership === 'join') {
|
||||||
let youAreAMemberText = _t("You are a member of this group");
|
let youAreAMemberText = _t("You are a member of this community");
|
||||||
if (this.state.summary.user && this.state.summary.user.is_privileged) {
|
if (this.state.summary.user && this.state.summary.user.is_privileged) {
|
||||||
youAreAMemberText = _t("You are an administrator of this group");
|
youAreAMemberText = _t("You are an administrator of this community");
|
||||||
}
|
}
|
||||||
|
|
||||||
let publicisedButton;
|
let publicisedButton;
|
||||||
|
@ -776,7 +776,7 @@ export default React.createClass({
|
||||||
</AccessibleButton>;
|
</AccessibleButton>;
|
||||||
}
|
}
|
||||||
publicisedSection = <div className="mx_GroupView_membershipSubSection">
|
publicisedSection = <div className="mx_GroupView_membershipSubSection">
|
||||||
{ _t("This group is published on your profile") }
|
{ _t("This community is published on your profile") }
|
||||||
<div className="mx_GroupView_membership_buttonContainer">
|
<div className="mx_GroupView_membership_buttonContainer">
|
||||||
{ publicisedButton }
|
{ publicisedButton }
|
||||||
</div>
|
</div>
|
||||||
|
@ -790,7 +790,7 @@ export default React.createClass({
|
||||||
</AccessibleButton>;
|
</AccessibleButton>;
|
||||||
}
|
}
|
||||||
publicisedSection = <div className="mx_GroupView_membershipSubSection">
|
publicisedSection = <div className="mx_GroupView_membershipSubSection">
|
||||||
{ _t("This group is not published on your profile") }
|
{ _t("This community is not published on your profile") }
|
||||||
<div className="mx_GroupView_membership_buttonContainer">
|
<div className="mx_GroupView_membership_buttonContainer">
|
||||||
{ publicisedButton }
|
{ publicisedButton }
|
||||||
</div>
|
</div>
|
||||||
|
@ -865,7 +865,7 @@ export default React.createClass({
|
||||||
nameNode = <input type="text"
|
nameNode = <input type="text"
|
||||||
value={this.state.profileForm.name}
|
value={this.state.profileForm.name}
|
||||||
onChange={this._onNameChange}
|
onChange={this._onNameChange}
|
||||||
placeholder={_t('Group Name')}
|
placeholder={_t('Community Name')}
|
||||||
tabIndex="1"
|
tabIndex="1"
|
||||||
/>;
|
/>;
|
||||||
shortDescNode = <input type="text"
|
shortDescNode = <input type="text"
|
||||||
|
@ -929,7 +929,7 @@ export default React.createClass({
|
||||||
if (summary.user && summary.user.is_privileged) {
|
if (summary.user && summary.user.is_privileged) {
|
||||||
rightButtons.push(
|
rightButtons.push(
|
||||||
<AccessibleButton className="mx_GroupHeader_button"
|
<AccessibleButton className="mx_GroupHeader_button"
|
||||||
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
onClick={this._onEditClick} title={_t("Edit Community")} key="_editButton"
|
||||||
>
|
>
|
||||||
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16" />
|
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16" />
|
||||||
</AccessibleButton>,
|
</AccessibleButton>,
|
||||||
|
@ -977,17 +977,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>
|
||||||
);
|
);
|
||||||
|
|
|
@ -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>,
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -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>);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue