From 8ab96ae2ffce6c5e54b42194d949bcf53a681fdc Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 14 Sep 2017 13:43:46 +0100
Subject: [PATCH 01/11] render m.room.aliases events
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/TextForEvent.js | 32 +++++++++++++++++++++++++
src/components/views/rooms/EventTile.js | 1 +
2 files changed, 33 insertions(+)
diff --git a/src/TextForEvent.js b/src/TextForEvent.js
index 36b8b538a7..c8d0a0a0f7 100644
--- a/src/TextForEvent.js
+++ b/src/TextForEvent.js
@@ -134,6 +134,37 @@ function textForMessageEvent(ev) {
return message;
}
+function textForRoomAliasesEvent(ev) {
+ const senderName = event.sender ? event.sender.name : event.getSender();
+ const oldAliases = ev.getPrevContent().aliases || [];
+ const newAliases = ev.getContent().aliases || [];
+
+ const addedAliases = newAliases.filter((x) => !oldAliases.includes(x));
+ const removedAliases = oldAliases.filter((x) => !newAliases.includes(x));
+
+ if (!addedAliases.length && !removedAliases.length) {
+ return '';
+ }
+
+ if (addedAliases.length && !removedAliases.length) {
+ return _t('%(senderName)s added %(addedAddresses)s as addresses for this room.', {
+ senderName: senderName,
+ addedAddresses: addedAliases.join(', '),
+ });
+ } else if (!addedAliases.length && removedAliases.length) {
+ return _t('%(senderName)s removed %(addresses)s as addresses for this room.', {
+ senderName: senderName,
+ removedAddresses: removedAliases.join(', '),
+ });
+ } else {
+ return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.', {
+ senderName: senderName,
+ addedAddresses: addedAliases.join(', '),
+ removedAddresses: removedAliases.join(', '),
+ });
+ }
+}
+
function textForCallAnswerEvent(event) {
var senderName = event.sender ? event.sender.name : _t('Someone');
var supported = MatrixClientPeg.get().supportsVoip() ? "" : _t('(not supported by this browser)');
@@ -280,6 +311,7 @@ function textForWidgetEvent(event) {
var handlers = {
'm.room.message': textForMessageEvent,
+ 'm.room.aliases': textForRoomAliasesEvent,
'm.room.name': textForRoomNameEvent,
'm.room.topic': textForTopicEvent,
'm.room.member': textForMemberEvent,
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index a6f8ed5542..647b8a0f5d 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -33,6 +33,7 @@ var ObjectUtils = require('../../../ObjectUtils');
var eventTileTypes = {
'm.room.message': 'messages.MessageEvent',
+ 'm.room.aliases': 'messages.TextualEvent',
'm.room.member' : 'messages.TextualEvent',
'm.call.invite' : 'messages.TextualEvent',
'm.call.answer' : 'messages.TextualEvent',
From 755f22a7fa77452b414ba7c6aa0ff90e4313af01 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 14 Sep 2017 17:39:18 +0100
Subject: [PATCH 02/11] shelving.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/TextForEvent.js | 19 ++-
.../views/messages/RoomAliasesEvent.js | 161 ++++++++++++++++++
src/components/views/rooms/EventTile.js | 2 +-
src/i18n/strings/en_EN.json | 7 +-
4 files changed, 184 insertions(+), 5 deletions(-)
create mode 100644 src/components/views/messages/RoomAliasesEvent.js
diff --git a/src/TextForEvent.js b/src/TextForEvent.js
index c8d0a0a0f7..d39ebd6c0a 100644
--- a/src/TextForEvent.js
+++ b/src/TextForEvent.js
@@ -149,19 +149,32 @@ function textForRoomAliasesEvent(ev) {
if (addedAliases.length && !removedAliases.length) {
return _t('%(senderName)s added %(addedAddresses)s as addresses for this room.', {
senderName: senderName,
+ count: addedAliases.length,
addedAddresses: addedAliases.join(', '),
});
} else if (!addedAliases.length && removedAliases.length) {
- return _t('%(senderName)s removed %(addresses)s as addresses for this room.', {
+ return _t('%(senderName)s removed %(removedAddresses)s as addresses for this room.', {
senderName: senderName,
+ count: removedAliases.length,
removedAddresses: removedAliases.join(', '),
});
} else {
- return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.', {
+ const args = {
senderName: senderName,
addedAddresses: addedAliases.join(', '),
removedAddresses: removedAliases.join(', '),
- });
+ };
+ /* eslint-disable max-len */
+ if (addedAliases.length === 1 && removedAliases.length === 1) {
+ return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|one,one', args);
+ } else if (addedAliases.length !== 1 && removedAliases.length === 1) {
+ return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|other,one', args);
+ } else if (addedAliases.length === 1 && removedAliases.length !== 1) {
+ return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|one,other', args);
+ } else {
+ return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|other,other', args);
+ }
+ /* eslint-enable max-len */
}
}
diff --git a/src/components/views/messages/RoomAliasesEvent.js b/src/components/views/messages/RoomAliasesEvent.js
new file mode 100644
index 0000000000..7d9b2e6795
--- /dev/null
+++ b/src/components/views/messages/RoomAliasesEvent.js
@@ -0,0 +1,161 @@
+/*
+Michael Telatynski <7t3chguy@gmail.com>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+'use strict';
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import { _t } from '../../../languageHandler';
+
+export class GenericEventListSummary extends React.Component {
+ static propTypes = {
+ // An summary to display when collapsed
+ summary: PropTypes.string.isRequired,
+ // whether to show summary whilst children are expanded
+ alwaysShowSummary: PropTypes.bool,
+ // An array of EventTiles to render when expanded
+ children: PropTypes.array.isRequired,
+ // Called when the GELS expansion is toggled
+ onToggle: PropTypes.func,
+ // how many children should cause GELS to act
+ threshold: PropTypes.number.isRequired,
+ };
+
+ static defaultProps = {
+ threshold: 1,
+ };
+
+ constructor(props, context) {
+ super(props, context);
+ this._toggleSummary = this._toggleSummary.bind(this);
+ }
+
+ state = {
+ expanded: false,
+ };
+
+ _toggleSummary() {
+ this.setState({expanded: !this.state.expanded});
+ this.props.onToggle();
+ }
+
+ render() {
+ const fewEvents = this.props.children.length < this.props.threshold;
+ const expanded = this.state.expanded || fewEvents;
+ const showSummary = !expanded || this.props.alwaysShowSummary;
+
+ let expandedEvents = null;
+ if (expanded) {
+ expandedEvents = this.props.children;
+ }
+
+ if (fewEvents) {
+ return
{ expandedEvents }
;
+ }
+
+ let summaryContainer = null;
+ if (showSummary) {
+ summaryContainer = (
+
+
+ {this.props.summary}
+
+
+ );
+ }
+ let toggleButton = null;
+ if (!fewEvents) {
+ toggleButton =
+ {expanded ? 'collapse' : 'expand'}
+
;
+ }
+
+ return (
+
+ {toggleButton}
+ {summaryContainer}
+ {/*{showSummary ?
: null}*/}
+ {expandedEvents}
+
+ );
+ }
+}
+
+export default class RoomAliasesEvent extends React.Component {
+ static PropTypes = {
+ /* the MatrixEvent to show */
+ mxEvent: PropTypes.object.isRequired,
+
+ /* the shsape of the tile, used */
+ tileShape: PropTypes.string,
+ };
+
+ getEventTileOps() {
+ return this.refs.body && this.refs.body.getEventTileOps ? this.refs.body.getEventTileOps() : null;
+ }
+
+ render() {
+ const senderName = this.props.mxEvent.sender ? this.props.mxEvent.sender.name : this.props.mxEvent.getSender();
+ const oldAliases = this.props.mxEvent.getPrevContent().aliases || [];
+ const newAliases = this.props.mxEvent.getContent().aliases || [];
+
+ const addedAliases = newAliases.filter((x) => !oldAliases.includes(x));
+ const removedAliases = oldAliases.filter((x) => !newAliases.includes(x));
+
+ if (!addedAliases.length && !removedAliases.length) {
+ return '';
+ }
+
+ if (addedAliases.length && !removedAliases.length) {
+ return {_t('%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.', {
+ senderName: senderName,
+ count: addedAliases.length,
+ addedAddresses: addedAliases.join(', '),
+ })}
;
+ } else if (!addedAliases.length && removedAliases.length) {
+ return {_t('%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.', {
+ senderName: senderName,
+ count: removedAliases.length,
+ removedAddresses: removedAliases.join(', '),
+ })}
;
+ } else {
+ // const args = {
+ // senderName: senderName,
+ // addedAddresses: addedAliases.join(', '),
+ // removedAddresses: removedAliases.join(', '),
+ // };
+
+ const changes = [];
+ addedAliases.forEach((alias) => {
+ changes.push(Added {alias}
);
+ });
+ removedAliases.forEach((alias) => {
+ changes.push(Removed {alias}
);
+ });
+
+ const summary = _t('%(senderName)s changed the addresses of this room.', {senderName});
+ return
+ {changes}
+ ;
+ }
+
+ // return ;
+ }
+}
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index 647b8a0f5d..10f0b85936 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -33,7 +33,7 @@ var ObjectUtils = require('../../../ObjectUtils');
var eventTileTypes = {
'm.room.message': 'messages.MessageEvent',
- 'm.room.aliases': 'messages.TextualEvent',
+ 'm.room.aliases': 'messages.RoomAliasesEvent',
'm.room.member' : 'messages.TextualEvent',
'm.call.invite' : 'messages.TextualEvent',
'm.call.answer' : 'messages.TextualEvent',
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index de0b8e9ebb..5ee29b6314 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -853,5 +853,10 @@
"%(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 modified by %(senderName)s": "%(widgetName)s widget modified by %(senderName)s",
- "Robot check is currently unavailable on desktop - please use a web browser": "Robot check is currently unavailable on desktop - please use a web browser"
+ "Robot check is currently unavailable on desktop - please use a web browser": "Robot check is currently unavailable on desktop - please use a web browser",
+ "%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|one": "%(senderName)s added %(addedAddresses)s as an address for this room.",
+ "%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|other": "%(senderName)s added %(addedAddresses)s as addresses for this room.",
+ "%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
+ "%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|other": "%(senderName)s removed %(removedAddresses)s as addresses for this room.",
+ "%(senderName)s changed the addresses of this room.": "%(senderName)s changed the addresses of this room."
}
From e1394d592a69f7a250e1748a5841e49c1e175162 Mon Sep 17 00:00:00 2001
From: David Baker
Date: Fri, 14 Sep 2018 14:11:59 +0100
Subject: [PATCH 03/11] Allow translation tags object to be a variable
Don't try to validate the translation tags if it's not an object literal.
---
scripts/gen-i18n.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/gen-i18n.js b/scripts/gen-i18n.js
index fa9ccc8ed7..c35cd3466a 100755
--- a/scripts/gen-i18n.js
+++ b/scripts/gen-i18n.js
@@ -143,7 +143,7 @@ function getTranslationsJs(file) {
// Validate tag replacements
if (node.arguments.length > 2) {
const tagMap = node.arguments[2];
- for (const prop of tagMap.properties) {
+ for (const prop of tagMap.properties || []) {
if (prop.key.type === 'Literal') {
const tag = prop.key.value;
// RegExp same as in src/languageHandler.js
From 599697ca2f83a0564ab346cc1f3da87a80284872 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Sun, 16 Sep 2018 19:08:31 +0100
Subject: [PATCH 04/11] fix merge on i18n
---
src/i18n/strings/en_EN.json | 411 ------------------------------------
1 file changed, 411 deletions(-)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 70e6f80f96..6c42b0a005 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -973,417 +973,6 @@
"Share message history with new users": "Share message history with new users",
"Encrypt room": "Encrypt room",
"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",
- "HTML for your community's page
\n\n Use the long description to introduce new members to the community, or distribute\n some important links\n
\n\n You can even use 'img' tags\n
\n": "HTML for your community's page
\n\n Use the long description to introduce new members to the community, or distribute\n some important links\n
\n\n You can even use 'img' tags\n
\n",
- "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 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 community": "Failed to update community",
- "Unable to accept invite": "Unable to accept invite",
- "Unable to join community": "Unable to join community",
- "Leave Community": "Leave Community",
- "Leave %(groupName)s?": "Leave %(groupName)s?",
- "Unable to leave community": "Unable to leave community",
- "Community Settings": "Community Settings",
- "Changes made to your community name and avatar might not be seen by other users for up to 30 minutes.": "Changes made to your community name and avatar might not be seen by other users for up to 30 minutes.",
- "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.": "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.",
- "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 community": "%(inviter)s has invited you to join this community",
- "Join this community": "Join this community",
- "Leave this community": "Leave this community",
- "You are an administrator of this community": "You are an administrator of this community",
- "You are a member of this community": "You are a member of this community",
- "Who can join this community?": "Who can join this community?",
- "Everyone": "Everyone",
- "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!",
- "Long Description (HTML)": "Long Description (HTML)",
- "Description": "Description",
- "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)s": "Failed to load %(groupId)s",
- "Couldn't load home page": "Couldn't load home page",
- "Login": "Login",
- "Failed to reject invitation": "Failed to reject invitation",
- "This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
- "Are you sure you want to leave the room '%(roomName)s'?": "Are you sure you want to leave the room '%(roomName)s'?",
- "Failed to leave room": "Failed to leave room",
- "Can't leave Server Notices room": "Can't leave Server Notices room",
- "This room is used for important messages from the Homeserver, so you cannot leave it.": "This room is used for important messages from the Homeserver, so you cannot leave it.",
- "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.",
- "Terms and Conditions": "Terms and Conditions",
- "To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.": "To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.",
- "Review terms and conditions": "Review terms and conditions",
- "Old cryptography data detected": "Old cryptography data detected",
- "Data from an older version of Riot has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.": "Data from an older version of Riot has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",
- "Logout": "Logout",
- "Your Communities": "Your Communities",
- "Did you know: you can use communities to filter your Riot.im experience!": "Did you know: you can use communities to filter your Riot.im experience!",
- "To set up a filter, drag a community avatar over to the filter panel on the far left hand side of the screen. You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.": "To set up a filter, drag a community avatar over to the filter panel on the far left hand side of the screen. You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.",
- "Error whilst fetching joined communities": "Error whilst fetching joined communities",
- "Create a new community": "Create a new community",
- "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.": "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.",
- "You have no visible notifications": "You have no visible notifications",
- "Members": "Members",
- "%(count)s Members|other": "%(count)s Members",
- "%(count)s Members|one": "%(count)s Member",
- "Invite to this room": "Invite to this room",
- "Files": "Files",
- "Notifications": "Notifications",
- "Hide panel": "Hide panel",
- "Invite to this community": "Invite to this community",
- "Failed to get protocol list from Home Server": "Failed to get protocol list from Home Server",
- "The Home Server may be too old to support third party networks": "The Home Server may be too old to support third party networks",
- "Failed to get public room list": "Failed to get public room list",
- "The server may be unavailable or overloaded": "The server may be unavailable or overloaded",
- "Delete the room alias %(alias)s and remove %(name)s from the directory?": "Delete the room alias %(alias)s and remove %(name)s from the directory?",
- "Remove %(name)s from the directory?": "Remove %(name)s from the directory?",
- "Remove from Directory": "Remove from Directory",
- "remove %(name)s from the directory.": "remove %(name)s from the directory.",
- "delete the alias.": "delete the alias.",
- "Unable to join network": "Unable to join network",
- "Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network",
- "Room not found": "Room not found",
- "Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room",
- "Fetching third party location failed": "Fetching third party location failed",
- "Unable to look up room ID from server": "Unable to look up room ID from server",
- "Directory": "Directory",
- "Search for a room": "Search for a room",
- "#example": "#example",
- "Scroll to bottom of page": "Scroll to bottom of page",
- "Message not sent due to unknown devices being present": "Message not sent due to unknown devices being present",
- "Show devices, send anyway or cancel.": "Show devices, send anyway or cancel.",
- "You can't send any messages until you review and agree to our terms and conditions.": "You can't send any messages until you review and agree to our terms and conditions.",
- "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.",
- "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.",
- "%(count)s of your messages have not been sent.|other": "Some of your messages have not been sent.",
- "%(count)s of your messages have not been sent.|one": "Your message was not sent.",
- "%(count)s Resend all or cancel all now. You can also select individual messages to resend or cancel.|other": "Resend all or cancel all now. You can also select individual messages to resend or cancel.",
- "%(count)s Resend all or cancel all now. You can also select individual messages to resend or cancel.|one": "Resend message or cancel message now.",
- "Connectivity to the server has been lost.": "Connectivity to the server has been lost.",
- "Sent messages will be stored until your connection has returned.": "Sent messages will be stored until your connection has returned.",
- "%(count)s new messages|other": "%(count)s new messages",
- "%(count)s new messages|one": "%(count)s new message",
- "Active call": "Active call",
- "There's no one else here! Would you like to invite others or stop warning about the empty room?": "There's no one else here! Would you like to invite others or stop warning about the empty room?",
- "more": "more",
- "You seem to be uploading files, are you sure you want to quit?": "You seem to be uploading files, are you sure you want to quit?",
- "You seem to be in a call, are you sure you want to quit?": "You seem to be in a call, are you sure you want to quit?",
- "Failed to upload file": "Failed to upload file",
- "Server may be unavailable, overloaded, or the file too big": "Server may be unavailable, overloaded, or the file too big",
- "Search failed": "Search failed",
- "Server may be unavailable, overloaded, or search timed out :(": "Server may be unavailable, overloaded, or search timed out :(",
- "No more results": "No more results",
- "Unknown room %(roomId)s": "Unknown room %(roomId)s",
- "Room": "Room",
- "Failed to save settings": "Failed to save settings",
- "Failed to reject invite": "Failed to reject invite",
- "Fill screen": "Fill screen",
- "Click to unmute video": "Click to unmute video",
- "Click to mute video": "Click to mute video",
- "Click to unmute audio": "Click to unmute audio",
- "Click to mute audio": "Click to mute audio",
- "Expand panel": "Expand panel",
- "Collapse panel": "Collapse panel",
- "Filter room names": "Filter room names",
- "Clear filter": "Clear filter",
- "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.",
- "Tried to load a specific point in this room's timeline, but was unable to find it.": "Tried to load a specific point in this room's timeline, but was unable to find it.",
- "Failed to load timeline position": "Failed to load timeline position",
- "Uploading %(filename)s and %(count)s others|other": "Uploading %(filename)s and %(count)s others",
- "Uploading %(filename)s and %(count)s others|zero": "Uploading %(filename)s",
- "Uploading %(filename)s and %(count)s others|one": "Uploading %(filename)s and %(count)s other",
- "Light theme": "Light theme",
- "Dark theme": "Dark theme",
- "Status.im theme": "Status.im theme",
- "Can't load user settings": "Can't load user settings",
- "Server may be unavailable or overloaded": "Server may be unavailable or overloaded",
- "For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.": "For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.",
- "Success": "Success",
- "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them",
- "Remove Contact Information?": "Remove Contact Information?",
- "Remove %(threePid)s?": "Remove %(threePid)s?",
- "Unable to remove contact information": "Unable to remove contact information",
- "Refer a friend to Riot:": "Refer a friend to Riot:",
- "Interface Language": "Interface Language",
- "User Interface": "User Interface",
- "Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
- "": "",
- "Import E2E room keys": "Import E2E room keys",
- "Cryptography": "Cryptography",
- "Device ID:": "Device ID:",
- "Device key:": "Device key:",
- "Ignored Users": "Ignored Users",
- "Debug Logs Submission": "Debug Logs Submission",
- "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
- "Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
- "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.": "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.",
- "Learn more about how we use analytics.": "Learn more about how we use analytics.",
- "Labs": "Labs",
- "These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
- "Use with caution": "Use with caution",
- "Lazy loading members not supported": "Lazy loading members not supported",
- "Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.",
- "Deactivate my account": "Deactivate my account",
- "Legal": "Legal",
- "Clear Cache": "Clear Cache",
- "Clear Cache and Reload": "Clear Cache and Reload",
- "Updates": "Updates",
- "Check for update": "Check for update",
- "Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
- "Bulk Options": "Bulk Options",
- "Desktop specific": "Desktop specific",
- "Start automatically after system login": "Start automatically after system login",
- "No media permissions": "No media permissions",
- "You may need to manually permit Riot to access your microphone/webcam": "You may need to manually permit Riot to access your microphone/webcam",
- "Missing Media Permissions, click here to request.": "Missing Media Permissions, click here to request.",
- "No Audio Outputs detected": "No Audio Outputs detected",
- "No Microphones detected": "No Microphones detected",
- "No Webcams detected": "No Webcams detected",
- "Default Device": "Default Device",
- "Audio Output": "Audio Output",
- "Microphone": "Microphone",
- "Camera": "Camera",
- "VoIP": "VoIP",
- "Email": "Email",
- "Add email address": "Add email address",
- "Profile": "Profile",
- "Display name": "Display name",
- "Account": "Account",
- "To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
- "Logged in as:": "Logged in as:",
- "Access Token:": "Access Token:",
- "click to reveal": "click to reveal",
- "Homeserver is": "Homeserver is",
- "Identity Server is": "Identity Server is",
- "matrix-react-sdk version:": "matrix-react-sdk version:",
- "riot-web version:": "riot-web version:",
- "olm version:": "olm version:",
- "Failed to send email": "Failed to send email",
- "The email address linked to your account must be entered.": "The email address linked to your account must be entered.",
- "A new password must be entered.": "A new password must be entered.",
- "New passwords must match each other.": "New passwords must match each other.",
- "Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.",
- "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.",
- "I have verified my email address": "I have verified my email address",
- "Your password has been reset": "Your password has been reset",
- "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device",
- "Return to login screen": "Return to login screen",
- "To reset your password, enter the email address linked to your account": "To reset your password, enter the email address linked to your account",
- "New password": "New password",
- "Confirm your new password": "Confirm your new password",
- "Send Reset Email": "Send Reset Email",
- "Create an account": "Create an account",
- "This Home Server does not support login using email address.": "This Home Server does not support login using email address.",
- "Please contact your service administrator to continue using this service.": "Please contact your service administrator to continue using this service.",
- "Incorrect username and/or password.": "Incorrect username and/or password.",
- "Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.",
- "Guest access is disabled on this Home Server.": "Guest access is disabled on this Home Server.",
- "The phone number entered looks invalid": "The phone number entered looks invalid",
- "This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.",
- "Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.",
- "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.",
- "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.",
- "Try the app first": "Try the app first",
- "Sign in to get started": "Sign in to get started",
- "Failed to fetch avatar URL": "Failed to fetch avatar URL",
- "Set a display name:": "Set a display name:",
- "Upload an avatar:": "Upload an avatar:",
- "Unable to query for supported registration methods": "Unable to query for supported registration methods",
- "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.",
- "Missing password.": "Missing password.",
- "Passwords don't match.": "Passwords don't match.",
- "Password too short (min %(MIN_PASSWORD_LENGTH)s).": "Password too short (min %(MIN_PASSWORD_LENGTH)s).",
- "This doesn't look like a valid email address.": "This doesn't look like a valid email address.",
- "This doesn't look like a valid phone number.": "This doesn't look like a valid phone number.",
- "You need to enter a user name.": "You need to enter a user name.",
- "An unknown error occurred.": "An unknown error occurred.",
- "I already have an account": "I already have an account",
- "Commands": "Commands",
- "Results from DuckDuckGo": "Results from DuckDuckGo",
- "Emoji": "Emoji",
- "Notify the whole room": "Notify the whole room",
- "Room Notification": "Room Notification",
- "Users": "Users",
- "unknown device": "unknown device",
- "NOT verified": "NOT verified",
- "verified": "verified",
- "Verification": "Verification",
- "Ed25519 fingerprint": "Ed25519 fingerprint",
- "User ID": "User ID",
- "Curve25519 identity key": "Curve25519 identity key",
- "none": "none",
- "Claimed Ed25519 fingerprint key": "Claimed Ed25519 fingerprint key",
- "Algorithm": "Algorithm",
- "unencrypted": "unencrypted",
- "Decryption error": "Decryption error",
- "Session ID": "Session ID",
- "End-to-end encryption information": "End-to-end encryption information",
- "Event information": "Event information",
- "Sender device information": "Sender device information",
- "Passphrases must match": "Passphrases must match",
- "Passphrase must not be empty": "Passphrase must not be empty",
- "Export room keys": "Export room keys",
- "This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.": "This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.",
- "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.": "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.",
- "Enter passphrase": "Enter passphrase",
- "Confirm passphrase": "Confirm passphrase",
- "Export": "Export",
- "Import room keys": "Import room keys",
- "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.",
- "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.",
- "You must join the room to see its files": "You must join the room to see its files",
- "Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
- "Start new chat": "Start new chat",
- "Guest users can't invite users. Please register.": "Guest users can't invite users. Please register.",
- "Failed to invite": "Failed to invite",
- "Failed to invite user": "Failed to invite user",
- "Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
- "Confirm Removal": "Confirm Removal",
- "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.",
- "Unknown error": "Unknown error",
- "Incorrect password": "Incorrect password",
- "This will make your account permanently unusable. You will not be able to re-register the same user ID.": "This will make your account permanently unusable. You will not be able to re-register the same user ID.",
- "This action is irreversible.": "This action is irreversible.",
- "To continue, please enter your password.": "To continue, please enter your password.",
- "To verify that this device can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this device matches the key below:": "To verify that this device can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this device matches the key below:",
- "Device name": "Device name",
- "Device Name": "Device Name",
- "Device key": "Device key",
- "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.": "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this device and you probably want to press the blacklist button instead.",
- "In future this verification process will be more sophisticated.": "In future this verification process will be more sophisticated.",
- "Verify device": "Verify device",
- "Verifies a user, device, and pubkey tuple": "Verifies a user, device, and pubkey tuple",
- "I verify that the keys match": "I verify that the keys match",
- "We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.": "We encountered an error trying to restore your previous session. If you continue, you will need to log in again, and encrypted chat history will be unreadable.",
- "Unable to restore session": "Unable to restore session",
- "If you have previously used a more recent version of Riot, your session may be incompatible with this version. Close this window and return to the more recent version.": "If you have previously used a more recent version of Riot, your session may be incompatible with this version. Close this window and return to the more recent version.",
- "Continue anyway": "Continue anyway",
- "Your display name is how you'll appear to others when you speak in rooms. What would you like it to be?": "Your display name is how you'll appear to others when you speak in rooms. What would you like it to be?",
- "You are currently blacklisting unverified devices; to send messages to these devices you must verify them.": "You are currently blacklisting unverified devices; to send messages to these devices you must verify them.",
- "We recommend you go through the verification process for each device to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.": "We recommend you go through the verification process for each device to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.",
- "\"%(RoomName)s\" contains devices that you haven't seen before.": "\"%(RoomName)s\" contains devices that you haven't seen before.",
- "Unknown devices": "Unknown devices",
- "Unknown Address": "Unknown Address",
- "Unblacklist": "Unblacklist",
- "Blacklist": "Blacklist",
- "Unverify": "Unverify",
- "Verify...": "Verify...",
- "ex. @bob:example.com": "ex. @bob:example.com",
- "Add User": "Add User",
- "This Home Server would like to make sure you are not a robot": "This Home Server would like to make sure you are not a robot",
- "Sign in with CAS": "Sign in with CAS",
- "Custom Server Options": "Custom Server Options",
- "You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.": "You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.",
- "This allows you to use this app with an existing Matrix account on a different home server.": "This allows you to use this app with an existing Matrix account on a different home server.",
- "You can also set a custom identity server but this will typically prevent interaction with users based on email address.": "You can also set a custom identity server but this will typically prevent interaction with users based on email address.",
- "Dismiss": "Dismiss",
- "Please check your email to continue registration.": "Please check your email to continue registration.",
- "Token incorrect": "Token incorrect",
- "A text message has been sent to": "A text message has been sent to",
- "Please enter the code it contains:": "Please enter the code it contains:",
- "powered by Matrix": "powered by Matrix",
- "If you don't specify an email address, you won't be able to reset your password. Are you sure?": "If you don't specify an email address, you won't be able to reset your password. Are you sure?",
- "You are registering with %(SelectedTeamName)s": "You are registering with %(SelectedTeamName)s",
- "Default server": "Default server",
- "Custom server": "Custom server",
- "Home server URL": "Home server URL",
- "Identity server URL": "Identity server URL",
- "What does this mean?": "What does this mean?",
- "Error decrypting audio": "Error decrypting audio",
- "Error decrypting image": "Error decrypting image",
- "Image '%(Body)s' cannot be displayed.": "Image '%(Body)s' cannot be displayed.",
- "This image cannot be displayed.": "This image cannot be displayed.",
- "Error decrypting video": "Error decrypting video",
- "Add an Integration": "Add an Integration",
- "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?",
- "Removed or unknown message type": "Removed or unknown message type",
- "Disable URL previews by default for participants in this room": "Disable URL previews by default for participants in this room",
- "Disable URL previews for this room (affects only you)": "Disable URL previews for this room (affects only you)",
- "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": "URL Previews",
- "Enable URL previews for this room (affects only you)": "Enable URL previews for this room (affects only you)",
- "Drop file here to upload": "Drop file here to upload",
- " (unsupported)": " (unsupported)",
- "Ongoing conference call%(supportedText)s.": "Ongoing conference call%(supportedText)s.",
- "for %(amount)ss": "for %(amount)ss",
- "for %(amount)sm": "for %(amount)sm",
- "for %(amount)sh": "for %(amount)sh",
- "for %(amount)sd": "for %(amount)sd",
- "Online": "Online",
- "Idle": "Idle",
- "Offline": "Offline",
- "Updates": "Updates",
- "Check for update": "Check for update",
- "Start chatting": "Start chatting",
- "Start Chatting": "Start Chatting",
- "Click on the button below to start chatting!": "Click on the button below to start chatting!",
- "$senderDisplayName changed the room avatar to ": "$senderDisplayName changed the room avatar to ",
- "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removed the room avatar.",
- "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s",
- "Username available": "Username available",
- "Username not available": "Username not available",
- "Something went wrong!": "Something went wrong!",
- "This will be your account name on the homeserver, or you can pick a different server.": "This will be your account name on the homeserver, or you can pick a different server.",
- "If you already have a Matrix account you can log in instead.": "If you already have a Matrix account you can log in instead.",
- "Your browser does not support the required cryptography extensions": "Your browser does not support the required cryptography extensions",
- "Not a valid Riot keyfile": "Not a valid Riot keyfile",
- "Authentication check failed: incorrect password?": "Authentication check failed: incorrect password?",
- "Disable Peer-to-Peer for 1:1 calls": "Disable Peer-to-Peer for 1:1 calls",
- "Do you want to set an email address?": "Do you want to set an email address?",
- "This will allow you to reset your password and receive notifications.": "This will allow you to reset your password and receive notifications.",
- "To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
- "Skip": "Skip",
- "Start verification": "Start verification",
- "Share without verifying": "Share without verifying",
- "Ignore request": "Ignore request",
- "You added a new device '%(displayName)s', which is requesting encryption keys.": "You added a new device '%(displayName)s', which is requesting encryption keys.",
- "Your unverified device '%(displayName)s' is requesting encryption keys.": "Your unverified device '%(displayName)s' is requesting encryption keys.",
- "Encryption key request": "Encryption key request",
- "Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
- "This Home server does not support groups": "This Home server does not support groups",
- "Loading device info...": "Loading device info...",
- "Groups": "Groups",
- "Create a new group": "Create a new group",
- "Create Group": "Create Group",
- "Group Name": "Group Name",
- "Example": "Example",
- "Create": "Create",
- "Group ID": "Group ID",
- "+example:%(domain)s": "+example:%(domain)s",
- "Group IDs must be of the form +localpart:%(domain)s": "Group IDs must be of the form +localpart:%(domain)s",
- "It is currently only possible to create groups on your own home server: use a group ID ending with %(domain)s": "It is currently only possible to create groups on your own home server: use a group ID ending with %(domain)s",
- "Room creation failed": "Room creation failed",
- "You are a member of these groups:": "You are a member of these 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.",
- "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.",
- "Featured Rooms:": "Featured Rooms:",
- "Error whilst fetching joined groups": "Error whilst fetching joined groups",
- "Featured Users:": "Featured Users:",
- "Edit Group": "Edit Group",
- "Automatically replace plain text Emoji": "Automatically replace plain text Emoji",
- "Failed to upload image": "Failed to upload image",
- "Failed to update group": "Failed to update group",
- "Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
- "%(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 modified by %(senderName)s": "%(widgetName)s widget modified by %(senderName)s",
- "Robot check is currently unavailable on desktop - please use a web browser": "Robot check is currently unavailable on desktop - please use a web browser",
"%(senderName)s added %(count)s %(addedAddresses)s as an address for this room.|one": "%(senderName)s added %(addedAddresses)s as an address for this room.",
"%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|other": "%(senderName)s added %(addedAddresses)s as addresses for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as an address for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
From a4b7348703e6a7cfb9463b64dddb1bcf7052c4f6 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Sun, 16 Sep 2018 19:11:11 +0100
Subject: [PATCH 05/11] fix merge on i18n again
---
src/i18n/strings/en_EN.json | 273 ++++++++++++++++++++++++++++++++++++
1 file changed, 273 insertions(+)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 6c42b0a005..6b51a0122a 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -973,6 +973,279 @@
"Share message history with new users": "Share message history with new users",
"Encrypt room": "Encrypt room",
"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",
+ "HTML for your community's page
\n\n Use the long description to introduce new members to the community, or distribute\n some important links\n
\n\n You can even use 'img' tags\n
\n": "HTML for your community's page
\n\n Use the long description to introduce new members to the community, or distribute\n some important links\n
\n\n You can even use 'img' tags\n
\n",
+ "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 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 community": "Failed to update community",
+ "Unable to accept invite": "Unable to accept invite",
+ "Unable to join community": "Unable to join community",
+ "Leave Community": "Leave Community",
+ "Leave %(groupName)s?": "Leave %(groupName)s?",
+ "Unable to leave community": "Unable to leave community",
+ "Community Settings": "Community Settings",
+ "Changes made to your community name and avatar might not be seen by other users for up to 30 minutes.": "Changes made to your community name and avatar might not be seen by other users for up to 30 minutes.",
+ "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.": "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.",
+ "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 community": "%(inviter)s has invited you to join this community",
+ "Join this community": "Join this community",
+ "Leave this community": "Leave this community",
+ "You are an administrator of this community": "You are an administrator of this community",
+ "You are a member of this community": "You are a member of this community",
+ "Who can join this community?": "Who can join this community?",
+ "Everyone": "Everyone",
+ "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!",
+ "Long Description (HTML)": "Long Description (HTML)",
+ "Description": "Description",
+ "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)s": "Failed to load %(groupId)s",
+ "Couldn't load home page": "Couldn't load home page",
+ "Login": "Login",
+ "Failed to reject invitation": "Failed to reject invitation",
+ "This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
+ "Are you sure you want to leave the room '%(roomName)s'?": "Are you sure you want to leave the room '%(roomName)s'?",
+ "Failed to leave room": "Failed to leave room",
+ "Can't leave Server Notices room": "Can't leave Server Notices room",
+ "This room is used for important messages from the Homeserver, so you cannot leave it.": "This room is used for important messages from the Homeserver, so you cannot leave it.",
+ "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.",
+ "Terms and Conditions": "Terms and Conditions",
+ "To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.": "To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.",
+ "Review terms and conditions": "Review terms and conditions",
+ "Old cryptography data detected": "Old cryptography data detected",
+ "Data from an older version of Riot has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.": "Data from an older version of Riot has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",
+ "Logout": "Logout",
+ "Your Communities": "Your Communities",
+ "Did you know: you can use communities to filter your Riot.im experience!": "Did you know: you can use communities to filter your Riot.im experience!",
+ "To set up a filter, drag a community avatar over to the filter panel on the far left hand side of the screen. You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.": "To set up a filter, drag a community avatar over to the filter panel on the far left hand side of the screen. You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.",
+ "Error whilst fetching joined communities": "Error whilst fetching joined communities",
+ "Create a new community": "Create a new community",
+ "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.": "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.",
+ "You have no visible notifications": "You have no visible notifications",
+ "Members": "Members",
+ "%(count)s Members|other": "%(count)s Members",
+ "%(count)s Members|one": "%(count)s Member",
+ "Invite to this room": "Invite to this room",
+ "Files": "Files",
+ "Notifications": "Notifications",
+ "Hide panel": "Hide panel",
+ "Invite to this community": "Invite to this community",
+ "Failed to get protocol list from Home Server": "Failed to get protocol list from Home Server",
+ "The Home Server may be too old to support third party networks": "The Home Server may be too old to support third party networks",
+ "Failed to get public room list": "Failed to get public room list",
+ "The server may be unavailable or overloaded": "The server may be unavailable or overloaded",
+ "Delete the room alias %(alias)s and remove %(name)s from the directory?": "Delete the room alias %(alias)s and remove %(name)s from the directory?",
+ "Remove %(name)s from the directory?": "Remove %(name)s from the directory?",
+ "Remove from Directory": "Remove from Directory",
+ "remove %(name)s from the directory.": "remove %(name)s from the directory.",
+ "delete the alias.": "delete the alias.",
+ "Unable to join network": "Unable to join network",
+ "Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network",
+ "Room not found": "Room not found",
+ "Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room",
+ "Fetching third party location failed": "Fetching third party location failed",
+ "Unable to look up room ID from server": "Unable to look up room ID from server",
+ "Directory": "Directory",
+ "Search for a room": "Search for a room",
+ "#example": "#example",
+ "Scroll to bottom of page": "Scroll to bottom of page",
+ "Message not sent due to unknown devices being present": "Message not sent due to unknown devices being present",
+ "Show devices, send anyway or cancel.": "Show devices, send anyway or cancel.",
+ "You can't send any messages until you review and agree to our terms and conditions.": "You can't send any messages until you review and agree to our terms and conditions.",
+ "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.",
+ "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.",
+ "%(count)s of your messages have not been sent.|other": "Some of your messages have not been sent.",
+ "%(count)s of your messages have not been sent.|one": "Your message was not sent.",
+ "%(count)s Resend all or cancel all now. You can also select individual messages to resend or cancel.|other": "Resend all or cancel all now. You can also select individual messages to resend or cancel.",
+ "%(count)s Resend all or cancel all now. You can also select individual messages to resend or cancel.|one": "Resend message or cancel message now.",
+ "Connectivity to the server has been lost.": "Connectivity to the server has been lost.",
+ "Sent messages will be stored until your connection has returned.": "Sent messages will be stored until your connection has returned.",
+ "%(count)s new messages|other": "%(count)s new messages",
+ "%(count)s new messages|one": "%(count)s new message",
+ "Active call": "Active call",
+ "There's no one else here! Would you like to invite others or stop warning about the empty room?": "There's no one else here! Would you like to invite others or stop warning about the empty room?",
+ "more": "more",
+ "You seem to be uploading files, are you sure you want to quit?": "You seem to be uploading files, are you sure you want to quit?",
+ "You seem to be in a call, are you sure you want to quit?": "You seem to be in a call, are you sure you want to quit?",
+ "Failed to upload file": "Failed to upload file",
+ "Server may be unavailable, overloaded, or the file too big": "Server may be unavailable, overloaded, or the file too big",
+ "Search failed": "Search failed",
+ "Server may be unavailable, overloaded, or search timed out :(": "Server may be unavailable, overloaded, or search timed out :(",
+ "No more results": "No more results",
+ "Unknown room %(roomId)s": "Unknown room %(roomId)s",
+ "Room": "Room",
+ "Failed to save settings": "Failed to save settings",
+ "Failed to reject invite": "Failed to reject invite",
+ "Fill screen": "Fill screen",
+ "Click to unmute video": "Click to unmute video",
+ "Click to mute video": "Click to mute video",
+ "Click to unmute audio": "Click to unmute audio",
+ "Click to mute audio": "Click to mute audio",
+ "Expand panel": "Expand panel",
+ "Collapse panel": "Collapse panel",
+ "Filter room names": "Filter room names",
+ "Clear filter": "Clear filter",
+ "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.",
+ "Tried to load a specific point in this room's timeline, but was unable to find it.": "Tried to load a specific point in this room's timeline, but was unable to find it.",
+ "Failed to load timeline position": "Failed to load timeline position",
+ "Uploading %(filename)s and %(count)s others|other": "Uploading %(filename)s and %(count)s others",
+ "Uploading %(filename)s and %(count)s others|zero": "Uploading %(filename)s",
+ "Uploading %(filename)s and %(count)s others|one": "Uploading %(filename)s and %(count)s other",
+ "Light theme": "Light theme",
+ "Dark theme": "Dark theme",
+ "Status.im theme": "Status.im theme",
+ "Can't load user settings": "Can't load user settings",
+ "Server may be unavailable or overloaded": "Server may be unavailable or overloaded",
+ "For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.": "For security, logging out will delete any end-to-end encryption keys from this browser. If you want to be able to decrypt your conversation history from future Riot sessions, please export your room keys for safe-keeping.",
+ "Success": "Success",
+ "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them",
+ "Remove Contact Information?": "Remove Contact Information?",
+ "Remove %(threePid)s?": "Remove %(threePid)s?",
+ "Unable to remove contact information": "Unable to remove contact information",
+ "Refer a friend to Riot:": "Refer a friend to Riot:",
+ "Interface Language": "Interface Language",
+ "User Interface": "User Interface",
+ "Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
+ "": "",
+ "Import E2E room keys": "Import E2E room keys",
+ "Cryptography": "Cryptography",
+ "Device ID:": "Device ID:",
+ "Device key:": "Device key:",
+ "Ignored Users": "Ignored Users",
+ "Debug Logs Submission": "Debug Logs Submission",
+ "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",
+ "Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
+ "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.": "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.",
+ "Learn more about how we use analytics.": "Learn more about how we use analytics.",
+ "Labs": "Labs",
+ "These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
+ "Use with caution": "Use with caution",
+ "Lazy loading members not supported": "Lazy loading members not supported",
+ "Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.",
+ "Deactivate my account": "Deactivate my account",
+ "Legal": "Legal",
+ "Clear Cache": "Clear Cache",
+ "Clear Cache and Reload": "Clear Cache and Reload",
+ "Updates": "Updates",
+ "Check for update": "Check for update",
+ "Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
+ "Bulk Options": "Bulk Options",
+ "Desktop specific": "Desktop specific",
+ "Start automatically after system login": "Start automatically after system login",
+ "No media permissions": "No media permissions",
+ "You may need to manually permit Riot to access your microphone/webcam": "You may need to manually permit Riot to access your microphone/webcam",
+ "Missing Media Permissions, click here to request.": "Missing Media Permissions, click here to request.",
+ "No Audio Outputs detected": "No Audio Outputs detected",
+ "No Microphones detected": "No Microphones detected",
+ "No Webcams detected": "No Webcams detected",
+ "Default Device": "Default Device",
+ "Audio Output": "Audio Output",
+ "Microphone": "Microphone",
+ "Camera": "Camera",
+ "VoIP": "VoIP",
+ "Email": "Email",
+ "Add email address": "Add email address",
+ "Profile": "Profile",
+ "Display name": "Display name",
+ "Account": "Account",
+ "To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
+ "Logged in as:": "Logged in as:",
+ "Access Token:": "Access Token:",
+ "click to reveal": "click to reveal",
+ "Homeserver is": "Homeserver is",
+ "Identity Server is": "Identity Server is",
+ "matrix-react-sdk version:": "matrix-react-sdk version:",
+ "riot-web version:": "riot-web version:",
+ "olm version:": "olm version:",
+ "Failed to send email": "Failed to send email",
+ "The email address linked to your account must be entered.": "The email address linked to your account must be entered.",
+ "A new password must be entered.": "A new password must be entered.",
+ "New passwords must match each other.": "New passwords must match each other.",
+ "Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.",
+ "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.",
+ "I have verified my email address": "I have verified my email address",
+ "Your password has been reset": "Your password has been reset",
+ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device",
+ "Return to login screen": "Return to login screen",
+ "To reset your password, enter the email address linked to your account": "To reset your password, enter the email address linked to your account",
+ "New password": "New password",
+ "Confirm your new password": "Confirm your new password",
+ "Send Reset Email": "Send Reset Email",
+ "Create an account": "Create an account",
+ "This Home Server does not support login using email address.": "This Home Server does not support login using email address.",
+ "Please contact your service administrator to continue using this service.": "Please contact your service administrator to continue using this service.",
+ "Incorrect username and/or password.": "Incorrect username and/or password.",
+ "Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.",
+ "Guest access is disabled on this Home Server.": "Guest access is disabled on this Home Server.",
+ "The phone number entered looks invalid": "The phone number entered looks invalid",
+ "This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.",
+ "Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.",
+ "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.",
+ "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.",
+ "Try the app first": "Try the app first",
+ "Sign in to get started": "Sign in to get started",
+ "Failed to fetch avatar URL": "Failed to fetch avatar URL",
+ "Set a display name:": "Set a display name:",
+ "Upload an avatar:": "Upload an avatar:",
+ "Unable to query for supported registration methods": "Unable to query for supported registration methods",
+ "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.",
+ "Missing password.": "Missing password.",
+ "Passwords don't match.": "Passwords don't match.",
+ "Password too short (min %(MIN_PASSWORD_LENGTH)s).": "Password too short (min %(MIN_PASSWORD_LENGTH)s).",
+ "This doesn't look like a valid email address.": "This doesn't look like a valid email address.",
+ "This doesn't look like a valid phone number.": "This doesn't look like a valid phone number.",
+ "You need to enter a user name.": "You need to enter a user name.",
+ "An unknown error occurred.": "An unknown error occurred.",
+ "I already have an account": "I already have an account",
+ "Commands": "Commands",
+ "Results from DuckDuckGo": "Results from DuckDuckGo",
+ "Emoji": "Emoji",
+ "Notify the whole room": "Notify the whole room",
+ "Room Notification": "Room Notification",
+ "Users": "Users",
+ "unknown device": "unknown device",
+ "NOT verified": "NOT verified",
+ "verified": "verified",
+ "Verification": "Verification",
+ "Ed25519 fingerprint": "Ed25519 fingerprint",
+ "User ID": "User ID",
+ "Curve25519 identity key": "Curve25519 identity key",
+ "none": "none",
+ "Claimed Ed25519 fingerprint key": "Claimed Ed25519 fingerprint key",
+ "Algorithm": "Algorithm",
+ "unencrypted": "unencrypted",
+ "Decryption error": "Decryption error",
+ "Session ID": "Session ID",
+ "End-to-end encryption information": "End-to-end encryption information",
+ "Event information": "Event information",
+ "Sender device information": "Sender device information",
+ "Passphrases must match": "Passphrases must match",
+ "Passphrase must not be empty": "Passphrase must not be empty",
+ "Export room keys": "Export room keys",
+ "This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.": "This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.",
+ "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.": "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.",
+ "Enter passphrase": "Enter passphrase",
+ "Confirm passphrase": "Confirm passphrase",
+ "Export": "Export",
+ "Import room keys": "Import room keys",
+ "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.",
+ "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.",
"%(senderName)s added %(count)s %(addedAddresses)s as an address for this room.|one": "%(senderName)s added %(addedAddresses)s as an address for this room.",
"%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|other": "%(senderName)s added %(addedAddresses)s as addresses for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as an address for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
From 003083d9fc54161547f0e64cbd4a8781f4d53a92 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Sun, 16 Sep 2018 20:19:02 +0100
Subject: [PATCH 06/11] fix plurals
---
src/i18n/strings/en_EN.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 6b51a0122a..3de0f2d5c1 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1246,9 +1246,9 @@
"Import room keys": "Import room keys",
"This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.",
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.",
- "%(senderName)s added %(count)s %(addedAddresses)s as an address for this room.|one": "%(senderName)s added %(addedAddresses)s as an address for this room.",
+ "%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|one": "%(senderName)s added %(addedAddresses)s as an address for this room.",
"%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|other": "%(senderName)s added %(addedAddresses)s as addresses for this room.",
- "%(senderName)s removed %(count)s %(removedAddresses)s as an address for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
+ "%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|other": "%(senderName)s removed %(removedAddresses)s as addresses for this room.",
"%(senderName)s changed the addresses of this room.": "%(senderName)s changed the addresses of this room.",
"File to import": "File to import",
From dc7212ec2bd12e1917233ed7153b3e0ef529a135 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Mon, 17 Sep 2018 18:20:12 +0100
Subject: [PATCH 07/11] switch back to simple TextForEvent
I haven't found anyone who can justify to me why we need
more complicated plurals for i18n (even in Polish) for
%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.
---
package.json | 6 ++---
src/TextForEvent.js | 21 ++++++----------
.../views/messages/RoomAliasesEvent.js | 24 ++++++++++++++-----
src/components/views/rooms/EventTile.js | 7 ++++--
src/i18n/strings/en_EN.json | 3 +++
5 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/package.json b/package.json
index 2cbdb98c2e..effa135d72 100644
--- a/package.json
+++ b/package.json
@@ -85,15 +85,15 @@
"react-dom": "^15.6.0",
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef",
"resize-observer-polyfill": "^1.5.0",
+ "sanitize-html": "^1.18.4",
"slate": "0.34.7",
- "slate-react": "^0.12.4",
"slate-html-serializer": "^0.6.1",
"slate-md-serializer": "matrix-org/slate-md-serializer#f7c4ad3",
- "sanitize-html": "^1.18.4",
+ "slate-react": "^0.12.4",
"text-encoding-utf-8": "^1.0.1",
"url": "^0.11.0",
"velocity-vector": "vector-im/velocity#059e3b2",
- "whatwg-fetch": "^1.0.0"
+ "whatwg-fetch": "^1.1.1"
},
"devDependencies": {
"babel-cli": "^6.5.2",
diff --git a/src/TextForEvent.js b/src/TextForEvent.js
index 91ae5d0d70..a17bd7838e 100644
--- a/src/TextForEvent.js
+++ b/src/TextForEvent.js
@@ -199,7 +199,7 @@ function textForMessageEvent(ev) {
}
function textForRoomAliasesEvent(ev) {
- const senderName = event.sender ? event.sender.name : event.getSender();
+ const senderName = ev.sender && ev.sender.name ? ev.sender.name : ev.getSender();
const oldAliases = ev.getPrevContent().aliases || [];
const newAliases = ev.getContent().aliases || [];
@@ -211,13 +211,13 @@ function textForRoomAliasesEvent(ev) {
}
if (addedAliases.length && !removedAliases.length) {
- return _t('%(senderName)s added %(addedAddresses)s as addresses for this room.', {
+ return _t('%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.', {
senderName: senderName,
count: addedAliases.length,
addedAddresses: addedAliases.join(', '),
});
} else if (!addedAliases.length && removedAliases.length) {
- return _t('%(senderName)s removed %(removedAddresses)s as addresses for this room.', {
+ return _t('%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.', {
senderName: senderName,
count: removedAliases.length,
removedAddresses: removedAliases.join(', '),
@@ -228,17 +228,10 @@ function textForRoomAliasesEvent(ev) {
addedAddresses: addedAliases.join(', '),
removedAddresses: removedAliases.join(', '),
};
- /* eslint-disable max-len */
- if (addedAliases.length === 1 && removedAliases.length === 1) {
- return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|one,one', args);
- } else if (addedAliases.length !== 1 && removedAliases.length === 1) {
- return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|other,one', args);
- } else if (addedAliases.length === 1 && removedAliases.length !== 1) {
- return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|one,other', args);
- } else {
- return _t('%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.|other,other', args);
- }
- /* eslint-enable max-len */
+ return _t(
+ '%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.',
+ args,
+ );
}
}
diff --git a/src/components/views/messages/RoomAliasesEvent.js b/src/components/views/messages/RoomAliasesEvent.js
index 7d9b2e6795..f15c5caf49 100644
--- a/src/components/views/messages/RoomAliasesEvent.js
+++ b/src/components/views/messages/RoomAliasesEvent.js
@@ -14,6 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+/****************************************************************
+ ** **
+ ** THIS CLASS IS NOT USED TO RENDER ALIAS CHANGES, IN ORDER **
+ ** TO TRY TO KEEP THINGS SIMPLE AND JUST USE TextualEvent. **
+ ** **
+ ** The code is kept here for ease of reference in future **
+ ** should we need the GenericEventListSummary stuff **
+ ** **
+ ****************************************************************/
+
'use strict';
import React from 'react';
@@ -69,10 +79,8 @@ export class GenericEventListSummary extends React.Component {
let summaryContainer = null;
if (showSummary) {
summaryContainer = (
-
-
- {this.props.summary}
-
+
+ {this.props.summary}
);
}
@@ -140,10 +148,14 @@ export default class RoomAliasesEvent extends React.Component {
const changes = [];
addedAliases.forEach((alias) => {
- changes.push(
Added {alias}
);
+ changes.push(
{_t('%(senderName)s added %(alias)s', {
+ senderName, alias,
+ })}
);
});
removedAliases.forEach((alias) => {
- changes.push(
Removed {alias}
);
+ changes.push(
{_t('%(senderName)s removed %(alias)s', {
+ senderName, alias,
+ })}
);
});
const summary = _t('%(senderName)s changed the addresses of this room.', {senderName});
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index 50e74bc6e4..dd93171e90 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -47,7 +47,8 @@ const eventTileTypes = {
};
const stateEventTileTypes = {
- 'm.room.aliases': 'messages.RoomAliasesEvent',
+ 'm.room.aliases': 'messages.TextualEvent',
+ // 'm.room.aliases': 'messages.RoomAliasesEvent', // too complex
'm.room.create': 'messages.RoomCreate',
'm.room.member': 'messages.TextualEvent',
'm.room.name': 'messages.TextualEvent',
@@ -484,7 +485,9 @@ module.exports = withMatrixClient(React.createClass({
const eventType = this.props.mxEvent.getType();
// Info messages are basically information about commands processed on a room
- const isInfoMessage = (eventType !== 'm.room.message' && eventType !== 'm.sticker' && eventType != 'm.room.create');
+ const isInfoMessage = (
+ eventType !== 'm.room.message' && eventType !== 'm.sticker' && eventType != 'm.room.create'
+ );
const tileHandler = getHandlerTile(this.props.mxEvent);
// This shouldn't happen: the caller should check we support this type
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 3de0f2d5c1..bb48e0325e 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1250,7 +1250,10 @@
"%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.|other": "%(senderName)s added %(addedAddresses)s as addresses for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|other": "%(senderName)s removed %(removedAddresses)s as addresses for this room.",
+ "%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.": "%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.",
"%(senderName)s changed the addresses of this room.": "%(senderName)s changed the addresses of this room.",
+ "%(senderName)s added %(addedAddresses)s": "%(senderName)s added %(addedAddresses)s",
+ "%(senderName)s removed %(addedAddresses)s": "%(senderName)s removed %(addedAddresses)s",
"File to import": "File to import",
"Import": "Import",
"Failed to set direct chat tag": "Failed to set direct chat tag",
From 0e1a814d2302bd2b79a4122aac6b891caf12f689 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Mon, 17 Sep 2018 18:27:17 +0100
Subject: [PATCH 08/11] remove RoomAliasesEvent in favour of simpler textual
event
---
src/TextForEvent.js | 5 +
.../views/messages/RoomAliasesEvent.js | 173 ------------------
2 files changed, 5 insertions(+), 173 deletions(-)
delete mode 100644 src/components/views/messages/RoomAliasesEvent.js
diff --git a/src/TextForEvent.js b/src/TextForEvent.js
index a17bd7838e..6b68941ee3 100644
--- a/src/TextForEvent.js
+++ b/src/TextForEvent.js
@@ -199,6 +199,11 @@ function textForMessageEvent(ev) {
}
function textForRoomAliasesEvent(ev) {
+ // An alternative implementation of this as a first-class event can be found at
+ // https://github.com/matrix-org/matrix-react-sdk/blob/dc7212ec2bd12e1917233ed7153b3e0ef529a135/src/components/views/messages/RoomAliasesEvent.js
+ // This feels a bit overkill though, and it's not clear the i18n really needs it
+ // so instead it's landing as a simple textual event.
+
const senderName = ev.sender && ev.sender.name ? ev.sender.name : ev.getSender();
const oldAliases = ev.getPrevContent().aliases || [];
const newAliases = ev.getContent().aliases || [];
diff --git a/src/components/views/messages/RoomAliasesEvent.js b/src/components/views/messages/RoomAliasesEvent.js
deleted file mode 100644
index f15c5caf49..0000000000
--- a/src/components/views/messages/RoomAliasesEvent.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-Michael Telatynski <7t3chguy@gmail.com>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-/****************************************************************
- ** **
- ** THIS CLASS IS NOT USED TO RENDER ALIAS CHANGES, IN ORDER **
- ** TO TRY TO KEEP THINGS SIMPLE AND JUST USE TextualEvent. **
- ** **
- ** The code is kept here for ease of reference in future **
- ** should we need the GenericEventListSummary stuff **
- ** **
- ****************************************************************/
-
-'use strict';
-
-import React from 'react';
-import PropTypes from 'prop-types';
-import { _t } from '../../../languageHandler';
-
-export class GenericEventListSummary extends React.Component {
- static propTypes = {
- // An summary to display when collapsed
- summary: PropTypes.string.isRequired,
- // whether to show summary whilst children are expanded
- alwaysShowSummary: PropTypes.bool,
- // An array of EventTiles to render when expanded
- children: PropTypes.array.isRequired,
- // Called when the GELS expansion is toggled
- onToggle: PropTypes.func,
- // how many children should cause GELS to act
- threshold: PropTypes.number.isRequired,
- };
-
- static defaultProps = {
- threshold: 1,
- };
-
- constructor(props, context) {
- super(props, context);
- this._toggleSummary = this._toggleSummary.bind(this);
- }
-
- state = {
- expanded: false,
- };
-
- _toggleSummary() {
- this.setState({expanded: !this.state.expanded});
- this.props.onToggle();
- }
-
- render() {
- const fewEvents = this.props.children.length < this.props.threshold;
- const expanded = this.state.expanded || fewEvents;
- const showSummary = !expanded || this.props.alwaysShowSummary;
-
- let expandedEvents = null;
- if (expanded) {
- expandedEvents = this.props.children;
- }
-
- if (fewEvents) {
- return { expandedEvents }
;
- }
-
- let summaryContainer = null;
- if (showSummary) {
- summaryContainer = (
-
- {this.props.summary}
-
- );
- }
- let toggleButton = null;
- if (!fewEvents) {
- toggleButton =
- {expanded ? 'collapse' : 'expand'}
-
;
- }
-
- return (
-
- {toggleButton}
- {summaryContainer}
- {/*{showSummary ?
: null}*/}
- {expandedEvents}
-
- );
- }
-}
-
-export default class RoomAliasesEvent extends React.Component {
- static PropTypes = {
- /* the MatrixEvent to show */
- mxEvent: PropTypes.object.isRequired,
-
- /* the shsape of the tile, used */
- tileShape: PropTypes.string,
- };
-
- getEventTileOps() {
- return this.refs.body && this.refs.body.getEventTileOps ? this.refs.body.getEventTileOps() : null;
- }
-
- render() {
- const senderName = this.props.mxEvent.sender ? this.props.mxEvent.sender.name : this.props.mxEvent.getSender();
- const oldAliases = this.props.mxEvent.getPrevContent().aliases || [];
- const newAliases = this.props.mxEvent.getContent().aliases || [];
-
- const addedAliases = newAliases.filter((x) => !oldAliases.includes(x));
- const removedAliases = oldAliases.filter((x) => !newAliases.includes(x));
-
- if (!addedAliases.length && !removedAliases.length) {
- return '';
- }
-
- if (addedAliases.length && !removedAliases.length) {
- return {_t('%(senderName)s added %(count)s %(addedAddresses)s as addresses for this room.', {
- senderName: senderName,
- count: addedAliases.length,
- addedAddresses: addedAliases.join(', '),
- })}
;
- } else if (!addedAliases.length && removedAliases.length) {
- return {_t('%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.', {
- senderName: senderName,
- count: removedAliases.length,
- removedAddresses: removedAliases.join(', '),
- })}
;
- } else {
- // const args = {
- // senderName: senderName,
- // addedAddresses: addedAliases.join(', '),
- // removedAddresses: removedAliases.join(', '),
- // };
-
- const changes = [];
- addedAliases.forEach((alias) => {
- changes.push({_t('%(senderName)s added %(alias)s', {
- senderName, alias,
- })}
);
- });
- removedAliases.forEach((alias) => {
- changes.push({_t('%(senderName)s removed %(alias)s', {
- senderName, alias,
- })}
);
- });
-
- const summary = _t('%(senderName)s changed the addresses of this room.', {senderName});
- return
- {changes}
- ;
- }
-
- // return ;
- }
-}
From fc81dbbfad36ba91ac4a62e855ca832eb252e69c Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Mon, 17 Sep 2018 22:40:00 +0100
Subject: [PATCH 09/11] remove i18n used by RoomAliasesEvent
---
src/i18n/strings/en_EN.json | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index bb48e0325e..b974e0a96c 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1251,9 +1251,6 @@
"%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|one": "%(senderName)s removed %(removedAddresses)s as an address for this room.",
"%(senderName)s removed %(count)s %(removedAddresses)s as addresses for this room.|other": "%(senderName)s removed %(removedAddresses)s as addresses for this room.",
"%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.": "%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.",
- "%(senderName)s changed the addresses of this room.": "%(senderName)s changed the addresses of this room.",
- "%(senderName)s added %(addedAddresses)s": "%(senderName)s added %(addedAddresses)s",
- "%(senderName)s removed %(addedAddresses)s": "%(senderName)s removed %(addedAddresses)s",
"File to import": "File to import",
"Import": "Import",
"Failed to set direct chat tag": "Failed to set direct chat tag",
From ece041d059dab8d195dec17c77f8035d5f14fb57 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson
Date: Tue, 18 Sep 2018 00:16:25 +0100
Subject: [PATCH 10/11] fix NPE on name (related to LL?)
---
src/components/views/rooms/RoomTile.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js
index d73f9b5ccf..54044e8d65 100644
--- a/src/components/views/rooms/RoomTile.js
+++ b/src/components/views/rooms/RoomTile.js
@@ -273,6 +273,7 @@ module.exports = React.createClass({
});
let name = this.state.roomName;
+ if (name == undefined || name == null) name = '';
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
let badgeContent;
From 8d9850b7e7aa88e7dc927849416b166c92f47fad Mon Sep 17 00:00:00 2001
From: Bruno Windels
Date: Wed, 19 Sep 2018 10:57:47 +0200
Subject: [PATCH 11/11] pass --travis flag to e2e tests to disable tests known
not to work on travis CI because of dinosaur ubuntu version
---
.travis-test-riot.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh
index 876ce207f3..7f2660a906 100755
--- a/.travis-test-riot.sh
+++ b/.travis-test-riot.sh
@@ -34,5 +34,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh
# CHROME_PATH=$(which google-chrome-stable) ./run.sh
./install.sh
-./run.sh
+./run.sh --travis
popd