From eaa5dd5f229713e7e2d2c158d681c3e2a0e95e4d Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 16 Oct 2017 13:18:39 +0100 Subject: [PATCH 1/3] Groups -> Communities in the UI Translation files still need updating, and this would be much simpler with a script that could automate the tedium --- src/UserSettingsStore.js | 2 +- src/components/structures/GroupView.js | 38 +++++++++---------- src/components/structures/MyGroups.js | 16 ++++---- src/components/views/elements/GroupsButton.js | 2 +- .../room_settings/RelatedGroupSettings.js | 14 +++---- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/UserSettingsStore.js b/src/UserSettingsStore.js index 6f689735a7..d2b5bca841 100644 --- a/src/UserSettingsStore.js +++ b/src/UserSettingsStore.js @@ -28,7 +28,7 @@ import SdkConfig from './SdkConfig'; const FEATURES = [ { id: 'feature_groups', - name: _td("Groups"), + name: _td("Communities"), }, ]; diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index c9cc375563..17610ae059 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -70,7 +70,7 @@ const CategoryRoomList = React.createClass({ ev.preventDefault(); const AddressPickerDialog = sdk.getComponent("dialogs.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?"), placeholder: _t("Room name or alias"), button: _t("Add to summary"), @@ -246,7 +246,7 @@ const RoleUserList = React.createClass({ ev.preventDefault(); const AddressPickerDialog = sdk.getComponent("dialogs.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?"), placeholder: _t("Name or matrix ID"), button: _t("Add to summary"), @@ -267,7 +267,7 @@ const RoleUserList = React.createClass({ } const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog( - 'Failed to add the following users to the group summary', + 'Failed to add the following users to the community summary', '', ErrorDialog, { title: _t( @@ -339,7 +339,7 @@ const FeaturedUser = React.createClass({ const displayName = this.props.summaryInfo.displayname || this.props.summaryInfo.user_id; const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog( - 'Failed to remove user from group summary', + 'Failed to remove user from community summary', '', ErrorDialog, { title: _t( @@ -537,10 +537,10 @@ export default React.createClass({ saving: false, }); 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, { title: _t('Error'), - description: _t('Failed to update group'), + description: _t('Failed to update community'), }); }).done(); }, @@ -576,7 +576,7 @@ export default React.createClass({ _onLeaveClick: function() { const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); Modal.createTrackedDialog('Leave Group', '', QuestionDialog, { - title: _t("Leave Group"), + title: _t("Leave Community"), description: _t("Leave %(groupName)s?", {groupName: this.props.groupId}), button: _t("Leave"), danger: true, @@ -631,12 +631,12 @@ export default React.createClass({
- { _t('Add rooms to this group') } + { _t('Add rooms to this community') }
) :
; return
-

Rooms

+

{ _t('Rooms') }

{ addButton }
@@ -740,7 +740,7 @@ export default React.createClass({ return
- { _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}) }
; } 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) { - youAreAMemberText = _t("You are an administrator of this group"); + youAreAMemberText = _t("You are an administrator of this community"); } let publicisedButton; @@ -776,7 +776,7 @@ export default React.createClass({ ; } publicisedSection =
- { _t("This group is published on your profile") } + { _t("This community is published on your profile") }
{ publicisedButton }
@@ -790,7 +790,7 @@ export default React.createClass({ ; } publicisedSection =
- { _t("This group is not published on your profile") } + { _t("This community is not published on your profile") }
{ publicisedButton }
@@ -865,7 +865,7 @@ export default React.createClass({ nameNode = ; shortDescNode = , @@ -977,17 +977,17 @@ export default React.createClass({ if (this.state.error.httpStatus === 404) { return (
- Group { this.props.groupId } not found + { _t('Community (%groupId)s not found', {groupId: this.props.groupId}) }
); } else { let extraText; if (this.state.error.errcode === 'M_UNRECOGNIZED') { - extraText =
{ _t('This Home server does not support groups') }
; + extraText =
{ _t('This Home server does not support communities') }
; } return (
- Failed to load { this.props.groupId } + { _t('Failed to load %(groupId)', {groupId: this.props.groupId }) } { extraText }
); diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index c6885bbe34..9166ef0e64 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -63,7 +63,7 @@ export default withMatrixClient(React.createClass({ _onCreateGroupClick: function() { const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog"); - Modal.createTrackedDialog('Create Group', '', CreateGroupDialog); + Modal.createTrackedDialog('Create Community', '', CreateGroupDialog); }, _fetch: function() { @@ -90,12 +90,12 @@ export default withMatrixClient(React.createClass({ ); }); content =
-
{ _t('You are a member of these groups:') }
+
{ _t('You are a member of these communities:') }
{ groupNodes }
; } else if (this.state.error) { content =
- { _t('Error whilst fetching joined groups') } + { _t('Error whilst fetching joined communities') }
; } else { content = ; @@ -106,27 +106,27 @@ export default withMatrixClient(React.createClass({
- { _t('Create a new group') } + { _t('Create a new community') }
{ _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 '+ 'to mark out your space in the Matrix universe.', ) }
- { _t('Join an existing group') } + { _t('Join an existing community') }
{ _tJsx( - 'To join an existing group you\'ll have to '+ - 'know its group identifier; this will look '+ + 'To join an existing community you\'ll have to '+ + 'know its community identifier; this will look '+ 'something like +example:matrix.org.', /(.*)<\/i>/, (sub) => { sub }, diff --git a/src/components/views/elements/GroupsButton.js b/src/components/views/elements/GroupsButton.js index f973fda74a..9e803c87db 100644 --- a/src/components/views/elements/GroupsButton.js +++ b/src/components/views/elements/GroupsButton.js @@ -22,7 +22,7 @@ const GroupsButton = function(props) { const ActionButton = sdk.getComponent('elements.ActionButton'); return ( -

{ _t('Related Groups') }

+

{ _t('Related Communities') }

); From 2db0eab5c5d0f0b7a554c430d386d76404f29010 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 19 Oct 2017 11:29:03 +0100 Subject: [PATCH 2/3] s/Groups/Communities --- src/i18n/strings/en_EN.json | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 6bf020feaf..699f78cf9c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -150,7 +150,7 @@ "%(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 removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s", - "Groups": "Groups", + "Communities": "Communities", "Message Pinning": "Message Pinning", "%(displayName)s is typing": "%(displayName)s is 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:", "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)", - "Invalid group ID": "Invalid group ID", - "'%(groupId)s' is not a valid group ID": "'%(groupId)s' is not a valid group ID", - "Related Groups": "Related Groups", - "Related groups for this room:": "Related groups for this room:", - "This room has no related groups": "This room has no related groups", - "New group ID (e.g. +foo:%(localDomain)s)": "New group ID (e.g. +foo:%(localDomain)s)", + "Invalid community ID": "Invalid community ID", + "'%(groupId)s' is not a valid community ID": "'%(groupId)s' is not a valid community ID", + "Related Communities": "Related Communities", + "Related communities for this room:": "Related communities for this room:", + "This room has no related communities": "This room has no related communities", + "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", "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", @@ -654,28 +654,28 @@ "You must register to use this functionality": "You must register to use this functionality", "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", - "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?", "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:", "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", "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?", "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", "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.", "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 reject invite": "Unable to reject invite", - "Leave Group": "Leave Group", + "Leave Community": "Leave Community", "Leave %(groupName)s?": "Leave %(groupName)s?", "Leave": "Leave", "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 Users:": "Featured Users:", "%(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", "Publish this community on your profile": "Publish this community on your profile", "Long Description (HTML)": "Long Description (HTML)", + "Community Name": "Community Name", "Description": "Description", "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", "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", @@ -695,12 +698,13 @@ "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.", "Logout": "Logout", - "You are a member of these groups:": "You are a member of these groups:", - "Error whilst fetching joined groups": "Error whilst fetching joined groups", - "Create a new group": "Create a new group", - "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.", - "Join an existing group": "Join an existing group", - "To join an existing group you'll have to know its group identifier; this will look something like +example:matrix.org.": "To join an existing group you'll have to know its group identifier; this will look something like +example:matrix.org.", + "You are a member of these communities:": "You are a member of these communities:", + "Error whilst fetching joined communities": "Error whilst fetching joined communities", + "Groups": "Groups", + "Create a new community": "Create a new community", + "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.", + "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 +example:matrix.org.": "To join an existing community you'll have to know its community identifier; this will look something like +example:matrix.org.", "You have no visible notifications": "You have no visible notifications", "Scroll to bottom of page": "Scroll to bottom of page", "Connectivity to the server has been lost.": "Connectivity to the server has been lost.", From bafa2c6be07f6531be4c92f60d659b896e265dbc Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 19 Oct 2017 12:03:59 +0100 Subject: [PATCH 3/3] Fix typo --- src/components/structures/GroupView.js | 4 ++-- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 6ce39a3716..53ad937cbb 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -878,7 +878,7 @@ export default React.createClass({
); - + const EditableText = sdk.getComponent("elements.EditableText"); nameNode = - { _t('Community (%groupId)s not found', {groupId: this.props.groupId}) } + { _t('Community %(groupId)s not found', {groupId: this.props.groupId}) }
); } else { diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 699f78cf9c..4c8cc05d56 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -687,7 +687,7 @@ "Community Name": "Community Name", "Description": "Description", "Community Settings": "Community Settings", - "Community (%groupId)s not found": "Community (%groupId)s not found", + "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",