From 9124c1475aecbe6dd6713e3ec5e2c80c5528c3c9 Mon Sep 17 00:00:00 2001 From: turt2live Date: Mon, 24 Apr 2017 12:48:32 -0600 Subject: [PATCH 01/34] Change redact -> remove to improve clarity Addresses #2814 Non-technical users may not understand what 'redact' means and can more easily understand what 'Remove' does. See discussion on vector-im/riot-web#2814 for more information. Signed-off-by: Travis Ralston --- src/components/views/context_menus/MessageContextMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index db416b8a06..5a7356a11c 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -129,7 +129,7 @@ module.exports = React.createClass({ if (!eventStatus && !this.props.mxEvent.isRedacted()) { // sent and not redacted redactButton = (
- Redact + Remove
); } From aff1e14efc70ab5c2bc86d4d724c604d63806d6b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 May 2017 13:15:14 +0100 Subject: [PATCH 02/34] first go at show redact only if we can redact Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/context_menus/MessageContextMenu.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index db416b8a06..0f750c10a5 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -25,6 +25,11 @@ var Modal = require('matrix-react-sdk/lib/Modal'); var Resend = require("matrix-react-sdk/lib/Resend"); import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; +function parseIntWithDefault(val, def) { + var res = parseInt(val); + return isNaN(res) ? def : res; +} + module.exports = React.createClass({ displayName: 'MessageContextMenu', @@ -126,7 +131,19 @@ module.exports = React.createClass({ ); } - if (!eventStatus && !this.props.mxEvent.isRedacted()) { // sent and not redacted + const cli = MatrixClientPeg.get(); + + const room = cli.getRoom(this.props.mxEvent.getRoomId()); + const powerLevelEvents = room.currentState.getStateEvents('m.room.power_levels', ''); + const powerLevels = powerLevelEvents ? powerLevelEvents.getContent() : {}; + const userLevels = powerLevels.users || {}; + + const userLevel = userLevels[cli.credentials.userId] || parseIntWithDefault(powerLevels.users_default, 0); + + if (!eventStatus && !this.props.mxEvent.isRedacted() && (// sent and not redacted + this.props.mxEvent.getSender() === cli.credentials.userId // own event + || userLevel >= parseIntWithDefault(powerLevels.redact, 50) // has PL to redact + )) { redactButton = (
Redact From d55f4f9e6a3e3a3e1230d97132b22c9ea1aa14c6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 May 2017 14:08:00 +0100 Subject: [PATCH 03/34] use new RoomState method from matrix-org/matrix-js-sdk/pull/435 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/context_menus/MessageContextMenu.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 0f750c10a5..1fab91dde2 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -132,18 +132,9 @@ module.exports = React.createClass({ } const cli = MatrixClientPeg.get(); - const room = cli.getRoom(this.props.mxEvent.getRoomId()); - const powerLevelEvents = room.currentState.getStateEvents('m.room.power_levels', ''); - const powerLevels = powerLevelEvents ? powerLevelEvents.getContent() : {}; - const userLevels = powerLevels.users || {}; - const userLevel = userLevels[cli.credentials.userId] || parseIntWithDefault(powerLevels.users_default, 0); - - if (!eventStatus && !this.props.mxEvent.isRedacted() && (// sent and not redacted - this.props.mxEvent.getSender() === cli.credentials.userId // own event - || userLevel >= parseIntWithDefault(powerLevels.redact, 50) // has PL to redact - )) { + if (!eventStatus && room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId)) { redactButton = (
Redact From db78534b45fff22219a07128d600093dfef7b4b9 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 May 2017 14:10:00 +0100 Subject: [PATCH 04/34] remove no longer required parseIntWithDefault Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/context_menus/MessageContextMenu.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 1fab91dde2..d200f5aedf 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -25,11 +25,6 @@ var Modal = require('matrix-react-sdk/lib/Modal'); var Resend = require("matrix-react-sdk/lib/Resend"); import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; -function parseIntWithDefault(val, def) { - var res = parseInt(val); - return isNaN(res) ? def : res; -} - module.exports = React.createClass({ displayName: 'MessageContextMenu', From 58ada2c27d2d0d3f307545169fff2b317fee0399 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 May 2017 14:14:06 +0100 Subject: [PATCH 05/34] move mxEvent.status check to js-sdk Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/context_menus/MessageContextMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index d200f5aedf..86c1d74a61 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -129,7 +129,7 @@ module.exports = React.createClass({ const cli = MatrixClientPeg.get(); const room = cli.getRoom(this.props.mxEvent.getRoomId()); - if (!eventStatus && room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId)) { + if (room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId)) { redactButton = (
Redact From 61a67c52c555faddccef50f9a38ba451aac43541 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 27 May 2017 20:39:52 +0100 Subject: [PATCH 06/34] initial piwik stuff Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RightPanel.js | 11 ++++++---- src/vector/index.js | 28 +++++++++++++++++++++---- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index c7f5394bf1..8d5fc36e40 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -22,6 +22,7 @@ import sdk from 'matrix-react-sdk'; import Matrix from "matrix-js-sdk"; import dis from 'matrix-react-sdk/lib/dispatcher'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; +import Analytics from 'matrix-react-sdk/lib/Analytics'; import rate_limited_func from 'matrix-react-sdk/lib/ratelimitedfunc'; import Modal from 'matrix-react-sdk/lib/Modal'; import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton'; @@ -61,24 +62,26 @@ module.exports = React.createClass({ return { phase: this.Phase.MemberInfo, member: member, - } - } - else { + }; + } else { return { phase: this.Phase.MemberList - } + }; } }, onMemberListButtonClick: function() { + Analytics.trackEvent('RightPanel', 'memberListButtonClick'); this.setState({ phase: this.Phase.MemberList }); }, onFileListButtonClick: function() { + Analytics.trackEvent('RightPanel', 'fileListButtonClick'); this.setState({ phase: this.Phase.FilePanel }); }, onNotificationListButtonClick: function() { + Analytics.trackEvent('RightPanel', 'notificationListButtonClick'); this.setState({ phase: this.Phase.NotificationPanel }); }, diff --git a/src/vector/index.js b/src/vector/index.js index 14f8bb4b36..d1752356a9 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -56,7 +56,8 @@ if (process.env.NODE_ENV !== 'production') { var RunModernizrTests = require("./modernizr"); // this side-effects a global var ReactDOM = require("react-dom"); var sdk = require("matrix-react-sdk"); -var PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg"); +const PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg"); +const Analytics = require("matrix-react-sdk/lib/Analytics"); sdk.loadSkin(require('../component-index')); var VectorConferenceHandler = require('../VectorConferenceHandler'); var UpdateChecker = require("./updater"); @@ -143,7 +144,7 @@ var onNewScreen = function(screen) { var hash = '#/' + screen; lastLocationHashSet = hash; window.location.hash = hash; -} +}; // We use this to work out what URL the SDK should // pass through when registering to allow the user to @@ -279,6 +280,26 @@ async function loadApp() { } else if (validBrowser) { UpdateChecker.start(); + let doNotTrack = navigator.doNotTrack; + if (typeof navigator.doNotTrack === 'string') { + doNotTrack = navigator.doNotTrack === 'yes'; + } + if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) { + (function() { + const g = document.createElement('script'); + const s = document.getElementsByTagName('script')[0]; + g.type='text/javascript'; g.async=true; g.defer=true; g.src=configJson.piwik.url+'piwik.js'; + + g.onload = function() { + const tracker = window.Piwik.getTracker(configJson.piwik.url+'piwik.php', configJson.piwik.siteId); + console.log('Initialised anonymous analytics'); + Analytics.set(tracker); + }; + + s.parentNode.insertBefore(g, s); + })(); + } + const MatrixChat = sdk.getComponent('structures.MatrixChat'); window.matrixChat = ReactDOM.render( , document.getElementById('matrixchat') ); - } - else { + } else { console.error("Browser is missing required features."); // take to a different landing page to AWOOOOOGA at the user var CompatibilityPage = sdk.getComponent("structures.CompatibilityPage"); From 195fcba69608ce2cb3a6e424de5c194d4e2b54b7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 27 May 2017 20:56:25 +0100 Subject: [PATCH 07/34] correct DNT check Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index d1752356a9..7674dd4789 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -280,10 +280,7 @@ async function loadApp() { } else if (validBrowser) { UpdateChecker.start(); - let doNotTrack = navigator.doNotTrack; - if (typeof navigator.doNotTrack === 'string') { - doNotTrack = navigator.doNotTrack === 'yes'; - } + const doNotTrack = navigator.doNotTrack === 'yes' || navigator.doNotTrack === '1' || navigator.doNotTrack === 1; if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) { (function() { const g = document.createElement('script'); From 2e75640cdde4f790acee7c1ff87778abbacd3dec Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 28 May 2017 11:27:33 +0100 Subject: [PATCH 08/34] sample piwik config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- config.sample.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.sample.json b/config.sample.json index 3c513f7ab2..bf5da247d5 100644 --- a/config.sample.json +++ b/config.sample.json @@ -10,5 +10,9 @@ "servers": [ "matrix.org" ] + }, + "piwik": { + "url": "//piwik.riot.im/", + "siteId": 1 } } From c2c417b207a8ec8356fcff6201439432341e54f8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 28 May 2017 13:07:56 +0100 Subject: [PATCH 09/34] add piwik config to riot.im electron build config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- electron_app/riot.im/config.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json index 80526f4ab8..a31f77e4c5 100644 --- a/electron_app/riot.im/config.json +++ b/electron_app/riot.im/config.json @@ -12,5 +12,9 @@ "servers": [ "matrix.org" ] + }, + "piwik": { + "url": "//piwik.riot.ovh/", + "siteId": 2 } } From 6969baa5a6b7717e1319f24c76d11e109dc3b47a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 28 May 2017 13:08:09 +0100 Subject: [PATCH 10/34] change event wording Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RightPanel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 8d5fc36e40..230572002d 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -71,17 +71,17 @@ module.exports = React.createClass({ }, onMemberListButtonClick: function() { - Analytics.trackEvent('RightPanel', 'memberListButtonClick'); + Analytics.trackEvent('Right Panel', 'Member List Button', 'click'); this.setState({ phase: this.Phase.MemberList }); }, onFileListButtonClick: function() { - Analytics.trackEvent('RightPanel', 'fileListButtonClick'); + Analytics.trackEvent('Right Panel', 'File List Button', 'click'); this.setState({ phase: this.Phase.FilePanel }); }, onNotificationListButtonClick: function() { - Analytics.trackEvent('RightPanel', 'notificationListButtonClick'); + Analytics.trackEvent('Right Panel', 'Notification List Button', 'click'); this.setState({ phase: this.Phase.NotificationPanel }); }, From 28d929f9015c44acec2b47da5b7a7d83bf06a3bb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 28 May 2017 13:10:13 +0100 Subject: [PATCH 11/34] correct electron config to not point at personal piwik Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- electron_app/riot.im/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json index a31f77e4c5..023e6a02e6 100644 --- a/electron_app/riot.im/config.json +++ b/electron_app/riot.im/config.json @@ -14,7 +14,7 @@ ] }, "piwik": { - "url": "//piwik.riot.ovh/", - "siteId": 2 + "url": "//piwik.riot.im/", + "siteId": 1 } } From 00cf1da758070531f42bd420f5dd197aef1ce685 Mon Sep 17 00:00:00 2001 From: Strix Aluco Date: Mon, 29 May 2017 06:57:54 +0000 Subject: [PATCH 12/34] Added translation using Weblate (Ukrainian) --- src/i18n/strings/uk.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/i18n/strings/uk.json diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/i18n/strings/uk.json @@ -0,0 +1 @@ +{} \ No newline at end of file From 3e7ef112f02f1abec561d3e8a3dc29b68cc90ab4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 13:17:12 +0100 Subject: [PATCH 13/34] opt out based on analyticsOptOut localSetting Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 7674dd4789..571fecfa42 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -280,8 +280,8 @@ async function loadApp() { } else if (validBrowser) { UpdateChecker.start(); - const doNotTrack = navigator.doNotTrack === 'yes' || navigator.doNotTrack === '1' || navigator.doNotTrack === 1; - if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) { + const analyticsEnabled = !UserSettingsStore.getLocalSetting('analyticsOptOut', false); + if (analyticsEnabled && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) { (function() { const g = document.createElement('script'); const s = document.getElementsByTagName('script')[0]; From 3e7b738b11a4250dc83b91d4c53bc023bd0c3083 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 14:22:35 +0100 Subject: [PATCH 14/34] move all piwik init stuff to MatrixChat/Analytics as it now relies on SDKConfig Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/index.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 571fecfa42..432710fbc2 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -57,7 +57,6 @@ var RunModernizrTests = require("./modernizr"); // this side-effects a global var ReactDOM = require("react-dom"); var sdk = require("matrix-react-sdk"); const PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg"); -const Analytics = require("matrix-react-sdk/lib/Analytics"); sdk.loadSkin(require('../component-index')); var VectorConferenceHandler = require('../VectorConferenceHandler'); var UpdateChecker = require("./updater"); @@ -280,23 +279,6 @@ async function loadApp() { } else if (validBrowser) { UpdateChecker.start(); - const analyticsEnabled = !UserSettingsStore.getLocalSetting('analyticsOptOut', false); - if (analyticsEnabled && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) { - (function() { - const g = document.createElement('script'); - const s = document.getElementsByTagName('script')[0]; - g.type='text/javascript'; g.async=true; g.defer=true; g.src=configJson.piwik.url+'piwik.js'; - - g.onload = function() { - const tracker = window.Piwik.getTracker(configJson.piwik.url+'piwik.php', configJson.piwik.siteId); - console.log('Initialised anonymous analytics'); - Analytics.set(tracker); - }; - - s.parentNode.insertBefore(g, s); - })(); - } - const MatrixChat = sdk.getComponent('structures.MatrixChat'); window.matrixChat = ReactDOM.render( Date: Mon, 29 May 2017 13:13:56 +0000 Subject: [PATCH 15/34] Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ --- src/i18n/strings/de_DE.json | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index d030e29d1a..cbe617b20c 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -5,15 +5,15 @@ "Files": "Dateien", "Notifications": "Benachrichtigungen", "Invite to this room": "In diesen Raum einladen", - "Filter room names": "Raum Namen filtern", + "Filter room names": "Raum-Namen filtern", "Start chat": "Neuen Chat starten", "Room directory": "Raum-Verzeichnis", "Create new room": "Neuen Raum erstellen", "Settings": "Einstellungen", - "powered by Matrix": "gebaut mit Matrix", + "powered by Matrix": "basierend auf Matrix", "Custom Server Options": "Optionen für eigenen Server", "Dismiss": "ausblenden", - "Failed to get protocol list from Home Server": "Fehler beim Abrufen der Protokollliste vom Home Server", + "Failed to get protocol list from Home Server": "Fehler beim Abrufen der Protokoll-Liste vom Home-Server", "The Home Server may be too old to support third party networks": "Der Home-Server ist eventuell zu alt, um Drittanbieter-Netzwerke zu unterstützen", "Directory": "Raum Verzeichnis", "#example:": "#beispiel:", @@ -21,25 +21,25 @@ "No rooms to show": "Keine Räume zum anzeigen", "World readable": "Jeder kann lesen", "Guests can join": "Gäste können beitreten", - "You are not receiving desktop notifications": "Du erhältst keine Desktop Benachrichtigungen", + "You are not receiving desktop notifications": "Du erhältst keine Desktop-Benachrichtigungen", "Enable them now": "Aktiviere diese jetzt", "Add an email address above to configure email notifications": "Füge eine E-Mail Adresse hinzu um Benachrichtigungen via E-Mail zu erhalten", "All notifications are currently disabled for all targets.": "Im Moment sind alle Benachrichtigungen für alle Ziele deaktiviert.", - "An error occurred whilst saving your email notification preferences.": "Ein Fehler trat auf während deine E-Mail Einstellungen gespeichert wurden.", + "An error occurred whilst saving your email notification preferences.": "Beim Speichern deiner E-Mail-Benachrichtigungseinstellungen ist ein Fehler aufgetreten.", "and remove": "und entfernen", "Can't update user notification settings": "Kann Benutzerdefinierte Einstellungen nicht aktualisieren", - "Couldn't find a matching Matrix room": "Kann keinen entsprechenden Matrix Raum finden", + "Couldn't find a matching Matrix room": "Konnte keinen entsprechenden Matrix-Raum finden", "delete the alias": "Lösche den Alias", "Delete the room alias": "Lösche den Raum Alias", "Direct Chat": "Privater Chat", "Drop here to": "Hier ablegen", - "Enable audible notifications in web client": "Aktiviere Audio Benachrichtigungen", - "Enable desktop notifications": "Aktiviere Desktop Benachrichtigungen", + "Enable audible notifications in web client": "Audio-Benachrichtigungen im Web-Client aktivieren", + "Enable desktop notifications": "Desktop-Benachrichtigungen aktivieren", "Enable email notifications": "Aktiviere E-Mail Benachrichtigungen", "Enable notifications for this account": "Aktiviere Benachrichtigungen für diesen Benutzer", - "Enter keywords separated by a comma:": "Trage Schlagworte, mit Komma getrennt, ein", + "Enter keywords separated by a comma:": "Kommagetrennte Schlagworte eingeben:", "Error": "Fehler", - "Error saving email notification preferences": "Fehler beim Speichern der E-Mail Benachrichtigungseinstellungen", + "Error saving email notification preferences": "Fehler beim Speichern der E-Mail-Benachrichtigungseinstellungen", "#example": "#Beispiel", "Failed to": "Konnte nicht", "Failed to add tag ": "Konnte Tag nicht hinzufügen ", @@ -55,18 +55,18 @@ "from the directory": "aus dem Verzeichnis", " from room": " aus dem Raum", "Guest users can't invite users. Please register to invite": "Gastnutzer können keine Nutzer einladen. Bitte registriere dich um Nutzer einzuladen", - "Keywords": "Suchbegriff", + "Keywords": "Schlüsselwörter", "Leave": "Verlassen", "Low Priority": "Niedrige Priorität", "Noisy": "Laut", - "Notification targets": "Benachrichtigungsziel", + "Notification targets": "Benachrichtigungsziele", "Notifications on the following keywords follow rules which can’t be displayed here:": "Benachrichtigungen zu folgenden Stichwörtern folgen Regeln, die hier nicht angezeigt werden können:", - "Notify for all other messages/rooms": "Benachrichtigung für alle anderen Mitteilungen/ Räume", + "Notify for all other messages/rooms": "Benachrichtigungen für alle anderen Mitteilungen/Räume aktivieren", "Operation failed": "Aktion fehlgeschlagen", "Reject": "ablehnen", - "Remove": "Entferne", + "Remove": "Entfernen", "remove": "Entferner", - "Remove from Directory": "Vom Raum Verzeichnis entfernen", + "Remove from Directory": "Aus dem Raum-Verzeichnis entfernen", "Riot does not know how to join a room on this network": "Riot weiß nicht, wie es einem Raum auf diesem Netzwerk beitreten soll", "Room not found": "Raum nicht gefunden", "There are advanced notifications which are not shown here": "Es existieren erweiterte Benachrichtigungen, welche hier nicht angezeigt werden", @@ -79,9 +79,9 @@ "Notify me for anything else": "Benachrichtige mich für alles andere", "Off": "Aus", "On": "An", - "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "Du hast sie eventuell auf einem anderen Client als Riot konfiguriert. Sie sind in Riot nicht anpassbar gelten aber trotzdem", + "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "Du hast sie eventuell auf einem anderen Client als Riot konfiguriert. Sie können in Riot nicht verändert werden, gelten aber trotzdem", " to room": " an Raum", - "Drop here %(toAction)s": "%(toAction)s hierher ziehen", + "Drop here %(toAction)s": "Hierher ziehen: %(toAction)s", "All messages": "Alle Nachrichten", "All messages (loud)": "Alle Nachrichten (laut)", "Cancel Sending": "Senden abbrechen", @@ -107,7 +107,7 @@ "View Decrypted Source": "Entschlüsselten Quellcode ansehen", "View Source": "Quellcode ansehen", "You cannot delete this image. (%(code)s)": "Das Bild kann nicht gelöscht werden. (%(code)s)", - "You cannot delete this message. (%(code)s)": "Die Nachricht kann nicht gelöscht werden. (%(code)s)", + "You cannot delete this message. (%(code)s)": "Diese Nachricht kann nicht gelöscht werden. (%(code)s)", "Today": "Heute", "Wednesday": "Mittwoch", "Thursday": "Donnerstag", @@ -122,10 +122,10 @@ "Call invitation": "Anruf-Einladung", "Messages containing my display name": "Nachrichten, die meinen Anzeigenamen enthalten", "Messages containing my user name": "Nachrichten, die meinen Nutzernamen enthalten", - "Messages in group chats": "Nachrichten in Chat-Gruppen", + "Messages in group chats": "Nachrichten in Gruppen-Chats", "Messages in one-to-one chats": "Nachrichten in Eins-zu-Eins-Chats", "Messages sent by bot": "Nachrichten von Bots", "more": "mehr", "When I'm invited to a room": "Wenn ich in einen Raum eingeladen werde", - "customServer_text": "Du kannst die erweiterten Server-Optioen nutzen um dich an anderen Matrix-Servern mittels anderer Heimserver-URL anzumelden.
Dies erlaubt dir Riot mit einem existierendem Konto auf einem anderen Heimserver zu nutzen.

Du kannst auch einen benutzerdefinierten Identitäts-Server setzen, aber du wirst dann nicht in der Lage sein, Nutzer per E-Mail-Adresse einzuladen oder selbst mit E-Mail-Adresse eingeladen zu werden." + "customServer_text": "Du kannst die erweiterten Server-Optionen nutzen, um dich auf anderen Matrix-Servern anzumelden, indem du eine andere Heimserver-URL eingibst.
Dies ermöglicht es dir, Riot mit einem bereits existierenden Matrix-Konto auf einem anderen Heimserver zu nutzen.

Du kannst auch einen benutzerdefinierten Identitäts-Server eingeben, allerdings wirst du dann nicht in der Lage sein, andere Benutzer per E-Mail-Adresse einzuladen oder selbst Einladungen per E-Mail-Adresse zu erhalten." } From 8ef7dda7bd6bc6d1760b0ddad0676cab6652c53f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 29 May 2017 16:43:28 +0100 Subject: [PATCH 16/34] fixing missing OK button on TextInputDialog --- src/components/views/settings/Notifications.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 11948acebe..74b9c24a74 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -178,6 +178,7 @@ module.exports = React.createClass({ Modal.createDialog(TextInputDialog, { title: _t('Keywords'), description: _t('Enter keywords separated by a comma:'), + button: _t('OK'), value: keywords, onFinished: function onFinished(should_leave, newValue) { From dda73cecf9d574c332b7163168bb4190d2049504 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 19:12:04 +0100 Subject: [PATCH 17/34] make eslint happy about MatrixToolbar Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/globals/MatrixToolbar.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/views/globals/MatrixToolbar.js b/src/components/views/globals/MatrixToolbar.js index 6d47ad1b9e..488b5def47 100644 --- a/src/components/views/globals/MatrixToolbar.js +++ b/src/components/views/globals/MatrixToolbar.js @@ -16,11 +16,10 @@ limitations under the License. 'use strict'; -var React = require('react'); +import React from 'react'; import { _t } from 'matrix-react-sdk/lib/languageHandler'; -var Notifier = require("matrix-react-sdk/lib/Notifier"); -var sdk = require('matrix-react-sdk') -var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton'); +import Notifier from 'matrix-react-sdk/lib/Notifier'; +import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton'; module.exports = React.createClass({ displayName: 'MatrixToolbar', @@ -43,5 +42,5 @@ module.exports = React.createClass({
); - } + }, }); From 8a59acb5c3308a1df4e76af5e01915d1d3d2d852 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 19:32:44 +0100 Subject: [PATCH 18/34] explicit protocol in configs, otherwise breaks in Electron when it tries file:// Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- config.sample.json | 2 +- electron_app/riot.im/config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.sample.json b/config.sample.json index bf5da247d5..c9b3d65b0f 100644 --- a/config.sample.json +++ b/config.sample.json @@ -12,7 +12,7 @@ ] }, "piwik": { - "url": "//piwik.riot.im/", + "url": "https://piwik.riot.im/", "siteId": 1 } } diff --git a/electron_app/riot.im/config.json b/electron_app/riot.im/config.json index 023e6a02e6..1303985ecd 100644 --- a/electron_app/riot.im/config.json +++ b/electron_app/riot.im/config.json @@ -14,7 +14,7 @@ ] }, "piwik": { - "url": "//piwik.riot.im/", + "url": "https://piwik.riot.im/", "siteId": 1 } } From e991461e8dcb379613606afc167322bbc01527cb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 19:51:28 +0100 Subject: [PATCH 19/34] add new BasePlatform method, Analytics fun on the Webpack train Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 4 ++++ src/vector/platform/VectorBasePlatform.js | 4 ++++ src/vector/platform/WebPlatform.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index bf930a674f..a12de530ba 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -67,6 +67,10 @@ export default class ElectronPlatform extends VectorBasePlatform { dis.register(_onAction); } + getHumanReadableName() { + return 'Electron Platform'; + } + setNotificationCount(count: number) { if (this.notificationCount === count) return; super.setNotificationCount(count); diff --git a/src/vector/platform/VectorBasePlatform.js b/src/vector/platform/VectorBasePlatform.js index 00c9c47c30..4ff3c222f2 100644 --- a/src/vector/platform/VectorBasePlatform.js +++ b/src/vector/platform/VectorBasePlatform.js @@ -35,6 +35,10 @@ export default class VectorBasePlatform extends BasePlatform { this._updateFavicon(); } + getHumanReadableName() { + return 'Vector Base Platform'; + } + _updateFavicon() { try { // This needs to be in in a try block as it will throw diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index cdff7344a6..1db024edd3 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -31,6 +31,10 @@ export default class WebPlatform extends VectorBasePlatform { this.runningVersion = null; } + getHumanReadableName() { + return 'Web Platform'; + } + /** * Returns true if the platform supports displaying * notifications, otherwise false. From b9ec25b32f53659f4b35e0ed348838e62badcb0b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 20:03:21 +0100 Subject: [PATCH 20/34] add flow annotation Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 2 +- src/vector/platform/VectorBasePlatform.js | 2 +- src/vector/platform/WebPlatform.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index a12de530ba..13604cdabe 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -67,7 +67,7 @@ export default class ElectronPlatform extends VectorBasePlatform { dis.register(_onAction); } - getHumanReadableName() { + getHumanReadableName(): string { return 'Electron Platform'; } diff --git a/src/vector/platform/VectorBasePlatform.js b/src/vector/platform/VectorBasePlatform.js index 4ff3c222f2..04caecdc2d 100644 --- a/src/vector/platform/VectorBasePlatform.js +++ b/src/vector/platform/VectorBasePlatform.js @@ -35,7 +35,7 @@ export default class VectorBasePlatform extends BasePlatform { this._updateFavicon(); } - getHumanReadableName() { + getHumanReadableName(): string { return 'Vector Base Platform'; } diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index 1db024edd3..1a3c46fb0b 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -31,7 +31,7 @@ export default class WebPlatform extends VectorBasePlatform { this.runningVersion = null; } - getHumanReadableName() { + getHumanReadableName(): string { return 'Web Platform'; } From 17c4e7a748b5080ab25f3646b8860a75492a4b89 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 23:49:56 +0100 Subject: [PATCH 21/34] check PL on change as well as on comp load, that way it'll show remove button if PL increases later. Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/context_menus/MessageContextMenu.js | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 00fa18f6a8..56758b2f30 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -40,6 +40,31 @@ module.exports = React.createClass({ onFinished: React.PropTypes.func, }, + getInitialState: function() { + return { + canRedact: false, + }; + }, + + componentWillMount: function() { + MatrixClientPeg.get().on('RoomMember.powerLevel', this._checkCanRedact); + this._checkCanRedact(); + }, + + componentWillUnmount: function() { + const cli = MatrixClientPeg.get(); + if (cli) { + cli.removeListener('RoomMember.powerLevel', this._checkCanRedact); + } + }, + + _checkCanRedact: function() { + const cli = MatrixClientPeg.get(); + const room = cli.getRoom(this.props.mxEvent.getRoomId()); + const canRedact = room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId); + this.setState({canRedact}); + }, + onResendClick: function() { Resend.resend(this.props.mxEvent); if (this.props.onFinished) this.props.onFinished(); @@ -136,10 +161,7 @@ module.exports = React.createClass({ ); } - const cli = MatrixClientPeg.get(); - const room = cli.getRoom(this.props.mxEvent.getRoomId()); - - if (room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId)) { + if (this.state.canRedact) { redactButton = (
{ _t('Remove') } @@ -209,7 +231,7 @@ module.exports = React.createClass({ externalURLButton = (
{ _t('Source URL') } + rel="noopener" target="_blank" onClick={ this.closeMenu }>{ _t('Source URL') }
); } From b3426a1268dbe6ecaa2b60f970302cff7a829a60 Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 30 May 2017 05:00:36 +0200 Subject: [PATCH 22/34] Update from Weblate. (#4064) * Added translation using Weblate (Ukrainian) * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ --- src/i18n/strings/de_DE.json | 40 ++++++++++++++++++------------------- src/i18n/strings/uk.json | 1 + 2 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 src/i18n/strings/uk.json diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index d030e29d1a..cbe617b20c 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -5,15 +5,15 @@ "Files": "Dateien", "Notifications": "Benachrichtigungen", "Invite to this room": "In diesen Raum einladen", - "Filter room names": "Raum Namen filtern", + "Filter room names": "Raum-Namen filtern", "Start chat": "Neuen Chat starten", "Room directory": "Raum-Verzeichnis", "Create new room": "Neuen Raum erstellen", "Settings": "Einstellungen", - "powered by Matrix": "gebaut mit Matrix", + "powered by Matrix": "basierend auf Matrix", "Custom Server Options": "Optionen für eigenen Server", "Dismiss": "ausblenden", - "Failed to get protocol list from Home Server": "Fehler beim Abrufen der Protokollliste vom Home Server", + "Failed to get protocol list from Home Server": "Fehler beim Abrufen der Protokoll-Liste vom Home-Server", "The Home Server may be too old to support third party networks": "Der Home-Server ist eventuell zu alt, um Drittanbieter-Netzwerke zu unterstützen", "Directory": "Raum Verzeichnis", "#example:": "#beispiel:", @@ -21,25 +21,25 @@ "No rooms to show": "Keine Räume zum anzeigen", "World readable": "Jeder kann lesen", "Guests can join": "Gäste können beitreten", - "You are not receiving desktop notifications": "Du erhältst keine Desktop Benachrichtigungen", + "You are not receiving desktop notifications": "Du erhältst keine Desktop-Benachrichtigungen", "Enable them now": "Aktiviere diese jetzt", "Add an email address above to configure email notifications": "Füge eine E-Mail Adresse hinzu um Benachrichtigungen via E-Mail zu erhalten", "All notifications are currently disabled for all targets.": "Im Moment sind alle Benachrichtigungen für alle Ziele deaktiviert.", - "An error occurred whilst saving your email notification preferences.": "Ein Fehler trat auf während deine E-Mail Einstellungen gespeichert wurden.", + "An error occurred whilst saving your email notification preferences.": "Beim Speichern deiner E-Mail-Benachrichtigungseinstellungen ist ein Fehler aufgetreten.", "and remove": "und entfernen", "Can't update user notification settings": "Kann Benutzerdefinierte Einstellungen nicht aktualisieren", - "Couldn't find a matching Matrix room": "Kann keinen entsprechenden Matrix Raum finden", + "Couldn't find a matching Matrix room": "Konnte keinen entsprechenden Matrix-Raum finden", "delete the alias": "Lösche den Alias", "Delete the room alias": "Lösche den Raum Alias", "Direct Chat": "Privater Chat", "Drop here to": "Hier ablegen", - "Enable audible notifications in web client": "Aktiviere Audio Benachrichtigungen", - "Enable desktop notifications": "Aktiviere Desktop Benachrichtigungen", + "Enable audible notifications in web client": "Audio-Benachrichtigungen im Web-Client aktivieren", + "Enable desktop notifications": "Desktop-Benachrichtigungen aktivieren", "Enable email notifications": "Aktiviere E-Mail Benachrichtigungen", "Enable notifications for this account": "Aktiviere Benachrichtigungen für diesen Benutzer", - "Enter keywords separated by a comma:": "Trage Schlagworte, mit Komma getrennt, ein", + "Enter keywords separated by a comma:": "Kommagetrennte Schlagworte eingeben:", "Error": "Fehler", - "Error saving email notification preferences": "Fehler beim Speichern der E-Mail Benachrichtigungseinstellungen", + "Error saving email notification preferences": "Fehler beim Speichern der E-Mail-Benachrichtigungseinstellungen", "#example": "#Beispiel", "Failed to": "Konnte nicht", "Failed to add tag ": "Konnte Tag nicht hinzufügen ", @@ -55,18 +55,18 @@ "from the directory": "aus dem Verzeichnis", " from room": " aus dem Raum", "Guest users can't invite users. Please register to invite": "Gastnutzer können keine Nutzer einladen. Bitte registriere dich um Nutzer einzuladen", - "Keywords": "Suchbegriff", + "Keywords": "Schlüsselwörter", "Leave": "Verlassen", "Low Priority": "Niedrige Priorität", "Noisy": "Laut", - "Notification targets": "Benachrichtigungsziel", + "Notification targets": "Benachrichtigungsziele", "Notifications on the following keywords follow rules which can’t be displayed here:": "Benachrichtigungen zu folgenden Stichwörtern folgen Regeln, die hier nicht angezeigt werden können:", - "Notify for all other messages/rooms": "Benachrichtigung für alle anderen Mitteilungen/ Räume", + "Notify for all other messages/rooms": "Benachrichtigungen für alle anderen Mitteilungen/Räume aktivieren", "Operation failed": "Aktion fehlgeschlagen", "Reject": "ablehnen", - "Remove": "Entferne", + "Remove": "Entfernen", "remove": "Entferner", - "Remove from Directory": "Vom Raum Verzeichnis entfernen", + "Remove from Directory": "Aus dem Raum-Verzeichnis entfernen", "Riot does not know how to join a room on this network": "Riot weiß nicht, wie es einem Raum auf diesem Netzwerk beitreten soll", "Room not found": "Raum nicht gefunden", "There are advanced notifications which are not shown here": "Es existieren erweiterte Benachrichtigungen, welche hier nicht angezeigt werden", @@ -79,9 +79,9 @@ "Notify me for anything else": "Benachrichtige mich für alles andere", "Off": "Aus", "On": "An", - "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "Du hast sie eventuell auf einem anderen Client als Riot konfiguriert. Sie sind in Riot nicht anpassbar gelten aber trotzdem", + "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "Du hast sie eventuell auf einem anderen Client als Riot konfiguriert. Sie können in Riot nicht verändert werden, gelten aber trotzdem", " to room": " an Raum", - "Drop here %(toAction)s": "%(toAction)s hierher ziehen", + "Drop here %(toAction)s": "Hierher ziehen: %(toAction)s", "All messages": "Alle Nachrichten", "All messages (loud)": "Alle Nachrichten (laut)", "Cancel Sending": "Senden abbrechen", @@ -107,7 +107,7 @@ "View Decrypted Source": "Entschlüsselten Quellcode ansehen", "View Source": "Quellcode ansehen", "You cannot delete this image. (%(code)s)": "Das Bild kann nicht gelöscht werden. (%(code)s)", - "You cannot delete this message. (%(code)s)": "Die Nachricht kann nicht gelöscht werden. (%(code)s)", + "You cannot delete this message. (%(code)s)": "Diese Nachricht kann nicht gelöscht werden. (%(code)s)", "Today": "Heute", "Wednesday": "Mittwoch", "Thursday": "Donnerstag", @@ -122,10 +122,10 @@ "Call invitation": "Anruf-Einladung", "Messages containing my display name": "Nachrichten, die meinen Anzeigenamen enthalten", "Messages containing my user name": "Nachrichten, die meinen Nutzernamen enthalten", - "Messages in group chats": "Nachrichten in Chat-Gruppen", + "Messages in group chats": "Nachrichten in Gruppen-Chats", "Messages in one-to-one chats": "Nachrichten in Eins-zu-Eins-Chats", "Messages sent by bot": "Nachrichten von Bots", "more": "mehr", "When I'm invited to a room": "Wenn ich in einen Raum eingeladen werde", - "customServer_text": "Du kannst die erweiterten Server-Optioen nutzen um dich an anderen Matrix-Servern mittels anderer Heimserver-URL anzumelden.
Dies erlaubt dir Riot mit einem existierendem Konto auf einem anderen Heimserver zu nutzen.

Du kannst auch einen benutzerdefinierten Identitäts-Server setzen, aber du wirst dann nicht in der Lage sein, Nutzer per E-Mail-Adresse einzuladen oder selbst mit E-Mail-Adresse eingeladen zu werden." + "customServer_text": "Du kannst die erweiterten Server-Optionen nutzen, um dich auf anderen Matrix-Servern anzumelden, indem du eine andere Heimserver-URL eingibst.
Dies ermöglicht es dir, Riot mit einem bereits existierenden Matrix-Konto auf einem anderen Heimserver zu nutzen.

Du kannst auch einen benutzerdefinierten Identitäts-Server eingeben, allerdings wirst du dann nicht in der Lage sein, andere Benutzer per E-Mail-Adresse einzuladen oder selbst Einladungen per E-Mail-Adresse zu erhalten." } diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/i18n/strings/uk.json @@ -0,0 +1 @@ +{} \ No newline at end of file From 83926eefce313ad3a4b652e93e696b5ee1ec565c Mon Sep 17 00:00:00 2001 From: Bhuvan Krishna Date: Tue, 30 May 2017 12:22:01 +0000 Subject: [PATCH 23/34] Added translation using Weblate (Telugu) --- src/i18n/strings/de_DE.json | 2 +- src/i18n/strings/es.json | 8 ++++---- src/i18n/strings/fr.json | 15 +++++++-------- src/i18n/strings/pt_BR.json | 7 ++++--- src/i18n/strings/te.json | 1 + 5 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 src/i18n/strings/te.json diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index cbe617b20c..f9deef5b32 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -91,7 +91,7 @@ "Failed to add tag %(tagName)s to room": "Das Hinzufügen des Tags %(tagName)s für den Raum ist fehlgeschlagen", "Failed to forget room %(errCode)s": "Das Entfernen des Raums %(errCode)s aus deiner Liste ist fehlgeschlagen", "Failed to remove tag %(tagName)s from room": "Das Entfernen des Tags %(tagName)s für den Raum ist fehlgeschlagen", - "Failed to set direct chat tag": "Fehler beim setzen der Direct Chat Kennzeichnung", + "Failed to set direct chat tag": "Fehler beim Setzen der \"Direkter Chat\"-Kennzeichnung", "Mentions only": "Nur, wenn du erwähnt wirst", "Mute": "Stummschalten", "Permalink": "Permanenter Link", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index beef27c12f..616d628dae 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -13,10 +13,10 @@ "customServer_text": "Puedes utilizar las opciones de servidor personalizadas para iniciar sesión en otros servidores Matrix especificando una URL de Home server distinta.
Esto te permite usar Riot con una cuenta Matrix existente en un Home server distinto.

También puedes configurar un servidor de identidad personalizado, pero no podrás invitar usuarios por dirección de email, ni ser invitado por email por ti mismo.", "delete the alias": "borrar el alias", "Delete the room alias %(alias)s and remove %(name)s from the directory?": "¿Borrar la sala alias %(alias)s y retirar %(name)s del directorio?", - "Direct Chat": "Chat Directo", + "Direct Chat": "Conversación directa", "Directory": "Directorio", "Download this file": "Descargar este archivo", - "Drop here %(toAction)s": "Soltar aquí %(toAction)s", + "Drop here %(toAction)s": "Suelta aquí para %(toAction)s", "Enable audible notifications in web client": "Habilitar notificaciones audibles en el cliente web", "Enable desktop notifications": "Habilitar notificaciones de escritorio", "Enable email notifications": "Habilitar notificaciones por email", @@ -28,11 +28,11 @@ "#example": "#ejemplo", "Failed to add tag %(tagName)s to room": "Error al añadir la etiqueta %(tagName)s a la sala", "Failed to change settings": "Error al cambiar la configuración", - "Failed to forget room %(errCode)s": "No se pudo olvidar la habitación %(errCode)s", + "Failed to forget room %(errCode)s": "Falló al olvidar la sala %(errCode)s", "Failed to update keywords": "Error al actualizar las palabras clave", "Failed to get protocol list from Home Server": "Error al obtener la lista de protocolos de Home Server", "Failed to get public room list": "No se pudo obtener la lista de salas públicas", - "Failed to join the room": "No se puede unir a la habitación", + "Failed to join the room": "Falló al unirse a la sala", "Failed to remove tag %(tagName)s from room": "Error al eliminar la etiqueta %(tagName)s de la sala", "Failed to set direct chat tag": "Error al establecer la etiqueta de chat directo", "Failed to set Direct Message status of room": "No se pudo establecer el estado de Mensaje Directo de la sala", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index dfd38e868a..08d578a55c 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -3,7 +3,7 @@ "All messages": "Tous les messages", "All messages (loud)": "Tous les messages (fort)", "All notifications are currently disabled for all targets.": "Toutes les notifications sont désactivées pour tous les appareils.", - "An error occurred whilst saving your email notification preferences.": "Une erreur est survenue lors de la sauvegarde de vos préférences de notifications par e-mail", + "An error occurred whilst saving your email notification preferences.": "Une erreur est survenue lors de la sauvegarde de vos préférences de notifications mail.", "Cancel Sending": "Annuler l'envoi", "Can't update user notification settings": "Impossible de mettre à jour les notifications utilisateur", "Close": "Fermer", @@ -67,10 +67,10 @@ "Failed to set Direct Message status of room": "Échec de la configuration de l'état de Message Direct du salon", "Fetching third party location failed": "Échec de la récupération de la localisation tierce", "Files": "Fichiers", - "Filter room names": "Filtrer les noms des salons", + "Filter room names": "Filtrer les salons par nom", "Forget": "Oublier", " from room": " du salon", - "Guest users can't invite users. Please register to invite": "Les invités ne peuvent démarrer une discussion. Merci de vous enregistrer pour pouvoir démarrer une discussion", + "Guest users can't invite users. Please register to invite": "Les visiteurs ne peuvent démarrer une discussion. Merci de vous enregistrer pour pouvoir démarrer une discussion", "Invite to this room": "Inviter dans ce salon", "Keywords": "Mots-clés", "Leave": "Quitter", @@ -83,7 +83,7 @@ "Messages in one-to-one chats": "Messages dans les conversations directes", "Messages sent by bot": "Messages envoyés par des robots", "more": "plus", - "Mute": "Muet", + "Mute": "Couper le son", "No rooms to show": "Aucun salon à afficher", "Noisy": "Sonore", "Notification targets": "Appareils recevant les notifications", @@ -104,7 +104,7 @@ "The Home Server may be too old to support third party networks": "Le Home Server semble trop ancien pour supporter des réseaux tiers", "There are advanced notifications which are not shown here": "Il existe une configuration avancée des notifications qui ne peut être affichée ici", "The server may be unavailable or overloaded": "Le serveur est indisponible ou surchargé", - "This room is inaccessible to guests. You may be able to join if you register": "Ce salon n'est pas ouvert aux invités. Vous pourrez peut-être le rejoindre si vous vous enregistrez", + "This room is inaccessible to guests. You may be able to join if you register": "Ce salon n'est pas ouvert aux visiteurs. Vous pourrez peut-être le rejoindre si vous vous enregistrez", "Unable to fetch notification target list": "Impossible de récupérer la liste des appareils recevant les notifications", "Unable to join network": "Impossible de rejoindre le réseau", "Unable to look up room ID from server": "Impossible de récupérer l'ID du salon sur le serveur", @@ -115,10 +115,9 @@ "When I'm invited to a room": "Quand je suis invité dans un salon", "World readable": "Visible par tout le monde", "You might have configured them in a client other than Riot. You cannot tune them in Riot but they still apply": "Vous les avez probablement configurées dans un autre client que Riot. Vous ne pouvez pas les configurer dans Riot mais elles s'appliquent quand même", - "Guests can join": "Ouvert aux invités", + "Guests can join": "Ouvert aux visiteurs", " to room": " au salon", "Advanced notification settings": "Paramètres de notifications avancés", - "An error occurred whilst saving your email notification preferences.": "Une erreur est survenue lors de la sauvegarde de vos préférences de notifications mail.", - "customServer_text": "Vous pouvez utiliser l'option de serveur personnalisé pour vous connectez à d'autres serveurs Matrix, en spécifiant une adresse différente pour Home serveur.
Cela permet d'utiliser Riot avec un compte existant sur un Home serveur différent.

Vous pouvez aussi indiquer un serveur d'identité personnel mais vous ne pourrez plus inviter des utilisateurs par email, ou être invité par email.", + "customServer_text": "Vous pouvez utiliser l'option de serveur personnalisé pour vous connectez à d'autres serveurs Matrix, en spécifiant une adresse de homerserver différente.
Cela permet d'utiliser Riot avec un compte existant sur un homeserverdifférent.

Vous pouvez aussi indiquer un serveur d'identité personnel mais vous ne pourrez plus inviter des utilisateurs par email, ou être invité par email.", "Notifications on the following keywords follow rules which can’t be displayed here:": "Les notifications pour les mots clés suivant répondent à des critères qui ne peuvent pas être affichés ici :" } diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 545ed11a3d..a4297ad9d2 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2,7 +2,7 @@ "Add an email address above to configure email notifications": "Insira um endereço de email no campo acima para configurar suas notificações por email", "All messages": "Todas as mensagens", "All messages (loud)": "Todas as mensagens (alto)", - "All notifications are currently disabled for all targets.": "Todas as notificações estão atualmente desativadas para todos os destinos", + "All notifications are currently disabled for all targets.": "Todas as notificações estão atualmente desabilitadas para todos os destinatários.", "An error occurred whilst saving your email notification preferences.": "Um erro ocorreu enquanto o sistema estava salvando suas preferências de notificação por email.", "Call invitation": "Convite para chamada", "Cancel Sending": "Cancelar o envio", @@ -116,8 +116,9 @@ "Saturday": "Sábado", "Today": "Hoje", "Yesterday": "Ontem", - "All notifications are currently disabled for all targets.": "Todas as notificações estão atualmente desabilitadas para todos os destinatários.", "#example": "#exemplo", "Failed to remove tag %(tagName)s from room": "Não foi possível remover a marcação %(tagName)s desta sala", - "Welcome page": "Página de boas vindas" + "Welcome page": "Página de boas vindas", + "Advanced notification settings": "Configurações avançadas de notificação", + "customServer_text": "Você pode usar as opções de servidor personalizado para entrar em outros servidores Matrix, especificando uma URL de outro Servidor de Base. Isso permite que você use Riot com uma conta Matrix que exista em outro Servidor de Base. Você também pode configurar um servidor de Identidade personalizado, mas neste caso não poderá convidar usuárias(os) pelo endereço de e-mail, ou ser convidado(a) pelo seu endereço de e-mail." } diff --git a/src/i18n/strings/te.json b/src/i18n/strings/te.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/i18n/strings/te.json @@ -0,0 +1 @@ +{} \ No newline at end of file From e15d070e8fe4f442c159876d04595b92cfa63374 Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 30 May 2017 13:11:04 +0000 Subject: [PATCH 24/34] [WEBLATE] fix issues. --- .../views/context_menus/MessageContextMenu.js | 31 +++++++++++++++++-- .../views/settings/Notifications.js | 1 + src/i18n/strings/pt.json | 1 - src/i18n/strings/pt_BR.json | 1 - 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index e135557209..56758b2f30 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -40,6 +40,31 @@ module.exports = React.createClass({ onFinished: React.PropTypes.func, }, + getInitialState: function() { + return { + canRedact: false, + }; + }, + + componentWillMount: function() { + MatrixClientPeg.get().on('RoomMember.powerLevel', this._checkCanRedact); + this._checkCanRedact(); + }, + + componentWillUnmount: function() { + const cli = MatrixClientPeg.get(); + if (cli) { + cli.removeListener('RoomMember.powerLevel', this._checkCanRedact); + } + }, + + _checkCanRedact: function() { + const cli = MatrixClientPeg.get(); + const room = cli.getRoom(this.props.mxEvent.getRoomId()); + const canRedact = room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId); + this.setState({canRedact}); + }, + onResendClick: function() { Resend.resend(this.props.mxEvent); if (this.props.onFinished) this.props.onFinished(); @@ -136,10 +161,10 @@ module.exports = React.createClass({ ); } - if (!eventStatus && !this.props.mxEvent.isRedacted()) { // sent and not redacted + if (this.state.canRedact) { redactButton = (
- { _t('Redact') } + { _t('Remove') }
); } @@ -206,7 +231,7 @@ module.exports = React.createClass({ externalURLButton = (
{ _t('Source URL') } + rel="noopener" target="_blank" onClick={ this.closeMenu }>{ _t('Source URL') }
); } diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 11948acebe..74b9c24a74 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -178,6 +178,7 @@ module.exports = React.createClass({ Modal.createDialog(TextInputDialog, { title: _t('Keywords'), description: _t('Enter keywords separated by a comma:'), + button: _t('OK'), value: keywords, onFinished: function onFinished(should_leave, newValue) { diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index 44041bc8fc..d55488059c 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -2,7 +2,6 @@ "Add an email address above to configure email notifications": "Adicione um endereço de email acima para configurar as notificações por email", "All messages": "Todas as mensagens", "All messages (loud)": "Todas as mensagens (alto)", - "All notifications are currently disabled for all targets.": "Todas as notificações estão atualmente desativadas para todos os destinos", "An error occurred whilst saving your email notification preferences.": "Um erro ocorreu enquanto salvava suas preferências de notificação por email.", "Cancel Sending": "Cancelar o envio", "Can't update user notification settings": "Não é possível atualizar as preferências de notificação", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index a4297ad9d2..7687d4c4c6 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2,7 +2,6 @@ "Add an email address above to configure email notifications": "Insira um endereço de email no campo acima para configurar suas notificações por email", "All messages": "Todas as mensagens", "All messages (loud)": "Todas as mensagens (alto)", - "All notifications are currently disabled for all targets.": "Todas as notificações estão atualmente desabilitadas para todos os destinatários.", "An error occurred whilst saving your email notification preferences.": "Um erro ocorreu enquanto o sistema estava salvando suas preferências de notificação por email.", "Call invitation": "Convite para chamada", "Cancel Sending": "Cancelar o envio", From 6a577423433e3185dc3b45cafe48f51e54f33eaf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 30 May 2017 14:19:33 +0100 Subject: [PATCH 25/34] managed to eat the eventStatus check, can't redact a local-echo etc Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/context_menus/MessageContextMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 56758b2f30..5445fd4fb8 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -161,7 +161,7 @@ module.exports = React.createClass({ ); } - if (this.state.canRedact) { + if (!eventStatus && this.state.canRedact) { redactButton = (
{ _t('Remove') } From 33b95d4965284d5f40f07de4d98ee017da2849bf Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 30 May 2017 15:11:17 +0100 Subject: [PATCH 26/34] Standardise on node v6/v7 --- .travis.yml | 13 ++++++++++++- README.md | 15 ++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index ff58bf374c..c68279a269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,17 @@ language: node_js node_js: - - 6 # node v6, to match jenkins + # make sure we work with a range of node versions. + # As of the time of writing: + # - 4.x is still in LTS (until April 2018), but some of our deps (notably + # extract-zip) don't work with it + # - 5.x has been EOLed for nearly a year. + # - 6.x is the current 'LTS' version + # - 7.x is the current 'current' version (until October 2017) + # + # see: https://github.com/nodejs/LTS/ + - 6.0 + - 6 + - 7 install: - scripts/fetch-develop.deps.sh - npm install diff --git a/README.md b/README.md index 4c5452e146..be3f3a8b4b 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,10 @@ Building From Source Riot is a modular webapp built with modern ES6 and requires a npm build system to build. -1. Install or update `node.js` so that your `npm` is at least at version `2.0.0` -1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git` -1. Switch to the riot-web directory: `cd riot-web` +1. Install or update `node.js` so that your `node` is at least v6.0.0 (and `npm` + is at least v3.8.6). +1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`. +1. Switch to the riot-web directory: `cd riot-web`. 1. If you're using the `develop` branch, install the develop versions of the dependencies, as the released ones will be too old: ``` @@ -65,7 +66,7 @@ to build. ``` Whenever you git pull on riot-web you will also probably need to force an update to these dependencies - the simplest way is to re-run the script, but you can also - manually update and reuild them: + manually update and rebuild them: ``` cd matrix-js-sdk git pull @@ -85,10 +86,10 @@ to build. up-to-date. Or just use https://riot.im/develop - the continuous integration release of the develop branch. (Note that we don't reference the develop versions in git directly due to - https://github.com/npm/npm/issues/3055) -1. Install the prerequisites: `npm install` + https://github.com/npm/npm/issues/3055.) +1. Install the prerequisites: `npm install`. 1. Configure the app by copying `config.sample.json` to `config.json` and - modifying it (see below for details) + modifying it (see below for details). 1. `npm run dist` to build a tarball to deploy. Untaring this file will give a version-specific directory containing all the files that need to go on your web server. From 7e21e00c99e888a48193b99a4b66aa5e94ebb904 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 May 2017 16:27:48 +0100 Subject: [PATCH 27/34] Translate src/components/structures --- .../structures/CompatibilityPage.js | 35 +++++++++++++------ src/components/structures/RightPanel.js | 4 +-- src/components/structures/RoomDirectory.js | 6 ++-- src/components/structures/SearchBox.js | 4 +-- src/i18n/strings/en_EN.json | 8 ++++- 5 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/components/structures/CompatibilityPage.js b/src/components/structures/CompatibilityPage.js index bae33803aa..88b01cb2bb 100644 --- a/src/components/structures/CompatibilityPage.js +++ b/src/components/structures/CompatibilityPage.js @@ -17,6 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); +import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler'; module.exports = React.createClass({ displayName: 'CompatibilityPage', @@ -39,23 +40,37 @@ module.exports = React.createClass({ return (
-

Sorry, your browser is not able to run Riot.

+

{ _tJsx("Sorry, your browser is not able to run Riot.", /(.*?)<\/b>/, (sub) => {sub}) }

- Riot uses many advanced browser features, some of which are not - available or experimental in your current browser. + { _t("Riot uses many advanced browser features, some of which are not available or experimental in your current browser.") }

- Please install Chrome or Firefox for - the best experience. Safari and Opera work too. + { _tJsx('Please install Chrome or Firefox for the best experience.', + [ + /(.*?)<\/a>/, + /(.*?)<\/a>/, + ], + [ + (sub) => {sub}, + (sub) => {sub}, + ] + )} + { _tJsx('Safari and Opera work too.', + [ + /(.*?)<\/a>/, + /(.*?)<\/a>/, + ], + [ + (sub) => {sub}, + (sub) => {sub}, + ] + )}

- With your current browser, the look and feel of the application may - be completely incorrect, and some or all features may not function. - If you want to try it anyway you can continue, but you are on your own - in terms of any issues you may encounter! + { _t("With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!") }

diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index c7f5394bf1..b4b82cfaef 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -93,7 +93,7 @@ module.exports = React.createClass({ var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog"); Modal.createDialog(NeedToRegisterDialog, { title: _t('Please Register'), - description: _t('Guest users can\'t invite users. Please register to invite') + '.' + description: _t('Guest users can\'t invite users. Please register to invite.') }); return; } @@ -218,7 +218,7 @@ module.exports = React.createClass({ { notificationsHighlight } -
+
; diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index e935084742..257fdbd5cd 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -213,11 +213,11 @@ module.exports = React.createClass({ var Loader = sdk.getComponent("elements.Spinner"); var modal = Modal.createDialog(Loader); - var step = _t('remove %(name)s from the directory', {name: name}) + '.'; + var step = _t('remove %(name)s from the directory.', {name: name}); MatrixClientPeg.get().setRoomDirectoryVisibility(room.room_id, 'private').then(() => { if (!alias) return; - step = _t('delete the alias') + '.'; + step = _t('delete the alias.'); return MatrixClientPeg.get().deleteAlias(alias); }).done(() => { modal.close(); @@ -356,7 +356,7 @@ module.exports = React.createClass({ var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog"); Modal.createDialog(NeedToRegisterDialog, { title: _t('Failed to join the room'), - description: _t('This room is inaccessible to guests. You may be able to join if you register') + '.' + description: _t('This room is inaccessible to guests. You may be able to join if you register.') }); return; } diff --git a/src/components/structures/SearchBox.js b/src/components/structures/SearchBox.js index faee0b5f71..99c4486690 100644 --- a/src/components/structures/SearchBox.js +++ b/src/components/structures/SearchBox.js @@ -100,13 +100,13 @@ module.exports = React.createClass({ if (this.props.collapsed) { toggleCollapse = - + } else { toggleCollapse = - + } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 039f5b76d3..7f1b8bf4c5 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1,4 +1,5 @@ { + "Safari and Opera work too.": "Safari and Opera work too.", "Add an email address above to configure email notifications": "Add an email address above to configure email notifications", "Advanced notification settings": "Advanced notification settings", "All messages": "All messages", @@ -48,6 +49,7 @@ " from room": " from room", "Guests can join": "Guests can join", "Guest users can't invite users. Please register to invite": "Guest users can't invite users. Please register to invite", + "I understand the risks and wish to continue": "I understand the risks and wish to continue", "Invite to this room": "Invite to this room", "Keywords": "Keywords", "Leave": "Leave", @@ -72,6 +74,7 @@ "On": "On", "Operation failed": "Operation failed", "Permalink": "Permalink", + "Please install Chrome or Firefox for the best experience.": "Please install Chrome or Firefox for the best experience.", "Please Register": "Please Register", "powered by Matrix": "powered by Matrix", "Quote": "Quote", @@ -83,11 +86,13 @@ "Remove from Directory": "Remove from Directory", "Resend": "Resend", "Riot does not know how to join a room on this network": "Riot does not know how to join a room on this network", + "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.": "Riot uses many advanced browser features, some of which are not available or experimental in your current browser.", "Room directory": "Room directory", "Room not found": "Room not found", "Search for a room": "Search for a room", "Settings": "Settings", "Source URL": "Source URL", + "Sorry, your browser is not able to run Riot.": "Sorry, your browser is not able to run Riot.", "Start chat": "Start chat", "The Home Server may be too old to support third party networks": "The Home Server may be too old to support third party networks", "There are advanced notifications which are not shown here": "There are advanced notifications which are not shown here", @@ -118,5 +123,6 @@ "Saturday": "Saturday", "Today": "Today", "Yesterday": "Yesterday", - "Welcome page": "Welcome page" + "Welcome page": "Welcome page", + "With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!": "With your current browser, the look and feel of the application may be completely incorrect, and some or all features may not function. If you want to try it anyway you can continue, but you are on your own in terms of any issues you may encounter!" } From 1b4444cc73ef78de69c20bf96f2bffb1f991d251 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 May 2017 16:30:56 +0100 Subject: [PATCH 28/34] Add missing translations --- src/i18n/strings/en_EN.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 7f1b8bf4c5..4f3467ae0b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -10,6 +10,7 @@ "Cancel Sending": "Cancel Sending", "Can't update user notification settings": "Can't update user notification settings", "Close": "Close", + "Collapse panel": "Collapse panel", "Create new room": "Create new room", "Couldn't find a matching Matrix room": "Couldn't find a matching Matrix room", "Custom Server Options": "Custom Server Options", @@ -30,6 +31,7 @@ "Error": "Error", "Error saving email notification preferences": "Error saving email notification preferences", "#example": "#example", + "Expand panel": "Expand panel", "Failed to": "Failed to", "Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room", "Failed to change settings": "Failed to change settings", From 3f04a4222996c48d89c94863f938bace1e6c0508 Mon Sep 17 00:00:00 2001 From: turt2live Date: Tue, 30 May 2017 09:32:27 -0600 Subject: [PATCH 29/34] Smaller font size on timestamp to better fit in the available space Part of addressing vector-im/riot-web#4046 Signed-off-by: Travis Ralston --- .../vector/css/matrix-react-sdk/views/rooms/_EventTile.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index 9d970ad454..d853f9396f 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -62,7 +62,7 @@ limitations under the License. visibility: hidden; white-space: nowrap; color: $event-timestamp-color; - font-size: 11px; + font-size: 10px; left: 8px; position: absolute; } From 2a122a25faf0fd67574cfc5394f4bc5ce5c6c6ef Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 May 2017 17:39:41 +0100 Subject: [PATCH 30/34] Translate notification strings --- src/components/views/settings/Notifications.js | 18 ++++++++++++++---- src/i18n/strings/en_EN.json | 1 + .../VectorPushRulesDefinitions.js | 14 +++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 74b9c24a74..1b8de52d9d 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -16,7 +16,7 @@ limitations under the License. 'use strict'; var React = require('react'); -import { _t } from 'matrix-react-sdk/lib/languageHandler'; +import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler'; var q = require("q"); var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); @@ -535,7 +535,16 @@ module.exports = React.createClass({ // it corresponds to all content push rules (stored in self.state.vectorContentRule) self.state.vectorPushRules.push({ "vectorRuleId": "_keywords", - "description" : (Messages containing keywords), + "description" : ( + + { _tJsx('Messages containing keywords', + /(.*?)<\/span>/, + (sub) => { + return {sub}; + } + )} + + ), "vectorState": self.state.vectorContentRules.vectorState }); } @@ -549,7 +558,7 @@ module.exports = React.createClass({ self.state.vectorPushRules.push({ "vectorRuleId": vectorRuleId, - "description" : ruleDefinition.description, + "description" : _t(ruleDefinition.description), // Text from VectorPushRulesDefinitions.js "rule": rule, "vectorState": vectorState, }); @@ -590,6 +599,7 @@ module.exports = React.createClass({ phase: self.phases.DISPLAY }); }, function(error) { + console.error(error); self.setState({ phase: self.phases.ERROR }); @@ -624,7 +634,7 @@ module.exports = React.createClass({ return ( - {title} + { title } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 4f3467ae0b..adf0800d3e 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -59,6 +59,7 @@ "Members": "Members", "Mentions only": "Mentions only", "Messages containing my display name": "Messages containing my display name", + "Messages containing keywords": "Messages containing keywords", "Messages containing my user name": "Messages containing my user name", "Messages in group chats": "Messages in group chats", "Messages in one-to-one chats": "Messages in one-to-one chats", diff --git a/src/notifications/VectorPushRulesDefinitions.js b/src/notifications/VectorPushRulesDefinitions.js index d696451d56..df6db6c354 100644 --- a/src/notifications/VectorPushRulesDefinitions.js +++ b/src/notifications/VectorPushRulesDefinitions.js @@ -65,7 +65,7 @@ module.exports = { // Messages containing user's display name ".m.rule.contains_display_name": new VectorPushRuleDefinition({ kind: "override", - description: "Messages containing my display name", + description: "Messages containing my display name", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { // The actions for each vector state, or null to disable the rule. on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_HIGHLIGHT_DEFAULT_SOUND, @@ -76,7 +76,7 @@ module.exports = { // Messages containing user's username (localpart/MXID) ".m.rule.contains_user_name": new VectorPushRuleDefinition({ kind: "override", - description: "Messages containing my user name", + description: "Messages containing my user name", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { // The actions for each vector state, or null to disable the rule. on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_HIGHLIGHT_DEFAULT_SOUND, @@ -87,7 +87,7 @@ module.exports = { // Messages just sent to the user in a 1:1 room ".m.rule.room_one_to_one": new VectorPushRuleDefinition({ kind: "underride", - description: "Messages in one-to-one chats", + description: "Messages in one-to-one chats", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND, @@ -100,7 +100,7 @@ module.exports = { // By opposition, all other room messages are from group chat rooms. ".m.rule.message": new VectorPushRuleDefinition({ kind: "underride", - description: "Messages in group chats", + description: "Messages in group chats", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND, @@ -111,7 +111,7 @@ module.exports = { // Invitation for the user ".m.rule.invite_for_me": new VectorPushRuleDefinition({ kind: "underride", - description: "When I'm invited to a room", + description: "When I'm invited to a room", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND, @@ -122,7 +122,7 @@ module.exports = { // Incoming call ".m.rule.call": new VectorPushRuleDefinition({ kind: "underride", - description: "Call invitation", + description: "Call invitation", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { on: StandardActions.ACTION_NOTIFY, loud: StandardActions.ACTION_NOTIFY_RING_SOUND, @@ -133,7 +133,7 @@ module.exports = { // Notifications from bots ".m.rule.suppress_notices": new VectorPushRuleDefinition({ kind: "override", - description: "Messages sent by bot", + description: "Messages sent by bot", // passed through _t() translation in src/components/views/settings/Notifications.js vectorStateToActions: { // .m.rule.suppress_notices is a "negative" rule, we have to invert its enabled value for vector UI on: StandardActions.ACTION_DISABLED, From 88edd1620c5bc86e3f477c5251729e18caff2ff2 Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 30 May 2017 19:09:39 +0200 Subject: [PATCH 31/34] Update from Weblate. (#4083) * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 99.1% (119 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ --- src/i18n/strings/de_DE.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index f9deef5b32..a26f352eb1 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -10,9 +10,9 @@ "Room directory": "Raum-Verzeichnis", "Create new room": "Neuen Raum erstellen", "Settings": "Einstellungen", - "powered by Matrix": "basierend auf Matrix", - "Custom Server Options": "Optionen für eigenen Server", - "Dismiss": "ausblenden", + "powered by Matrix": "betrieben mit Matrix", + "Custom Server Options": "Erweiterte Server-Optionen", + "Dismiss": "Ablehnen", "Failed to get protocol list from Home Server": "Fehler beim Abrufen der Protokoll-Liste vom Home-Server", "The Home Server may be too old to support third party networks": "Der Home-Server ist eventuell zu alt, um Drittanbieter-Netzwerke zu unterstützen", "Directory": "Raum Verzeichnis", @@ -45,7 +45,7 @@ "Failed to add tag ": "Konnte Tag nicht hinzufügen ", "Failed to change settings": "Einstellungen konnten nicht geändert werden", "Failed to update keywords": "Konnte Suchbegriff nicht aktualisieren", - "Failed to get public room list": "Konnte keine öffentliche Raumliste laden", + "Failed to get public room list": "Die Liste der öffentlichen Räume konnte nicht geladen werden", "Failed to join the room": "Fehler beim Betreten des Raumes", "Failed to remove tag ": "Konnte Tag nicht entfernen ", "Failed to set Direct Message status of room": "Konnte den direkten Benachrichtigungsstatus nicht setzen", @@ -54,7 +54,7 @@ "Forget": "Lösche", "from the directory": "aus dem Verzeichnis", " from room": " aus dem Raum", - "Guest users can't invite users. Please register to invite": "Gastnutzer können keine Nutzer einladen. Bitte registriere dich um Nutzer einzuladen", + "Guest users can't invite users. Please register to invite": "Gastnutzer können keine Nutzer einladen. Bitte registriere dich, um Nutzer einzuladen", "Keywords": "Schlüsselwörter", "Leave": "Verlassen", "Low Priority": "Niedrige Priorität", @@ -99,7 +99,7 @@ "Redact": "Redaktionell entfernen", "Remove %(name)s from the directory?": "Soll der Raum %(name)s aus dem Verzeichnis entfernt werden?", "remove %(name)s from the directory": "entferne %(name)s aus dem Verzeichnis", - "Resend": "Erneut Senden", + "Resend": "Erneut senden", "Source URL": "Quell-URL", "Unable to look up room ID from server": "Es ist nicht möglich, die Raum-ID auf dem Server nachzuschlagen", "Unhide Preview": "Vorschau wieder anzeigen", From 045c32bd2e3ee4c2ccd2b9802ed50457325a9e58 Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 30 May 2017 19:48:06 +0200 Subject: [PATCH 32/34] Update from Weblate. (#4089) * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 99.1% (119 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ --- src/i18n/strings/de_DE.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index a26f352eb1..c13504a43b 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -23,7 +23,7 @@ "Guests can join": "Gäste können beitreten", "You are not receiving desktop notifications": "Du erhältst keine Desktop-Benachrichtigungen", "Enable them now": "Aktiviere diese jetzt", - "Add an email address above to configure email notifications": "Füge eine E-Mail Adresse hinzu um Benachrichtigungen via E-Mail zu erhalten", + "Add an email address above to configure email notifications": "Füge oben eine E-Mail-Adresse hinzu, um die E-Mail-Benachrichtigungseinstellungen zu konfigurieren", "All notifications are currently disabled for all targets.": "Im Moment sind alle Benachrichtigungen für alle Ziele deaktiviert.", "An error occurred whilst saving your email notification preferences.": "Beim Speichern deiner E-Mail-Benachrichtigungseinstellungen ist ein Fehler aufgetreten.", "and remove": "und entfernen", @@ -72,7 +72,7 @@ "There are advanced notifications which are not shown here": "Es existieren erweiterte Benachrichtigungen, welche hier nicht angezeigt werden", "The server may be unavailable or overloaded": "Der Server ist vermutlich nicht erreichbar oder überlastet", "This room is inaccessible to guests. You may be able to join if you register": "Dieser Raum ist nicht verfügbar für Gäste. Vermutlich klappt es wenn du dich anmeldest", - "Unable to fetch notification target list": "Nicht möglich die Zielliste für Benachrichtigungen zu erhalten", + "Unable to fetch notification target list": "Liste der Benachrichtigungsempfänger konnte nicht abgerufen werden", "Unable to join network": "Es ist nicht möglich, dem Netzwerk beizutreten", "unknown error code": "Unbekannter Fehlercode", "Unnamed room": "Unbenannter Raum", From 676bd6196f486be71016a11b7ffb3ac84637291e Mon Sep 17 00:00:00 2001 From: turt2live Date: Tue, 30 May 2017 13:07:49 -0600 Subject: [PATCH 33/34] Show 12hr time on hover too Signed-off-by: Travis Ralston --- src/components/views/messages/MessageTimestamp.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/messages/MessageTimestamp.js b/src/components/views/messages/MessageTimestamp.js index dacfad925a..586ca94cc8 100644 --- a/src/components/views/messages/MessageTimestamp.js +++ b/src/components/views/messages/MessageTimestamp.js @@ -16,7 +16,6 @@ limitations under the License. 'use strict'; -import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; const React = require('react'); const DateUtils = require('matrix-react-sdk/lib/DateUtils'); @@ -30,7 +29,7 @@ module.exports = React.createClass({ render: function() { const date = new Date(this.props.ts); return ( - + { DateUtils.formatTime(date, this.props.showTwelveHour) } ); From e79df6a947ef56533138a6f001abbe0c84a567dd Mon Sep 17 00:00:00 2001 From: RiotTranslate Date: Tue, 30 May 2017 21:14:23 +0200 Subject: [PATCH 34/34] Update from Weblate. (#4091) * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 99.1% (119 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ * Translated using Weblate (German) Currently translated at 100.0% (120 of 120 strings) Translation: Riot Web/Riot Web Translate-URL: https://translate.nordgedanken.de/projects/riot-web/riot-web/de/ --- src/i18n/strings/de_DE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index c13504a43b..32d0f81510 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -37,7 +37,7 @@ "Enable desktop notifications": "Desktop-Benachrichtigungen aktivieren", "Enable email notifications": "Aktiviere E-Mail Benachrichtigungen", "Enable notifications for this account": "Aktiviere Benachrichtigungen für diesen Benutzer", - "Enter keywords separated by a comma:": "Kommagetrennte Schlagworte eingeben:", + "Enter keywords separated by a comma:": "Schlagworte kommagetrennt eingeben:", "Error": "Fehler", "Error saving email notification preferences": "Fehler beim Speichern der E-Mail-Benachrichtigungseinstellungen", "#example": "#Beispiel",