From be721c5bcb0b05d484294cc53bed95ae8a3e2f9e Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:00:54 +0000 Subject: [PATCH 01/40] Create TS compatible version of replaceableComponent --- src/utils/replaceableComponent.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index 8c29fdf037..f83e0c95c1 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { func } from 'prop-types'; import * as React from 'react'; import * as sdk from '../index'; @@ -38,3 +39,12 @@ export function replaceableComponent(name: string, origComponent: React.Componen // return a falsey value like `null` when the skin doesn't have a component. return () => sdk.getComponent(name) || origComponent; } + +/** + * Typescript-compatible version of `replaceableComponent` + * @see replaceableComponent + * @param {string} name The dot-path name of the component being replaced. + */ +export function replaceableComponentTs(name: string) { + return (origComponent: typeof React.Component) => sdk.getComponent(name) || origComponent; +} \ No newline at end of file From 86200e551985e4119f193da7818dd9ecc4c828ae Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:01:16 +0000 Subject: [PATCH 02/40] Convert BridgeTile to Typescript --- .../views/settings/{BridgeTile.js => BridgeTile.tsx} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename src/components/views/settings/{BridgeTile.js => BridgeTile.tsx} (95%) diff --git a/src/components/views/settings/BridgeTile.js b/src/components/views/settings/BridgeTile.tsx similarity index 95% rename from src/components/views/settings/BridgeTile.js rename to src/components/views/settings/BridgeTile.tsx index e9c58518e4..a6b607b01e 100644 --- a/src/components/views/settings/BridgeTile.js +++ b/src/components/views/settings/BridgeTile.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; +import React, { ReactNode } from 'react'; import PropTypes from 'prop-types'; import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo"; import {_t} from "../../../languageHandler"; @@ -23,10 +23,10 @@ import Pill from "../elements/Pill"; import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import BaseAvatar from "../avatars/BaseAvatar"; import AccessibleButton from "../elements/AccessibleButton"; -import {replaceableComponent} from "../../../utils/replaceableComponent"; +import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; -@replaceableComponent("views.settings.BridgeTile") +@replaceableComponentTs("views.settings.BridgeTile") export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, @@ -43,7 +43,7 @@ export default class BridgeTile extends React.PureComponent { }); } - render() { + render(): ReactNode { const content = this.props.ev.getContent(); const { channel, network, protocol } = content; const protocolName = protocol.displayname || protocol.id; From 8e6061b37aebbdc158713d9431e7d5a60b8cbb30 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:05:30 +0000 Subject: [PATCH 03/40] Ts tweaks --- src/components/views/settings/BridgeTile.tsx | 33 +++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index a6b607b01e..f38e97ee9b 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -25,9 +25,20 @@ import BaseAvatar from "../avatars/BaseAvatar"; import AccessibleButton from "../elements/AccessibleButton"; import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; +import type {MatrixEvent} from "matrix-js-sdk/src/models/event"; +import { Room } from "matrix-js-sdk/src/models/room"; + +interface IProps { + ev: MatrixEvent; + room: Room; +} + +interface IState { + visible: boolean; +} @replaceableComponentTs("views.settings.BridgeTile") -export default class BridgeTile extends React.PureComponent { +export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, room: PropTypes.object.isRequired, @@ -43,7 +54,7 @@ export default class BridgeTile extends React.PureComponent { }); } - render(): ReactNode { + render() { const content = this.props.ev.getContent(); const { channel, network, protocol } = content; const protocolName = protocol.displayname || protocol.id; @@ -53,22 +64,22 @@ export default class BridgeTile extends React.PureComponent { let creator = null; if (content.creator) { creator = _t("This bridge was provisioned by .", {}, { - user: , + user: () => , }); } const bot = _t("This bridge is managed by .", {}, { - user: , + />, }); let networkIcon; @@ -88,7 +99,7 @@ export default class BridgeTile extends React.PureComponent { url={ avatarUrl } />; } else { - networkIcon =
; + networkIcon =
; } const id = this.props.ev.getId(); From 8d203043d40ad6959405b4b115893213ed7b6a16 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:47:27 +0000 Subject: [PATCH 04/40] Remove hide/show behaviour --- .../dialogs/_RoomSettingsDialogBridges.scss | 18 ++++------- src/components/views/settings/BridgeTile.tsx | 32 ++++++------------- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/res/css/views/dialogs/_RoomSettingsDialogBridges.scss b/res/css/views/dialogs/_RoomSettingsDialogBridges.scss index a1793cc75e..c97a3b69b7 100644 --- a/res/css/views/dialogs/_RoomSettingsDialogBridges.scss +++ b/res/css/views/dialogs/_RoomSettingsDialogBridges.scss @@ -89,24 +89,18 @@ limitations under the License. } } - .mx_showMore { - display: block; - text-align: left; - margin-top: 10px; - } - .metadata { color: $muted-fg-color; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; margin-bottom: 0; - } - - .metadata.visible { overflow-y: visible; text-overflow: ellipsis; white-space: normal; + padding: 0; + + > li { + padding: 0; + border: 0; + } } } } diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index f38e97ee9b..ae8faec489 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -33,26 +33,16 @@ interface IProps { room: Room; } -interface IState { - visible: boolean; +/** } @replaceableComponentTs("views.settings.BridgeTile") -export default class BridgeTile extends React.PureComponent { +export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, room: PropTypes.object.isRequired, } - state = { - visible: false, - } - - _toggleVisible() { - this.setState({ - visible: !this.state.visible, - }); - } render() { const content = this.props.ev.getContent(); @@ -63,24 +53,24 @@ export default class BridgeTile extends React.PureComponent { let creator = null; if (content.creator) { - creator = _t("This bridge was provisioned by .", {}, { + creator =
  • {_t("This bridge was provisioned by .", {}, { user: () => , - }); + })}
  • ; } - const bot = _t("This bridge is managed by .", {}, { + const bot =
  • {_t("This bridge is managed by .", {}, { user: () => , - }); + })}
  • ; let networkIcon; @@ -103,7 +93,6 @@ export default class BridgeTile extends React.PureComponent { } const id = this.props.ev.getId(); - const metadataClassname = "metadata" + (this.state.visible ? " visible" : ""); return (
  • {networkIcon} @@ -114,12 +103,9 @@ export default class BridgeTile extends React.PureComponent { {_t("Workspace: %(networkName)s", {networkName})} {_t("Channel: %(channelName)s", {channelName})}

    -

    +

      {creator} {bot} -

      - - { this.state.visible ? _t("Show less") : _t("Show more") } - +
  • ); } From e448da0bcddb81e43f200dfe8031f9446e61575c Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:47:51 +0000 Subject: [PATCH 05/40] Add interface for event content, and validate --- src/components/views/settings/BridgeTile.tsx | 32 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index ae8faec489..3fb184d828 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -25,7 +25,7 @@ import BaseAvatar from "../avatars/BaseAvatar"; import AccessibleButton from "../elements/AccessibleButton"; import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; -import type {MatrixEvent} from "matrix-js-sdk/src/models/event"; +import {MatrixEvent} from "matrix-js-sdk/src/models/event"; import { Room } from "matrix-js-sdk/src/models/room"; interface IProps { @@ -34,6 +34,29 @@ interface IProps { } /** + * This should match https://github.com/matrix-org/matrix-doc/blob/hs/msc-bridge-inf/proposals/2346-bridge-info-state-event.md#mbridge + */ +interface IBridgeStateEvent { + bridgebot: string; + creator?: string; + protocol: { + id: string; + displayname?: string; + avatar_url?: string; + external_url?: string; + }; + network?: { + id: string; + displayname?: string; + avatar_url?: string; + external_url?: string; + }; + channel: { + id: string; + displayname?: string; + avatar_url?: string; + external_url?: string; + }; } @replaceableComponentTs("views.settings.BridgeTile") @@ -45,7 +68,12 @@ export default class BridgeTile extends React.PureComponent { render() { - const content = this.props.ev.getContent(); + const content: IBridgeStateEvent = this.props.ev.getContent(); + // Validate + if (!content.bridgebot || !content.channel?.id || !content.protocol?.id) { + console.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`); + return null; + } const { channel, network, protocol } = content; const protocolName = protocol.displayname || protocol.id; const channelName = channel.displayname || channel.id; From d6312606e6e6afd362549670e3b9c98ad9777b21 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:48:10 +0000 Subject: [PATCH 06/40] Use correct key for avatar --- src/components/views/settings/BridgeTile.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 3fb184d828..f47d47cb40 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -66,7 +66,6 @@ export default class BridgeTile extends React.PureComponent { room: PropTypes.object.isRequired, } - render() { const content: IBridgeStateEvent = this.props.ev.getContent(); // Validate @@ -77,7 +76,6 @@ export default class BridgeTile extends React.PureComponent { const { channel, network, protocol } = content; const protocolName = protocol.displayname || protocol.id; const channelName = channel.displayname || channel.id; - const networkName = network ? network.displayname || network.id : protocolName; let creator = null; if (content.creator) { @@ -102,10 +100,10 @@ export default class BridgeTile extends React.PureComponent { let networkIcon; - if (protocol.avatar) { + if (protocol.avatar_url) { const avatarUrl = getHttpUriForMxc( MatrixClientPeg.get().getHomeserverUrl(), - protocol.avatar, 64, 64, "crop", + protocol.avatar_url, 64, 64, "crop", ); networkIcon = Date: Mon, 30 Nov 2020 12:48:26 +0000 Subject: [PATCH 07/40] Add support for linking to the remote network page --- src/components/views/settings/BridgeTile.tsx | 23 ++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index f47d47cb40..062fdbeb6e 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -27,6 +27,7 @@ import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import {MatrixEvent} from "matrix-js-sdk/src/models/event"; import { Room } from "matrix-js-sdk/src/models/room"; +import { isUrlPermitted } from '../../../HtmlUtils'; interface IProps { ev: MatrixEvent; @@ -117,6 +118,22 @@ export default class BridgeTile extends React.PureComponent { } else { networkIcon =
    ; } + let networkItem = null; + if (network) { + const networkName = network.displayname || network.id; + let networkLink = {networkName}; + if (typeof network.external_url === "string" && isUrlPermitted(network.external_url)) { + networkLink = {networkName} + } + networkItem = _t("Workspace: ", {}, { + networkLink: () => networkLink, + }); + } + + let channelLink = {channelName}; + if (typeof channel.external_url === "string" && isUrlPermitted(channel.external_url)) { + channelLink = {channelName} + } const id = this.props.ev.getId(); return (
  • @@ -126,8 +143,10 @@ export default class BridgeTile extends React.PureComponent {

    {protocolName}

    - {_t("Workspace: %(networkName)s", {networkName})} - {_t("Channel: %(channelName)s", {channelName})} + {networkItem} + {_t("Channel: ", {}, { + channelLink: () => channelLink + })}

      {creator} {bot} From e7693dc95d7a84ab225f6beb58521c3c278ed447 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 12:50:57 +0000 Subject: [PATCH 08/40] Update variable in translation files --- src/i18n/strings/ar.json | 2 +- src/i18n/strings/cs.json | 4 ++-- src/i18n/strings/de_DE.json | 4 ++-- src/i18n/strings/en_EN.json | 4 ++-- src/i18n/strings/eo.json | 4 ++-- src/i18n/strings/es.json | 4 ++-- src/i18n/strings/et.json | 4 ++-- src/i18n/strings/eu.json | 4 ++-- src/i18n/strings/fi.json | 4 ++-- src/i18n/strings/fr.json | 4 ++-- src/i18n/strings/gl.json | 4 ++-- src/i18n/strings/hu.json | 4 ++-- src/i18n/strings/it.json | 4 ++-- src/i18n/strings/kab.json | 4 ++-- src/i18n/strings/lt.json | 4 ++-- src/i18n/strings/nl.json | 4 ++-- src/i18n/strings/pt_BR.json | 4 ++-- src/i18n/strings/ru.json | 4 ++-- src/i18n/strings/sk.json | 4 ++-- src/i18n/strings/sq.json | 4 ++-- src/i18n/strings/sv.json | 4 ++-- src/i18n/strings/tr.json | 4 ++-- src/i18n/strings/uk.json | 4 ++-- src/i18n/strings/zh_Hans.json | 4 ++-- src/i18n/strings/zh_Hant.json | 4 ++-- 25 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/i18n/strings/ar.json b/src/i18n/strings/ar.json index 5da09afd23..a58e53555e 100644 --- a/src/i18n/strings/ar.json +++ b/src/i18n/strings/ar.json @@ -1056,7 +1056,7 @@ "Failed to upload profile picture!": "تعذَّر رفع صورة الملف الشخصي!", "Show more": "أظهر أكثر", "Show less": "أظهر أقل", - "Channel: %(channelName)s": "قناة: %(channelName)s", + "Channel: ": "قناة: %(channelName)s", "This bridge is managed by .": "هذا الجسر يديره .", "Upload": "رفع", "Accept to continue:": "قبول للمتابعة:", diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 4d9d27363f..c7c09b02a3 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -1753,8 +1753,8 @@ "Review": "Prohlédnout", "This bridge was provisioned by .": "Toto propojení poskytuje .", "This bridge is managed by .": "Toto propojení spravuje .", - "Workspace: %(networkName)s": "Workspace: %(networkName)s", - "Channel: %(channelName)s": "Kanál: %(channelName)s", + "Workspace: ": "Workspace: ", + "Channel: ": "Kanál: %(channelName)s", "Show less": "Skrýt detaily", "Show more": "Více", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Změna hesla resetuje šifrovací klíče pro všechny vaše relace. Pokud si nejdřív nevyexportujete klíče místností a po změně je znovu neimportujete, nedostanete se k historickým zprávám. V budoucnu se toto zjednoduší.", diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 5d5ca50fc9..0c4eb8dca9 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1668,8 +1668,8 @@ "Verify yourself & others to keep your chats safe": "Verifiziere dich & andere, um eure Chats zu schützen", "This bridge was provisioned by .": "Diese Brücke wurde von bereitgestellt.", "This bridge is managed by .": "Diese Brücke wird von verwaltet.", - "Workspace: %(networkName)s": "Arbeitsbereich: %(networkName)s", - "Channel: %(channelName)s": "Kanal: %(channelName)s", + "Workspace: ": "Arbeitsbereich: ", + "Channel: ": "Kanal: %(channelName)s", "Show less": "Weniger zeigen", "Warning: You should only set up key backup from a trusted computer.": "Achtung: Du solltest die Schlüsselsicherung nur auf einem vertrauenswürdigen Gerät einrichten.", "Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.": "Melde dich an um die ausschließlich in dieser Sitzung gespeicherten Verschlüsselungsschlüssel wiederherzustellen. Du benötigst sie, um deine verschlüsselten Nachrichten in jeder Sitzung zu lesen.", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index eb1d0a632e..494909800c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -955,8 +955,8 @@ "Upload": "Upload", "This bridge was provisioned by .": "This bridge was provisioned by .", "This bridge is managed by .": "This bridge is managed by .", - "Workspace: %(networkName)s": "Workspace: %(networkName)s", - "Channel: %(channelName)s": "Channel: %(channelName)s", + "Workspace: ": "Workspace: ", + "Channel: ": "Channel: ", "Show less": "Show less", "Show more": "Show more", "Failed to upload profile picture!": "Failed to upload profile picture!", diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 3545565fa3..9ea4af86ee 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -1720,7 +1720,7 @@ "They don't match": "Ili ne akordas", "To be secure, do this in person or use a trusted way to communicate.": "Por plia sekureco, faru tion persone, aŭ uzu alian fidatan komunikilon.", "Verify yourself & others to keep your chats safe": "Kontrolu vin mem kaj aliajn por sekurigi viajn babilojn", - "Channel: %(channelName)s": "Kanalo: %(channelName)s", + "Channel: ": "Kanalo: %(channelName)s", "Show less": "Montri malpli", "Show more": "Montri pli", "Help": "Helpo", @@ -1760,7 +1760,7 @@ "Review": "Rekontroli", "This bridge was provisioned by .": "Ĉi tiu ponto estas provizita de .", "This bridge is managed by .": "Ĉi tiu ponto estas administrata de .", - "Workspace: %(networkName)s": "Labortablo: %(networkName)s", + "Workspace: ": "Labortablo: ", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ŝanĝo de pasvorto nuntempe restarigos ĉiujn tutvoje ĉifrajn ŝlosilojn en ĉiuj salutaĵoj, malebligante legadon de ĉifrita historio, malse vi unue elportus la ŝlosilojn de viaj ĉambroj kaj reenportus ilin poste. Ĉi tion ni plibonigos ose.", "Your homeserver does not support cross-signing.": "Via hejmservilo ne subtenas delegajn subskribojn.", "Cross-signing and secret storage are enabled.": "Delegaj subskriboj kaj sekreta deponejo estas ŝaltitaj.", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 34c40800f7..1635284e58 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1209,8 +1209,8 @@ "Verify": "Verificar", "Later": "Más tarde", "Upload": "Subir", - "Workspace: %(networkName)s": "Espacio de trabajo: %(networkName)s", - "Channel: %(channelName)s": "Canal: %(channelName)s", + "Workspace: ": "Espacio de trabajo: ", + "Channel: ": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar más", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Cambiar la contraseña reiniciará cualquier clave de encriptación end-to-end en todas las sesiones, haciendo el historial de conversaciones encriptado ilegible, a no ser que primero exportes tus claves de sala y después las reimportes. En un futuro esto será mejorado.", diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 0b338bd9d4..868d04e0ee 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1804,8 +1804,8 @@ "Waiting for your other session to verify…": "Ootan, et sinu teine sessioon alustaks verifitseerimist…", "This bridge was provisioned by .": "Selle võrgusilla võttis kasutusele .", "This bridge is managed by .": "Seda võrgusilda haldab .", - "Workspace: %(networkName)s": "Tööruum: %(networkName)s", - "Channel: %(channelName)s": "Kanal: %(channelName)s", + "Workspace: ": "Tööruum: ", + "Channel: ": "Kanal: %(channelName)s", "Upload new:": "Lae üles uus:", "Export E2E room keys": "Ekspordi jututubade läbiva krüptimise võtmed", "Your homeserver does not support cross-signing.": "Sinu koduserver ei toeta risttunnustamist.", diff --git a/src/i18n/strings/eu.json b/src/i18n/strings/eu.json index 2740ea2079..37deb7e774 100644 --- a/src/i18n/strings/eu.json +++ b/src/i18n/strings/eu.json @@ -1805,8 +1805,8 @@ "Verify yourself & others to keep your chats safe": "Egiaztatu zure burua eta besteak txatak seguru mantentzeko", "Review": "Berrikusi", "This bridge was provisioned by .": "Zubi hau erabiltzaileak hornitu du.", - "Workspace: %(networkName)s": "Lan eremua: %(networkName)s", - "Channel: %(channelName)s": "Kanala: %(channelName)s", + "Workspace: ": "Lan eremua: ", + "Channel: ": "Kanala: %(channelName)s", "Show less": "Erakutsi gutxiago", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Pasahitza aldatzean oraingo muturretik muturrerako zifratze gako guztiak ezeztatuko ditu saio guztietan, zifratutako txaten historiala ezin izango da irakurri ez badituzu aurretik zure geletako gakoak esportatzen eta gero berriro inportatzen. Etorkizunean hau hobetuko da.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Zure kontuak zeharkako sinatze identitate bat du biltegi sekretuan, baina saio honek ez du oraindik fidagarritzat.", diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 075c1e278a..47f11c2b57 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -1876,8 +1876,8 @@ "Review": "Katselmoi", "This bridge was provisioned by .": "Tämän sillan tarjoaa käyttäjä .", "This bridge is managed by .": "Tätä siltaa hallinnoi käyttäjä .", - "Workspace: %(networkName)s": "Työtila: %(networkName)s", - "Channel: %(channelName)s": "Kanava: %(channelName)s", + "Workspace: ": "Työtila: ", + "Channel: ": "Kanava: %(channelName)s", "Delete %(count)s sessions|other": "Poista %(count)s istuntoa", "Enable": "Ota käyttöön", "Backup is not signed by any of your sessions": "Mikään istuntosi ei ole allekirjoittanut varmuuskopiota", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index efae1f7b26..f1cb24a686 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -1809,8 +1809,8 @@ "They match": "Ils correspondent", "They don't match": "Ils ne correspondent pas", "This bridge was provisioned by .": "Cette passerelle a été fournie par .", - "Workspace: %(networkName)s": "Espace de travail : %(networkName)s", - "Channel: %(channelName)s": "Canal : %(channelName)s", + "Workspace: ": "Espace de travail : ", + "Channel: ": "Canal : %(channelName)s", "Show less": "En voir moins", "This room is bridging messages to the following platforms. Learn more.": "Ce salon transmet les messages vers les plateformes suivantes. En savoir plus.", "This room isn’t bridging messages to any platforms. Learn more.": "Ce salon ne transmet les messages à aucune plateforme. En savoir plus.", diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index fec99d1e7c..5afa95e29c 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1307,8 +1307,8 @@ "Upload": "Subir", "This bridge was provisioned by .": "Esta ponte está proporcionada por .", "This bridge is managed by .": "Esta ponte está xestionada por .", - "Workspace: %(networkName)s": "Espazo de traballo: %(networkName)s", - "Channel: %(channelName)s": "Canal: %(channelName)s", + "Workspace: ": "Espazo de traballo: ", + "Channel: ": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar máis", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao cambiar o contrasinal vas restablecer todas as chaves de cifrado extremo-a-extremo en tódalas sesións, facendo que o historial de conversa cifrado non sexa lexible, a menos que primeiro exportes todas as chaves das salas e as importes posteriormente. No futuro melloraremos o procedemento.", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 2739154c19..6ced904206 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -1793,8 +1793,8 @@ "Enable message search in encrypted rooms": "Üzenetek keresésének bekapcsolása a titkosított szobákban", "Review": "Átnéz", "This bridge was provisioned by .": "Ezt a hidat az alábbi felhasználó készítette: .", - "Workspace: %(networkName)s": "Munkahely: %(networkName)s", - "Channel: %(channelName)s": "Csatorna: %(channelName)s", + "Workspace: ": "Munkahely: ", + "Channel: ": "Csatorna: %(channelName)s", "Show less": "Kevesebbet mutat", "Securely cache encrypted messages locally for them to appear in search results, using ": "A titkosított üzenetek kereséséhez azokat biztonságos módon helyileg kell tárolnod, felhasználva: ", " to store messages from ": " üzenetek tárolásához ", diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 4ad806f55e..edb584c894 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -1797,8 +1797,8 @@ "They don't match": "Non corrispondono", "Review": "Controlla", "This bridge was provisioned by .": "Questo bridge è stato fornito da .", - "Workspace: %(networkName)s": "Spazio di lavoro: %(networkName)s", - "Channel: %(channelName)s": "Canale: %(channelName)s", + "Workspace: ": "Spazio di lavoro: ", + "Channel: ": "Canale: %(channelName)s", "Show less": "Mostra meno", "Securely cache encrypted messages locally for them to appear in search results, using ": "Tieni in cache localmente i messaggi cifrati in modo sicuro affinché appaiano nei risultati di ricerca, usando ", " to store messages from ": " per conservare i messaggi da ", diff --git a/src/i18n/strings/kab.json b/src/i18n/strings/kab.json index 7a9261f25c..aaeb309edb 100644 --- a/src/i18n/strings/kab.json +++ b/src/i18n/strings/kab.json @@ -847,8 +847,8 @@ "Accept to continue:": "Qbel i wakken ad tkemmleḍ:", "This bridge was provisioned by .": "Tileggit-a tella-d sɣur .", "This bridge is managed by .": "Tileggit-a tettusefrak sɣur .", - "Workspace: %(networkName)s": "Tallunt n uxeddim: %(networkName)s", - "Channel: %(channelName)s": "Abadu: %(channelName)s", + "Workspace: ": "Tallunt n uxeddim: ", + "Channel: ": "Abadu: %(channelName)s", "Upload new:": "Asali amaynut:", "New passwords don't match": "Awalen uffiren imaynuten ur mṣadan ara", "Passwords can't be empty": "Awalen uffiren ur ilaq ara ad ilin d ilmawen", diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index c1191aa020..756fe77bfd 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -1953,8 +1953,8 @@ "not found in storage": "saugykloje nerasta", "Cross-signing is not set up.": "Kryžminis pasirašymas nenustatytas.", "Cross-signing is ready for use.": "Kryžminis pasirašymas yra paruoštas naudoti.", - "Channel: %(channelName)s": "Kanalas: %(channelName)s", - "Workspace: %(networkName)s": "Darbo sritis: %(networkName)s", + "Channel: ": "Kanalas: %(channelName)s", + "Workspace: ": "Darbo sritis: ", "This bridge is managed by .": "Šis tiltas yra tvarkomas .", "This bridge was provisioned by .": "Šis tiltas buvo parūpintas .", "Your server isn't responding to some requests.": "Jūsų serveris neatsako į kai kurias užklausas.", diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index 1ec887c364..e09aa82b9a 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -1625,8 +1625,8 @@ "Decline (%(counter)s)": "Afwijzen (%(counter)s)", "This bridge was provisioned by .": "Dank aan voor de brug.", "This bridge is managed by .": "Brug onderhouden door .", - "Workspace: %(networkName)s": "Werkruimte: %(networkName)s", - "Channel: %(channelName)s": "Kanaal: %(channelName)s", + "Workspace: ": "Werkruimte: ", + "Channel: ": "Kanaal: %(channelName)s", "Show less": "Minder tonen", "Show more": "Meer tonen", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Momenteel stelt een wachtwoordswijziging alle berichtsleutels in alle sessies opnieuw in, en maakt zo oude versleutelde berichten onleesbaar - tenzij u uw sleutels eerst wegschrijft, en na afloop weer inleest. Dit zal verbeterd worden.", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 613f889370..0c2037e02a 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -1380,8 +1380,8 @@ "Upload": "Enviar", "This bridge was provisioned by .": "Esta integração foi disponibilizada por .", "This bridge is managed by .": "Esta integração é desenvolvida por .", - "Workspace: %(networkName)s": "Espaço de trabalho: %(networkName)s", - "Channel: %(channelName)s": "Canal: %(channelName)s", + "Workspace: ": "Espaço de trabalho: ", + "Channel: ": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar mais", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao mudar a senha, você apagará todas as chaves de criptografia de ponta a ponta existentes em todas as sessões, fazendo com que o histórico de conversas criptografadas fique ilegível, a não ser que você exporte as salas das chaves criptografadas antes de mudar a senha e então as importe novamente depois. No futuro, isso será melhorado.", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 3c5ead3aa1..1cda0a288b 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -1670,8 +1670,8 @@ "Decline (%(counter)s)": "Отклонить (%(counter)s)", "This bridge was provisioned by .": "Этот мост был подготовлен пользователем .", "This bridge is managed by .": "Этот мост управляется .", - "Workspace: %(networkName)s": "Рабочая область: %(networkName)s", - "Channel: %(channelName)s": "Канал: %(channelName)s", + "Workspace: ": "Рабочая область: ", + "Channel: ": "Канал: %(channelName)s", "Show less": "Показать меньше", "Show more": "Показать больше", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Если вы не экспортируете ключи для этой комнаты и не импортируете их в будущем, смена пароля приведёт к сбросу всех ключей сквозного шифрования и сделает невозможным чтение истории чата. В будущем это будет улучшено.", diff --git a/src/i18n/strings/sk.json b/src/i18n/strings/sk.json index 454d86cb64..7fa8e4dd65 100644 --- a/src/i18n/strings/sk.json +++ b/src/i18n/strings/sk.json @@ -1536,8 +1536,8 @@ "Joins room with given address": "Pridať sa do miestnosti s danou adresou", "Unrecognised room address:": "Nerozpoznaná adresa miestnosti:", "This bridge is managed by .": "Tento most spravuje .", - "Workspace: %(networkName)s": "Pracovisko: %(networkName)s", - "Channel: %(channelName)s": "Kanál: %(channelName)s", + "Workspace: ": "Pracovisko: ", + "Channel: ": "Kanál: %(channelName)s", "Show less": "Zobraziť menej", "Show more": "Zobraziť viac", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Zmena hesla reštartuje všetky šifrovacie kľúče pre všetky vaše relácie. Šifrované správy sa stanú nečitateľnými, pokiaľ najprv nevyexportujete vaše kľúče a po zmene ich nenaimportujete. V budúcnosti sa tento proces zjednoduší.", diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 74a85031ac..54236054bd 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -1819,8 +1819,8 @@ "To be secure, do this in person or use a trusted way to communicate.": "Për të qenë i sigurt, bëjeni këtë duke qenë vetë i pranishëm ose përdorni për të komunikuar një rrugë të besuar.", "Verify yourself & others to keep your chats safe": "Verifikoni veten & të tjerët, që t’i mbani bisedat tuaja të sigurta", "This bridge was provisioned by .": "Kjo urë është dhënë nga .", - "Workspace: %(networkName)s": "Hapësirë pune: %(networkName)s", - "Channel: %(channelName)s": "Kanal: %(channelName)s", + "Workspace: ": "Hapësirë pune: ", + "Channel: ": "Kanal: %(channelName)s", "Show less": "Shfaq më pak", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ndryshimi i fjalëkalimit do të sjellë zerimin e çfarëdo kyçesh fshehtëzimi skaj-më-skaj në krejt sesionet, duke e bërë të palexueshëm historikun e fshehtëzuar të bisedave, hiq rastin kur i eksportoni më parë kyçet tuaj të dhomës dhe i ri-importoni ata më pas. Në të ardhmen kjo do të përmirësohet.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Llogaria juaj ka një identitet cross-signing në depozitë të fshehtë, por s’është ende i besuar në këtë sesion.", diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 93ff8808cb..307af905e8 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -1692,8 +1692,8 @@ "From %(deviceName)s (%(deviceId)s)": "Från %(deviceName)s (%(deviceId)s)", "This bridge was provisioned by .": "Den här bryggan tillhandahålls av .", "This bridge is managed by .": "Den här bryggan tillhandahålls av .", - "Workspace: %(networkName)s": "Arbetsyta: %(networkName)s", - "Channel: %(channelName)s": "Kanal: %(channelName)s", + "Workspace: ": "Arbetsyta: ", + "Channel: ": "Kanal: %(channelName)s", "Show less": "Visa mindre", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Att byta lösenord återställer just nu alla krypteringsnycklar på alla sessioner, vilket gör krypterad chatthistorik oläslig om du inte först exporterar dina rumsnycklar och sedan importerar dem igen efteråt. Detta kommer att förbättras i framtiden.", "Your homeserver does not support cross-signing.": "Din hemserver stöder inte korssignering.", diff --git a/src/i18n/strings/tr.json b/src/i18n/strings/tr.json index 5a152eeab6..20ebca68a2 100644 --- a/src/i18n/strings/tr.json +++ b/src/i18n/strings/tr.json @@ -1410,8 +1410,8 @@ "Other users may not trust it": "Diğer kullanıcılar güvenmeyebilirler", "Later": "Sonra", "Review": "Gözden Geçirme", - "Workspace: %(networkName)s": "Çalışma alanı: %(networkName)s", - "Channel: %(channelName)s": "Kanal: %(channelName)s", + "Workspace: ": "Çalışma alanı: ", + "Channel: ": "Kanal: %(channelName)s", "Show less": "Daha az göster", "Show more": "Daha fazla göster", "in memory": "hafızada", diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index eaf8fdbe88..b0efb8ff07 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -955,8 +955,8 @@ "Globe": "Глобус", "This bridge was provisioned by .": "Цей місток був підготовленим .", "This bridge is managed by .": "Цей міст керується .", - "Workspace: %(networkName)s": "Робочий простір: %(networkName)s", - "Channel: %(channelName)s": "Канал: %(channelName)s", + "Workspace: ": "Робочий простір: ", + "Channel: ": "Канал: %(channelName)s", "Show less": "Згорнути", "Show more": "Розгорнути", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Змінення пароля призведе до скидання всіх ключів наскрізного шифрування та унеможливить читання історії листування, якщо тільки ви не експортуєте ваші ключі кімнати та не імпортуєте їх згодом. Це буде вдосконалено у майбутньому.", diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 672b1befd1..46edda95dc 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -2320,8 +2320,8 @@ "Uploading logs": "正在上传日志", "Downloading logs": "正在下载日志", "This bridge was provisioned by .": "桥接由 准备。", - "Workspace: %(networkName)s": "工作区:%(networkName)s", - "Channel: %(channelName)s": "频道:%(channelName)s", + "Workspace: ": "工作区:", + "Channel: ": "频道:%(channelName)s", "well formed": "格式正确", "Master private key:": "主私钥:", "Self signing private key:": "自签名私钥:", diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 3355a7d383..3b82222e0e 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -1804,8 +1804,8 @@ "To be secure, do this in person or use a trusted way to communicate.": "為了安全,請親自進行或使用可信的通訊方式。", "Review": "評論", "This bridge was provisioned by .": "此橋接是由 設定。", - "Workspace: %(networkName)s": "工作空間:%(networkName)s", - "Channel: %(channelName)s": "頻道:%(channelName)s", + "Workspace: ": "工作空間:", + "Channel: ": "頻道:%(channelName)s", "Show less": "顯示較少", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "變更密碼將會重設所有工作階段上的所有端到端加密金鑰,讓已加密的聊天歷史無法讀取,除非您先匯出您的聊天室金鑰並在稍後重新匯入。未來會有所改善。", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "您的帳號在秘密儲存空間中有交叉簽章的身份,但尚未被此工作階段信任。", From da86bc0b0a8a1e497dc88f4a62d84722aefa6033 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 13:02:04 +0000 Subject: [PATCH 09/40] Allow sender for backwards compat --- src/components/views/settings/BridgeTile.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 062fdbeb6e..67f0eb7802 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -70,10 +70,16 @@ export default class BridgeTile extends React.PureComponent { render() { const content: IBridgeStateEvent = this.props.ev.getContent(); // Validate - if (!content.bridgebot || !content.channel?.id || !content.protocol?.id) { + if (!content.channel?.id || !content.protocol?.id) { console.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`); return null; } + if (!content.bridgebot) { + // Bridgebot was not required previously, so in order to not break rooms we are allowing + // the sender to be used in place. When the proposal is merged, this should be removed. + console.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key which is deprecated behaviour. Using sender for now.`); + content.bridgebot = this.props.ev.getSender(); + } const { channel, network, protocol } = content; const protocolName = protocol.displayname || protocol.id; const channelName = channel.displayname || channel.id; From 3466813c234eaa41a49d44a901a9089a43d22d26 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 13:04:50 +0000 Subject: [PATCH 10/40] Remove showmore show less --- 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 494909800c..07051ca19e 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -957,8 +957,6 @@ "This bridge is managed by .": "This bridge is managed by .", "Workspace: ": "Workspace: ", "Channel: ": "Channel: ", - "Show less": "Show less", - "Show more": "Show more", "Failed to upload profile picture!": "Failed to upload profile picture!", "Upload new:": "Upload new:", "No display name": "No display name", @@ -1520,6 +1518,7 @@ "Jump to first invite.": "Jump to first invite.", "Show %(count)s more|other": "Show %(count)s more", "Show %(count)s more|one": "Show %(count)s more", + "Show less": "Show less", "Use default": "Use default", "All messages": "All messages", "Mentions & Keywords": "Mentions & Keywords", @@ -1582,6 +1581,7 @@ "New published address (e.g. #alias:server)": "New published address (e.g. #alias:server)", "Local Addresses": "Local Addresses", "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)": "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", + "Show more": "Show more", "Error updating flair": "Error updating flair", "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.": "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.", "Invalid community ID": "Invalid community ID", From c5e578a50246c435695afb99e68434db702632cc Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 30 Nov 2020 13:07:12 +0000 Subject: [PATCH 11/40] linting --- src/components/views/settings/BridgeTile.tsx | 14 ++++++++++---- src/utils/replaceableComponent.ts | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 67f0eb7802..1f5448dcc1 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { ReactNode } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo"; import {_t} from "../../../languageHandler"; @@ -22,7 +22,6 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Pill from "../elements/Pill"; import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import BaseAvatar from "../avatars/BaseAvatar"; -import AccessibleButton from "../elements/AccessibleButton"; import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import {MatrixEvent} from "matrix-js-sdk/src/models/event"; @@ -43,19 +42,25 @@ interface IBridgeStateEvent { protocol: { id: string; displayname?: string; + // eslint-disable-next-line camelcase avatar_url?: string; + // eslint-disable-next-line camelcase external_url?: string; }; network?: { id: string; displayname?: string; + // eslint-disable-next-line camelcase avatar_url?: string; + // eslint-disable-next-line camelcase external_url?: string; }; channel: { id: string; displayname?: string; + // eslint-disable-next-line camelcase avatar_url?: string; + // eslint-disable-next-line camelcase external_url?: string; }; } @@ -77,7 +82,8 @@ export default class BridgeTile extends React.PureComponent { if (!content.bridgebot) { // Bridgebot was not required previously, so in order to not break rooms we are allowing // the sender to be used in place. When the proposal is merged, this should be removed. - console.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key which is deprecated behaviour. Using sender for now.`); + console.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key which` + + "is deprecated behaviour. Using sender for now."); content.bridgebot = this.props.ev.getSender(); } const { channel, network, protocol } = content; @@ -151,7 +157,7 @@ export default class BridgeTile extends React.PureComponent {

      {networkItem} {_t("Channel: ", {}, { - channelLink: () => channelLink + channelLink: () => channelLink, })}

        diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index f83e0c95c1..7ea192f76b 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { func } from 'prop-types'; import * as React from 'react'; import * as sdk from '../index'; @@ -47,4 +46,4 @@ export function replaceableComponent(name: string, origComponent: React.Componen */ export function replaceableComponentTs(name: string) { return (origComponent: typeof React.Component) => sdk.getComponent(name) || origComponent; -} \ No newline at end of file +} From 7e0cf5c7832a46243f4b145a06c7ac821eda4e14 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 29 Dec 2020 12:35:48 -0700 Subject: [PATCH 12/40] Wire up MSC2931 widget navigation Fixes https://github.com/vector-im/element-web/issues/16006 **Requires https://github.com/matrix-org/matrix-widget-api/pull/27** --- src/i18n/strings/en_EN.json | 1 + src/stores/widgets/ElementWidgetActions.ts | 7 +++++++ src/stores/widgets/ElementWidgetCapabilities.ts | 3 +++ src/stores/widgets/StopGapWidgetDriver.ts | 9 +++++++++ src/widgets/CapabilityText.tsx | 3 +++ 5 files changed, 23 insertions(+) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c0939871e2..4dad7a97f1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -584,6 +584,7 @@ "Send stickers into this room": "Send stickers into this room", "Send stickers into your active room": "Send stickers into your active room", "Change which room you're viewing": "Change which room you're viewing", + "Change which room you're viewing and use permalinks": "Change which room you're viewing and use permalinks", "Change the topic of this room": "Change the topic of this room", "See when the topic changes in this room": "See when the topic changes in this room", "Change the topic of your active room": "Change the topic of your active room", diff --git a/src/stores/widgets/ElementWidgetActions.ts b/src/stores/widgets/ElementWidgetActions.ts index 76390086ab..de48746a74 100644 --- a/src/stores/widgets/ElementWidgetActions.ts +++ b/src/stores/widgets/ElementWidgetActions.ts @@ -20,9 +20,16 @@ export enum ElementWidgetActions { ClientReady = "im.vector.ready", HangupCall = "im.vector.hangup", OpenIntegrationManager = "integration_manager_open", + + /** + * @deprecated Use MSC2931 instead + */ ViewRoom = "io.element.view_room", } +/** + * @deprecated Use MSC2931 instead + */ export interface IViewRoomApiRequest extends IWidgetApiRequest { data: { room_id: string; // eslint-disable-line camelcase diff --git a/src/stores/widgets/ElementWidgetCapabilities.ts b/src/stores/widgets/ElementWidgetCapabilities.ts index 3f17d27909..e493d5618f 100644 --- a/src/stores/widgets/ElementWidgetCapabilities.ts +++ b/src/stores/widgets/ElementWidgetCapabilities.ts @@ -15,5 +15,8 @@ */ export enum ElementWidgetCapabilities { + /** + * @deprecated Use MSC2931 instead. + */ CanChangeViewedRoom = "io.element.view_room", } diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 2d2d1fcbdb..8baea97fe0 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -43,6 +43,7 @@ import { EventType } from "matrix-js-sdk/src/@types/event"; import { CHAT_EFFECTS } from "../../effects"; import { containsEmoji } from "../../effects/utils"; import dis from "../../dispatcher/dispatcher"; +import {tryTransformPermalinkToLocalHref} from "../../utils/permalinks/Permalinks"; // TODO: Purge this from the universe @@ -171,4 +172,12 @@ export class StopGapWidgetDriver extends WidgetDriver { }, }); } + + public async navigate(uri: string): Promise { + const localUri = tryTransformPermalinkToLocalHref(uri); + if (!localUri || localUri === uri) { // parse failure can lead to an unmodified URL + throw new Error("Failed to transform URI"); + } + window.location.hash = localUri; // it'll just be a fragment + } } diff --git a/src/widgets/CapabilityText.tsx b/src/widgets/CapabilityText.tsx index 834ea3ec37..044b7701ba 100644 --- a/src/widgets/CapabilityText.tsx +++ b/src/widgets/CapabilityText.tsx @@ -60,6 +60,9 @@ export class CapabilityText { [ElementWidgetCapabilities.CanChangeViewedRoom]: { [GENERIC_WIDGET_KIND]: _td("Change which room you're viewing"), }, + [MatrixCapabilities.MSC2931Navigate]: { + [GENERIC_WIDGET_KIND]: _td("Change which room you're viewing and use permalinks"), + }, }; private static stateSendRecvCaps: ISendRecvStaticCapText = { From 448a5ea42d28bdb1cd8020b98b639cdb7282012a Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 8 Jan 2021 18:07:48 +0000 Subject: [PATCH 13/40] Remove replaceableComponentTs from BridgeTile --- src/components/views/settings/BridgeTile.tsx | 2 -- src/utils/replaceableComponent.ts | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 1f5448dcc1..58499ebd25 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -22,7 +22,6 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Pill from "../elements/Pill"; import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import BaseAvatar from "../avatars/BaseAvatar"; -import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import {MatrixEvent} from "matrix-js-sdk/src/models/event"; import { Room } from "matrix-js-sdk/src/models/room"; @@ -65,7 +64,6 @@ interface IBridgeStateEvent { }; } -@replaceableComponentTs("views.settings.BridgeTile") export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index 7ea192f76b..8c29fdf037 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -38,12 +38,3 @@ export function replaceableComponent(name: string, origComponent: React.Componen // return a falsey value like `null` when the skin doesn't have a component. return () => sdk.getComponent(name) || origComponent; } - -/** - * Typescript-compatible version of `replaceableComponent` - * @see replaceableComponent - * @param {string} name The dot-path name of the component being replaced. - */ -export function replaceableComponentTs(name: string) { - return (origComponent: typeof React.Component) => sdk.getComponent(name) || origComponent; -} From 726dfcc4b8fe0a974548408860bcd8a2c1d352ea Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 8 Jan 2021 18:08:16 +0000 Subject: [PATCH 14/40] Fix language strings --- src/i18n/strings/ar.json | 2 +- src/i18n/strings/bg.json | 4 ++-- src/i18n/strings/cs.json | 4 ++-- src/i18n/strings/de_DE.json | 2 +- src/i18n/strings/eo.json | 2 +- src/i18n/strings/es.json | 2 +- src/i18n/strings/et.json | 2 +- src/i18n/strings/eu.json | 2 +- src/i18n/strings/fi.json | 2 +- src/i18n/strings/fr.json | 2 +- src/i18n/strings/gl.json | 2 +- src/i18n/strings/hu.json | 2 +- src/i18n/strings/it.json | 2 +- src/i18n/strings/kab.json | 2 +- src/i18n/strings/lt.json | 2 +- src/i18n/strings/nl.json | 2 +- src/i18n/strings/pt_BR.json | 2 +- src/i18n/strings/ru.json | 2 +- src/i18n/strings/sk.json | 2 +- src/i18n/strings/sq.json | 2 +- src/i18n/strings/sv.json | 2 +- src/i18n/strings/tr.json | 2 +- src/i18n/strings/uk.json | 2 +- src/i18n/strings/zh_Hans.json | 2 +- src/i18n/strings/zh_Hant.json | 2 +- 25 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/i18n/strings/ar.json b/src/i18n/strings/ar.json index a58e53555e..8e8ae3f775 100644 --- a/src/i18n/strings/ar.json +++ b/src/i18n/strings/ar.json @@ -1056,7 +1056,7 @@ "Failed to upload profile picture!": "تعذَّر رفع صورة الملف الشخصي!", "Show more": "أظهر أكثر", "Show less": "أظهر أقل", - "Channel: ": "قناة: %(channelName)s", + "Channel: ": "قناة: ", "This bridge is managed by .": "هذا الجسر يديره .", "Upload": "رفع", "Accept to continue:": "قبول للمتابعة:", diff --git a/src/i18n/strings/bg.json b/src/i18n/strings/bg.json index e4010e8b64..ebe4e65a16 100644 --- a/src/i18n/strings/bg.json +++ b/src/i18n/strings/bg.json @@ -1840,8 +1840,8 @@ "Other users may not trust it": "Други потребители може да не се доверят", "From %(deviceName)s (%(deviceId)s)": "От %(deviceName)s (%(deviceId)s)", "This bridge was provisioned by .": "Мостът е настроен от .", - "Workspace: %(networkName)s": "Работна област: %(networkName)s", - "Channel: %(channelName)s": "Канал: %(channelName)s", + "Workspace: ": "Работна област: ", + "Channel: ": "Канал: ", "Show less": "Покажи по-малко", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Промяната на паролата в момента би нулирало всички ключове за шифроване-от-край-до-край, правейки историята на чата нечетима, освен ако първо не експортирате ключовете, а след промяната на паролата ги импортирате. В бъдеще, това ще бъде подобрено.", "Your homeserver does not support cross-signing.": "Сървърът ви не поддържа кръстосано-подписване.", diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 3f9d231317..d4451bb902 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -1753,8 +1753,8 @@ "Review": "Prohlédnout", "This bridge was provisioned by .": "Toto propojení poskytuje .", "This bridge is managed by .": "Toto propojení spravuje .", - "Workspace: %(networkName)s": "Pracovní oblast: %(networkName)s", - "Channel: %(channelName)s": "Kanál: %(channelName)s", + "Workspace: ": "Pracovní oblast: ", + "Channel: ": "Kanál: ", "Show less": "Skrýt detaily", "Show more": "Více", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Změna hesla resetuje šifrovací klíče pro všechny vaše relace. Pokud si nejdřív nevyexportujete klíče místností a po změně je znovu neimportujete, nedostanete se k historickým zprávám. V budoucnu se toto zjednoduší.", diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 974e002ca8..972440e80a 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1669,7 +1669,7 @@ "This bridge was provisioned by .": "Diese Brücke wurde von bereitgestellt.", "This bridge is managed by .": "Diese Brücke wird von verwaltet.", "Workspace: ": "Arbeitsbereich: ", - "Channel: ": "Kanal: %(channelName)s", + "Channel: ": "Kanal: ", "Show less": "Weniger zeigen", "Warning: You should only set up key backup from a trusted computer.": "Achtung: Du solltest die Schlüsselsicherung nur auf einem vertrauenswürdigen Gerät einrichten.", "Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.": "Melde dich an um die ausschließlich in dieser Sitzung gespeicherten Verschlüsselungsschlüssel wiederherzustellen. Du benötigst sie, um deine verschlüsselten Nachrichten in jeder Sitzung zu lesen.", diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 9ea4af86ee..f151d8a857 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -1720,7 +1720,7 @@ "They don't match": "Ili ne akordas", "To be secure, do this in person or use a trusted way to communicate.": "Por plia sekureco, faru tion persone, aŭ uzu alian fidatan komunikilon.", "Verify yourself & others to keep your chats safe": "Kontrolu vin mem kaj aliajn por sekurigi viajn babilojn", - "Channel: ": "Kanalo: %(channelName)s", + "Channel: ": "Kanalo: ", "Show less": "Montri malpli", "Show more": "Montri pli", "Help": "Helpo", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 1635284e58..11c92c9ccf 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1210,7 +1210,7 @@ "Later": "Más tarde", "Upload": "Subir", "Workspace: ": "Espacio de trabajo: ", - "Channel: ": "Canal: %(channelName)s", + "Channel: ": "Canal: ", "Show less": "Mostrar menos", "Show more": "Mostrar más", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Cambiar la contraseña reiniciará cualquier clave de encriptación end-to-end en todas las sesiones, haciendo el historial de conversaciones encriptado ilegible, a no ser que primero exportes tus claves de sala y después las reimportes. En un futuro esto será mejorado.", diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 1d0fe52c0b..3361242ce5 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1805,7 +1805,7 @@ "This bridge was provisioned by .": "Selle võrgusilla võttis kasutusele .", "This bridge is managed by .": "Seda võrgusilda haldab .", "Workspace: ": "Tööruum: ", - "Channel: ": "Kanal: %(channelName)s", + "Channel: ": "Kanal: ", "Upload new:": "Lae üles uus:", "Export E2E room keys": "Ekspordi jututubade läbiva krüptimise võtmed", "Your homeserver does not support cross-signing.": "Sinu koduserver ei toeta risttunnustamist.", diff --git a/src/i18n/strings/eu.json b/src/i18n/strings/eu.json index 37deb7e774..8809129efe 100644 --- a/src/i18n/strings/eu.json +++ b/src/i18n/strings/eu.json @@ -1806,7 +1806,7 @@ "Review": "Berrikusi", "This bridge was provisioned by .": "Zubi hau erabiltzaileak hornitu du.", "Workspace: ": "Lan eremua: ", - "Channel: ": "Kanala: %(channelName)s", + "Channel: ": "Kanala: ", "Show less": "Erakutsi gutxiago", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Pasahitza aldatzean oraingo muturretik muturrerako zifratze gako guztiak ezeztatuko ditu saio guztietan, zifratutako txaten historiala ezin izango da irakurri ez badituzu aurretik zure geletako gakoak esportatzen eta gero berriro inportatzen. Etorkizunean hau hobetuko da.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Zure kontuak zeharkako sinatze identitate bat du biltegi sekretuan, baina saio honek ez du oraindik fidagarritzat.", diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 65c7b41e8c..e4bcc0623d 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -1877,7 +1877,7 @@ "This bridge was provisioned by .": "Tämän sillan tarjoaa käyttäjä .", "This bridge is managed by .": "Tätä siltaa hallinnoi käyttäjä .", "Workspace: ": "Työtila: ", - "Channel: ": "Kanava: %(channelName)s", + "Channel: ": "Kanava: ", "Delete %(count)s sessions|other": "Poista %(count)s istuntoa", "Enable": "Ota käyttöön", "Backup is not signed by any of your sessions": "Mikään istuntosi ei ole allekirjoittanut varmuuskopiota", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index f1cb24a686..8b7e2656ea 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -1810,7 +1810,7 @@ "They don't match": "Ils ne correspondent pas", "This bridge was provisioned by .": "Cette passerelle a été fournie par .", "Workspace: ": "Espace de travail : ", - "Channel: ": "Canal : %(channelName)s", + "Channel: ": "Canal : ", "Show less": "En voir moins", "This room is bridging messages to the following platforms. Learn more.": "Ce salon transmet les messages vers les plateformes suivantes. En savoir plus.", "This room isn’t bridging messages to any platforms. Learn more.": "Ce salon ne transmet les messages à aucune plateforme. En savoir plus.", diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 63c7dd2423..d43ff020ab 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1308,7 +1308,7 @@ "This bridge was provisioned by .": "Esta ponte está proporcionada por .", "This bridge is managed by .": "Esta ponte está xestionada por .", "Workspace: ": "Espazo de traballo: ", - "Channel: ": "Canal: %(channelName)s", + "Channel: ": "Canal: ", "Show less": "Mostrar menos", "Show more": "Mostrar máis", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao cambiar o contrasinal vas restablecer todas as chaves de cifrado extremo-a-extremo en tódalas sesións, facendo que o historial de conversa cifrado non sexa lexible, a menos que primeiro exportes todas as chaves das salas e as importes posteriormente. No futuro melloraremos o procedemento.", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 6ced904206..d8d3f01f66 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -1794,7 +1794,7 @@ "Review": "Átnéz", "This bridge was provisioned by .": "Ezt a hidat az alábbi felhasználó készítette: .", "Workspace: ": "Munkahely: ", - "Channel: ": "Csatorna: %(channelName)s", + "Channel: ": "Csatorna: ", "Show less": "Kevesebbet mutat", "Securely cache encrypted messages locally for them to appear in search results, using ": "A titkosított üzenetek kereséséhez azokat biztonságos módon helyileg kell tárolnod, felhasználva: ", " to store messages from ": " üzenetek tárolásához ", diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 47d7d993d9..616071c785 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -1798,7 +1798,7 @@ "Review": "Controlla", "This bridge was provisioned by .": "Questo bridge è stato fornito da .", "Workspace: ": "Spazio di lavoro: ", - "Channel: ": "Canale: %(channelName)s", + "Channel: ": "Canale: ", "Show less": "Mostra meno", "Securely cache encrypted messages locally for them to appear in search results, using ": "Tieni in cache localmente i messaggi cifrati in modo sicuro affinché appaiano nei risultati di ricerca, usando ", " to store messages from ": " per conservare i messaggi da ", diff --git a/src/i18n/strings/kab.json b/src/i18n/strings/kab.json index aaeb309edb..74b203efb6 100644 --- a/src/i18n/strings/kab.json +++ b/src/i18n/strings/kab.json @@ -848,7 +848,7 @@ "This bridge was provisioned by .": "Tileggit-a tella-d sɣur .", "This bridge is managed by .": "Tileggit-a tettusefrak sɣur .", "Workspace: ": "Tallunt n uxeddim: ", - "Channel: ": "Abadu: %(channelName)s", + "Channel: ": "Abadu: ", "Upload new:": "Asali amaynut:", "New passwords don't match": "Awalen uffiren imaynuten ur mṣadan ara", "Passwords can't be empty": "Awalen uffiren ur ilaq ara ad ilin d ilmawen", diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index 8ffc1eac55..b4fc60b931 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -1953,7 +1953,7 @@ "not found in storage": "saugykloje nerasta", "Cross-signing is not set up.": "Kryžminis pasirašymas nenustatytas.", "Cross-signing is ready for use.": "Kryžminis pasirašymas yra paruoštas naudoti.", - "Channel: ": "Kanalas: %(channelName)s", + "Channel: ": "Kanalas: ", "Workspace: ": "Darbo sritis: ", "This bridge is managed by .": "Šis tiltas yra tvarkomas .", "This bridge was provisioned by .": "Šis tiltas buvo parūpintas .", diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index e09aa82b9a..1277769ad3 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -1626,7 +1626,7 @@ "This bridge was provisioned by .": "Dank aan voor de brug.", "This bridge is managed by .": "Brug onderhouden door .", "Workspace: ": "Werkruimte: ", - "Channel: ": "Kanaal: %(channelName)s", + "Channel: ": "Kanaal: ", "Show less": "Minder tonen", "Show more": "Meer tonen", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Momenteel stelt een wachtwoordswijziging alle berichtsleutels in alle sessies opnieuw in, en maakt zo oude versleutelde berichten onleesbaar - tenzij u uw sleutels eerst wegschrijft, en na afloop weer inleest. Dit zal verbeterd worden.", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 2d9c66f4c5..d3ecf00c1c 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -1381,7 +1381,7 @@ "This bridge was provisioned by .": "Esta integração foi disponibilizada por .", "This bridge is managed by .": "Esta integração é desenvolvida por .", "Workspace: ": "Espaço de trabalho: ", - "Channel: ": "Canal: %(channelName)s", + "Channel: ": "Canal: ", "Show less": "Mostrar menos", "Show more": "Mostrar mais", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao mudar a senha, você apagará todas as chaves de criptografia de ponta a ponta existentes em todas as sessões, fazendo com que o histórico de conversas criptografadas fique ilegível, a não ser que você exporte as salas das chaves criptografadas antes de mudar a senha e então as importe novamente depois. No futuro, isso será melhorado.", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 53247765cf..b99fef0915 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -1671,7 +1671,7 @@ "This bridge was provisioned by .": "Этот мост был подготовлен пользователем .", "This bridge is managed by .": "Этот мост управляется .", "Workspace: ": "Рабочая область: ", - "Channel: ": "Канал: %(channelName)s", + "Channel: ": "Канал: ", "Show less": "Показать меньше", "Show more": "Показать больше", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Если вы не экспортируете ключи для этой комнаты и не импортируете их в будущем, смена пароля приведёт к сбросу всех ключей сквозного шифрования и сделает невозможным чтение истории чата. В будущем это будет улучшено.", diff --git a/src/i18n/strings/sk.json b/src/i18n/strings/sk.json index 7fa8e4dd65..77e7d9de2b 100644 --- a/src/i18n/strings/sk.json +++ b/src/i18n/strings/sk.json @@ -1537,7 +1537,7 @@ "Unrecognised room address:": "Nerozpoznaná adresa miestnosti:", "This bridge is managed by .": "Tento most spravuje .", "Workspace: ": "Pracovisko: ", - "Channel: ": "Kanál: %(channelName)s", + "Channel: ": "Kanál: ", "Show less": "Zobraziť menej", "Show more": "Zobraziť viac", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Zmena hesla reštartuje všetky šifrovacie kľúče pre všetky vaše relácie. Šifrované správy sa stanú nečitateľnými, pokiaľ najprv nevyexportujete vaše kľúče a po zmene ich nenaimportujete. V budúcnosti sa tento proces zjednoduší.", diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index b96ab81f2f..a65892f4d0 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -1820,7 +1820,7 @@ "Verify yourself & others to keep your chats safe": "Verifikoni veten & të tjerët, që t’i mbani bisedat tuaja të sigurta", "This bridge was provisioned by .": "Kjo urë është dhënë nga .", "Workspace: ": "Hapësirë pune: ", - "Channel: ": "Kanal: %(channelName)s", + "Channel: ": "Kanal: ", "Show less": "Shfaq më pak", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ndryshimi i fjalëkalimit do të sjellë zerimin e çfarëdo kyçesh fshehtëzimi skaj-më-skaj në krejt sesionet, duke e bërë të palexueshëm historikun e fshehtëzuar të bisedave, hiq rastin kur i eksportoni më parë kyçet tuaj të dhomës dhe i ri-importoni ata më pas. Në të ardhmen kjo do të përmirësohet.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Llogaria juaj ka një identitet cross-signing në depozitë të fshehtë, por s’është ende i besuar në këtë sesion.", diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 1405ea6145..4824895988 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -1693,7 +1693,7 @@ "This bridge was provisioned by .": "Den här bryggan tillhandahålls av .", "This bridge is managed by .": "Den här bryggan tillhandahålls av .", "Workspace: ": "Arbetsyta: ", - "Channel: ": "Kanal: %(channelName)s", + "Channel: ": "Kanal: ", "Show less": "Visa mindre", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Att byta lösenord återställer just nu alla krypteringsnycklar på alla sessioner, vilket gör krypterad chatthistorik oläslig om du inte först exporterar dina rumsnycklar och sedan importerar dem igen efteråt. Detta kommer att förbättras i framtiden.", "Your homeserver does not support cross-signing.": "Din hemserver stöder inte korssignering.", diff --git a/src/i18n/strings/tr.json b/src/i18n/strings/tr.json index 20ebca68a2..c7711973f9 100644 --- a/src/i18n/strings/tr.json +++ b/src/i18n/strings/tr.json @@ -1411,7 +1411,7 @@ "Later": "Sonra", "Review": "Gözden Geçirme", "Workspace: ": "Çalışma alanı: ", - "Channel: ": "Kanal: %(channelName)s", + "Channel: ": "Kanal: ", "Show less": "Daha az göster", "Show more": "Daha fazla göster", "in memory": "hafızada", diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 3feddd0a33..37b9472d3c 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -956,7 +956,7 @@ "This bridge was provisioned by .": "Цей місток був підготовленим .", "This bridge is managed by .": "Цей міст керується .", "Workspace: ": "Робочий простір: ", - "Channel: ": "Канал: %(channelName)s", + "Channel: ": "Канал: ", "Show less": "Згорнути", "Show more": "Розгорнути", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Змінення пароля призведе до скидання всіх ключів наскрізного шифрування та унеможливить читання історії листування, якщо тільки ви не експортуєте ваші ключі кімнати та не імпортуєте їх згодом. Це буде вдосконалено у майбутньому.", diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 46edda95dc..45ca22fdcd 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -2321,7 +2321,7 @@ "Downloading logs": "正在下载日志", "This bridge was provisioned by .": "桥接由 准备。", "Workspace: ": "工作区:", - "Channel: ": "频道:%(channelName)s", + "Channel: ": "频道:", "well formed": "格式正确", "Master private key:": "主私钥:", "Self signing private key:": "自签名私钥:", diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index ba63c5f450..b8cecd3b76 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -1805,7 +1805,7 @@ "Review": "評論", "This bridge was provisioned by .": "此橋接是由 設定。", "Workspace: ": "工作空間:", - "Channel: ": "頻道:%(channelName)s", + "Channel: ": "頻道:", "Show less": "顯示較少", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "變更密碼將會重設所有工作階段上的所有端到端加密金鑰,讓已加密的聊天歷史無法讀取,除非您先匯出您的聊天室金鑰並在稍後重新匯入。未來會有所改善。", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "您的帳號在秘密儲存空間中有交叉簽章的身份,但尚未被此工作階段信任。", From 30dd24a59c7dcf092004e03d5b765f05ff077375 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 13 Jan 2021 12:59:37 +0000 Subject: [PATCH 15/40] Upgrade matrix-js-sdk to 9.5.0-rc.1 --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 92b574da34..f336a78120 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "katex": "^0.12.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "9.5.0-rc.1", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index b0769c2c04..00f97f966c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6553,9 +6553,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "9.4.1" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/1717fcf499b943517213f2a81c41ffec0b50748e" +matrix-js-sdk@9.5.0-rc.1: + version "9.5.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.5.0-rc.1.tgz#91c2f0ff969baea1416611a39354ca016cc1b7c6" + integrity sha512-TOWU6QKfc3BBTdLyzKMnc0trsaw9sQw3/LaNU/ZqP1LuVDK+qRQxcUfsev0EFfRKURIcI7KvtzRiV+DakN/X+Q== dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" From 5c9fbd283c54248f96dc4e4a601535f1e2e323a6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 13 Jan 2021 13:06:43 +0000 Subject: [PATCH 16/40] Prepare changelog for v3.12.0-rc.1 --- CHANGELOG.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef31ef886f..349a2c7d8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,54 @@ +Changes in [3.12.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.0-rc.1) (2021-01-13) +=============================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.11.1...v3.12.0-rc.1) + + * Fix soft crash on soft logout page + [\#5539](https://github.com/matrix-org/matrix-react-sdk/pull/5539) + * Translations update from Weblate + [\#5538](https://github.com/matrix-org/matrix-react-sdk/pull/5538) + * Run TypeScript tests + [\#5537](https://github.com/matrix-org/matrix-react-sdk/pull/5537) + * Add a basic widget explorer to devtools (per-room) + [\#5528](https://github.com/matrix-org/matrix-react-sdk/pull/5528) + * Add to security key field + [\#5534](https://github.com/matrix-org/matrix-react-sdk/pull/5534) + * Fix avatar upload prompt/tooltip floating wrong and permissions + [\#5526](https://github.com/matrix-org/matrix-react-sdk/pull/5526) + * Add a dialpad UI for PSTN lookup + [\#5523](https://github.com/matrix-org/matrix-react-sdk/pull/5523) + * Basic call transfer initiation support + [\#5494](https://github.com/matrix-org/matrix-react-sdk/pull/5494) + * Fix #15988 + [\#5524](https://github.com/matrix-org/matrix-react-sdk/pull/5524) + * Bump node-notifier from 8.0.0 to 8.0.1 + [\#5520](https://github.com/matrix-org/matrix-react-sdk/pull/5520) + * Use TypeScript source for development, swap to build during release + [\#5503](https://github.com/matrix-org/matrix-react-sdk/pull/5503) + * Look for emoji in the body that will be displayed + [\#5517](https://github.com/matrix-org/matrix-react-sdk/pull/5517) + * Bump ini from 1.3.5 to 1.3.7 + [\#5486](https://github.com/matrix-org/matrix-react-sdk/pull/5486) + * Recognise `*.element.io` links as Element permalinks + [\#5514](https://github.com/matrix-org/matrix-react-sdk/pull/5514) + * Fixes for call UI + [\#5509](https://github.com/matrix-org/matrix-react-sdk/pull/5509) + * Add a snowfall chat effect (with /snowfall command) + [\#5511](https://github.com/matrix-org/matrix-react-sdk/pull/5511) + * fireworks effect + [\#5507](https://github.com/matrix-org/matrix-react-sdk/pull/5507) + * Don't play call end sound for calls that never started + [\#5506](https://github.com/matrix-org/matrix-react-sdk/pull/5506) + * Add /tableflip slash command + [\#5485](https://github.com/matrix-org/matrix-react-sdk/pull/5485) + * Import from src in IncomingCallBox.tsx + [\#5504](https://github.com/matrix-org/matrix-react-sdk/pull/5504) + * Social Login support both https and mxc icons + [\#5499](https://github.com/matrix-org/matrix-react-sdk/pull/5499) + * Fix padding in confirmation email registration prompt + [\#5501](https://github.com/matrix-org/matrix-react-sdk/pull/5501) + * Fix room list help prompt alignment + [\#5500](https://github.com/matrix-org/matrix-react-sdk/pull/5500) + Changes in [3.11.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.11.1) (2020-12-21) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.11.0...v3.11.1) From 97af6a8fd8fbfaf79eb867a5dfd6841a21ec42f8 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 13 Jan 2021 13:06:44 +0000 Subject: [PATCH 17/40] v3.12.0-rc.1 --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f336a78120..050e2562a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.11.1", + "version": "3.12.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { @@ -27,7 +27,7 @@ "matrix-gen-i18n": "scripts/gen-i18n.js", "matrix-prune-i18n": "scripts/prune-i18n.js" }, - "main": "./src/index.js", + "main": "./lib/index.js", "matrix_src_main": "./src/index.js", "matrix_lib_main": "./lib/index.js", "matrix_lib_typings": "./lib/index.d.ts", @@ -188,5 +188,6 @@ "transformIgnorePatterns": [ "/node_modules/(?!matrix-js-sdk).+$" ] - } + }, + "typings": "./lib/index.d.ts" } From c1c57c2c16e11f43b4fbf8fa86568f0b8e3aaba4 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 13 Jan 2021 13:07:51 +0000 Subject: [PATCH 18/40] Add extra notes to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 349a2c7d8e..ef56762a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Changes in [3.12.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases =============================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.11.1...v3.12.0-rc.1) + * Upgrade to JS SDK 9.5.0-rc.1 * Fix soft crash on soft logout page [\#5539](https://github.com/matrix-org/matrix-react-sdk/pull/5539) * Translations update from Weblate From 20283eabe0fd1f2ff21591b9b1c95c6a448b4099 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Jan 2021 15:31:26 +0000 Subject: [PATCH 19/40] Fix incoming call box on dark theme --- res/css/views/voip/_CallContainer.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallContainer.scss b/res/css/views/voip/_CallContainer.scss index ae1d37de71..d9843b668e 100644 --- a/res/css/views/voip/_CallContainer.scss +++ b/res/css/views/voip/_CallContainer.scss @@ -46,7 +46,7 @@ limitations under the License. .mx_IncomingCallBox { min-width: 250px; - background-color: $secondary-accent-color; + background-color: $primary-bg-color; padding: 8px; box-shadow: 0px 14px 24px rgba(0, 0, 0, 0.08); border-radius: 8px; From 1b98ada55f87acba392c520fb751def4b3ca6194 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Jan 2021 16:55:38 +0000 Subject: [PATCH 20/40] Actually this is right colour --- res/css/views/voip/_CallContainer.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallContainer.scss b/res/css/views/voip/_CallContainer.scss index d9843b668e..8262075559 100644 --- a/res/css/views/voip/_CallContainer.scss +++ b/res/css/views/voip/_CallContainer.scss @@ -46,7 +46,7 @@ limitations under the License. .mx_IncomingCallBox { min-width: 250px; - background-color: $primary-bg-color; + background-color: $voipcall-plinth-color; padding: 8px; box-shadow: 0px 14px 24px rgba(0, 0, 0, 0.08); border-radius: 8px; From cb66f7493b24e860f0d7e850afe007eecc9046b7 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 14 Jan 2021 15:58:26 +0000 Subject: [PATCH 21/40] Skip account settings for guest users Homeservers don't allow this currently, so we should use something else instead for such cases. --- src/settings/handlers/AccountSettingsHandler.ts | 2 +- src/settings/handlers/RoomAccountSettingsHandler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings/handlers/AccountSettingsHandler.ts b/src/settings/handlers/AccountSettingsHandler.ts index d609fd3231..e75faa49c1 100644 --- a/src/settings/handlers/AccountSettingsHandler.ts +++ b/src/settings/handlers/AccountSettingsHandler.ts @@ -169,7 +169,7 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa public isSupported(): boolean { const cli = MatrixClientPeg.get(); - return cli !== undefined && cli !== null; + return cli !== undefined && cli !== null && !cli.isGuest(); } private getSettings(eventType = "im.vector.web.settings"): any { // TODO: [TS] Types on return diff --git a/src/settings/handlers/RoomAccountSettingsHandler.ts b/src/settings/handlers/RoomAccountSettingsHandler.ts index 53e29653f8..416bdddb90 100644 --- a/src/settings/handlers/RoomAccountSettingsHandler.ts +++ b/src/settings/handlers/RoomAccountSettingsHandler.ts @@ -129,7 +129,7 @@ export default class RoomAccountSettingsHandler extends MatrixClientBackedSettin public isSupported(): boolean { const cli = MatrixClientPeg.get(); - return cli !== undefined && cli !== null; + return cli !== undefined && cli !== null && !cli.isGuest(); } private getSettings(roomId: string, eventType = "im.vector.web.settings"): any { // TODO: [TS] Type return From 658a8dfa9954f4c1e45d46c1ff924f14684b7923 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 14 Jan 2021 17:30:25 +0000 Subject: [PATCH 22/40] Use device storage for allowed widgets if account data not supported With guest accounts, account data is not available, so we use device storage to hold allowed widgets as a good enough place. Fixes https://github.com/vector-im/element-web/issues/16145 --- .../views/context_menus/WidgetContextMenu.tsx | 3 ++- src/components/views/elements/AppTile.js | 3 ++- src/settings/Settings.ts | 3 ++- src/settings/SettingsStore.ts | 25 +++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/components/views/context_menus/WidgetContextMenu.tsx b/src/components/views/context_menus/WidgetContextMenu.tsx index 8026942038..3c7bf0ee0e 100644 --- a/src/components/views/context_menus/WidgetContextMenu.tsx +++ b/src/components/views/context_menus/WidgetContextMenu.tsx @@ -127,7 +127,8 @@ const WidgetContextMenu: React.FC = ({ console.info("Revoking permission for widget to load: " + app.eventId); const current = SettingsStore.getValue("allowedWidgets", roomId); current[app.eventId] = false; - SettingsStore.setValue("allowedWidgets", roomId, SettingLevel.ROOM_ACCOUNT, current).catch(err => { + const level = SettingsStore.firstSupportedLevel("allowedWidgets"); + SettingsStore.setValue("allowedWidgets", roomId, level, current).catch(err => { console.error(err); // We don't really need to do anything about this - the user will just hit the button again. }); diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 7e0ae965bb..65bc0ac6f1 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -240,7 +240,8 @@ export default class AppTile extends React.Component { console.info("Granting permission for widget to load: " + this.props.app.eventId); const current = SettingsStore.getValue("allowedWidgets", roomId); current[this.props.app.eventId] = true; - SettingsStore.setValue("allowedWidgets", roomId, SettingLevel.ROOM_ACCOUNT, current).then(() => { + const level = SettingsStore.firstSupportedLevel("allowedWidgets"); + SettingsStore.setValue("allowedWidgets", roomId, level, current).then(() => { this.setState({hasPermissionToLoad: true}); // Fetch a token for the integration manager, now that we're allowed to diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index b239b809fe..6ca009df61 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -421,7 +421,8 @@ export const SETTINGS: {[setting: string]: ISetting} = { default: true, }, "allowedWidgets": { - supportedLevels: [SettingLevel.ROOM_ACCOUNT], + supportedLevels: [SettingLevel.ROOM_ACCOUNT, SettingLevel.ROOM_DEVICE], + supportedLevelsAreOrdered: true, default: {}, // none allowed }, "analyticsOptIn": { diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 82f169f498..2d024ba3f8 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -467,6 +467,31 @@ export default class SettingsStore { return LEVEL_HANDLERS[level].isSupported(); } + /** + * Determines the first supported level out of all the levels that can be used for a + * specific setting. + * @param {string} settingName The setting name. + * @return {SettingLevel} + */ + public static firstSupportedLevel(settingName: string): SettingLevel { + // Verify that the setting is actually a setting + const setting = SETTINGS[settingName]; + if (!setting) { + throw new Error("Setting '" + settingName + "' does not appear to be a setting."); + } + + const levelOrder = (setting.supportedLevelsAreOrdered ? setting.supportedLevels : LEVEL_ORDER); + if (!levelOrder.includes(SettingLevel.DEFAULT)) levelOrder.push(SettingLevel.DEFAULT); // always include default + + const handlers = SettingsStore.getHandlers(settingName); + + for (const level of levelOrder) { + const handler = handlers[level]; + if (!handler) continue; + return level; + } + } + /** * Debugging function for reading explicit setting values without going through the * complicated/biased functions in the SettingsStore. This will print information to From accbe78d9a3a14599d09d7814b4db70072ffbdce Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 14 Jan 2021 17:37:18 +0000 Subject: [PATCH 23/40] Add null path --- src/settings/SettingsStore.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 2d024ba3f8..1b718a72b3 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -490,6 +490,7 @@ export default class SettingsStore { if (!handler) continue; return level; } + return null; } /** From 6d932e135290d9f982f8d7b1c3dec1b0ae08917c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 14 Jan 2021 17:38:06 +0000 Subject: [PATCH 24/40] Fix lint errors --- src/components/views/context_menus/WidgetContextMenu.tsx | 1 - src/components/views/elements/AppTile.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/components/views/context_menus/WidgetContextMenu.tsx b/src/components/views/context_menus/WidgetContextMenu.tsx index 3c7bf0ee0e..4662c74d78 100644 --- a/src/components/views/context_menus/WidgetContextMenu.tsx +++ b/src/components/views/context_menus/WidgetContextMenu.tsx @@ -26,7 +26,6 @@ import {WidgetMessagingStore} from "../../../stores/widgets/WidgetMessagingStore import RoomContext from "../../../contexts/RoomContext"; import dis from "../../../dispatcher/dispatcher"; import SettingsStore from "../../../settings/SettingsStore"; -import {SettingLevel} from "../../../settings/SettingLevel"; import Modal from "../../../Modal"; import QuestionDialog from "../dialogs/QuestionDialog"; import {WidgetType} from "../../../widgets/WidgetType"; diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 65bc0ac6f1..213351889f 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -33,7 +33,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import {aboveLeftOf, ContextMenuButton} from "../../structures/ContextMenu"; import PersistedElement, {getPersistKey} from "./PersistedElement"; import {WidgetType} from "../../../widgets/WidgetType"; -import {SettingLevel} from "../../../settings/SettingLevel"; import {StopGapWidget} from "../../../stores/widgets/StopGapWidget"; import {ElementWidgetActions} from "../../../stores/widgets/ElementWidgetActions"; import {MatrixCapabilities} from "matrix-widget-api"; From 97a551c04ae294201de4eff49a21c0f4c452fc6c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 14 Jan 2021 17:39:58 +0000 Subject: [PATCH 25/40] Fix test --- test/components/views/messages/TextualBody-test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/components/views/messages/TextualBody-test.js b/test/components/views/messages/TextualBody-test.js index bf55e9c430..fc627538f0 100644 --- a/test/components/views/messages/TextualBody-test.js +++ b/test/components/views/messages/TextualBody-test.js @@ -222,6 +222,7 @@ describe("", () => { getRoom: () => mkStubRoom("room_id"), getAccountData: () => undefined, getUrlPreview: (url) => new Promise(() => {}), + isGuest: () => false, }; const ev = mkEvent({ From e90009772d0c2955e8caeecb1fc4f81d83b61afa Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 11:21:52 +0000 Subject: [PATCH 26/40] Fix React warnings about missing key for edited messages This uses a fragment instead of an array to avoid the need for key attributes. --- src/components/views/messages/TextualBody.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index 8f153e48e9..bf0884a2f3 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -410,7 +410,10 @@ export default class TextualBody extends React.Component { ref: this._content, }); if (this.props.replacingEventId) { - body = [body, this._renderEditedMarker()]; + body = <> + {body} + {this._renderEditedMarker()} + ; } if (this.props.highlightLink) { From 80f3e14faf19ca0b188ad05a68d00af778728171 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 11:42:30 +0000 Subject: [PATCH 27/40] Move `LoggedInView` subscriptions to after mounted This avoids a React warning about trying to call `setState` before the component is mounted. --- src/components/structures/LoggedInView.tsx | 34 +++++++++++++--------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index ec5afd13f0..70ec2b7033 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -140,7 +140,7 @@ class LoggedInView extends React.Component { protected readonly _matrixClient: MatrixClient; protected readonly _roomView: React.RefObject; protected readonly _resizeContainer: React.RefObject; - protected readonly _compactLayoutWatcherRef: string; + protected compactLayoutWatcherRef: string; protected resizer: Resizer; constructor(props, context) { @@ -157,18 +157,6 @@ class LoggedInView extends React.Component { CallMediaHandler.loadDevices(); - document.addEventListener('keydown', this._onNativeKeyDown, false); - - this._updateServerNoticeEvents(); - - this._matrixClient.on("accountData", this.onAccountData); - this._matrixClient.on("sync", this.onSync); - this._matrixClient.on("RoomState.events", this.onRoomStateEvents); - - this._compactLayoutWatcherRef = SettingsStore.watchSetting( - "useCompactLayout", null, this.onCompactLayoutChanged, - ); - fixupColorFonts(); this._roomView = React.createRef(); @@ -176,6 +164,24 @@ class LoggedInView extends React.Component { } componentDidMount() { + document.addEventListener('keydown', this._onNativeKeyDown, false); + + this._updateServerNoticeEvents(); + + this._matrixClient.on("accountData", this.onAccountData); + this._matrixClient.on("sync", this.onSync); + // Call `onSync` with the current state as well + this.onSync( + this._matrixClient.getSyncState(), + null, + this._matrixClient.getSyncStateData(), + ); + this._matrixClient.on("RoomState.events", this.onRoomStateEvents); + + this.compactLayoutWatcherRef = SettingsStore.watchSetting( + "useCompactLayout", null, this.onCompactLayoutChanged, + ); + this.resizer = this._createResizer(); this.resizer.attach(); this._loadResizerPreferences(); @@ -186,7 +192,7 @@ class LoggedInView extends React.Component { this._matrixClient.removeListener("accountData", this.onAccountData); this._matrixClient.removeListener("sync", this.onSync); this._matrixClient.removeListener("RoomState.events", this.onRoomStateEvents); - SettingsStore.unwatchSetting(this._compactLayoutWatcherRef); + SettingsStore.unwatchSetting(this.compactLayoutWatcherRef); this.resizer.detach(); } From 729356394e30672832f176a338eade2b1f3de51c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 13:54:38 +0000 Subject: [PATCH 28/40] Use room-specific listeners for message previews This should be a bit faster (since we now only notify one tile instead of all for each update). It also resolves the max listener warning. Fixes https://github.com/vector-im/element-web/issues/15121 --- src/components/views/rooms/RoomTile.tsx | 22 ++++++++++++++++++--- src/stores/room-list/MessagePreviewStore.ts | 10 +++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index a241a13991..2ad10c79c8 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -29,7 +29,7 @@ import ActiveRoomObserver from "../../../ActiveRoomObserver"; import { _t } from "../../../languageHandler"; import { ChevronFace, ContextMenuTooltipButton } from "../../structures/ContextMenu"; import { DefaultTagID, TagID } from "../../../stores/room-list/models"; -import { MessagePreviewStore, ROOM_PREVIEW_CHANGED } from "../../../stores/room-list/MessagePreviewStore"; +import { MessagePreviewStore } from "../../../stores/room-list/MessagePreviewStore"; import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; import { ALL_MESSAGES, ALL_MESSAGES_LOUD, MENTIONS_ONLY, MUTE } from "../../../RoomNotifs"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; @@ -99,7 +99,10 @@ export default class RoomTile extends React.PureComponent { ActiveRoomObserver.addListener(this.props.room.roomId, this.onActiveRoomUpdate); this.dispatcherRef = defaultDispatcher.register(this.onAction); - MessagePreviewStore.instance.on(ROOM_PREVIEW_CHANGED, this.onRoomPreviewChanged); + MessagePreviewStore.instance.on( + MessagePreviewStore.getPreviewChangedEventName(this.props.room), + this.onRoomPreviewChanged, + ); this.notificationState = RoomNotificationStateStore.instance.getRoomState(this.props.room); this.notificationState.on(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate); this.roomProps = EchoChamber.forRoom(this.props.room); @@ -128,6 +131,16 @@ export default class RoomTile extends React.PureComponent { if (prevProps.showMessagePreview !== this.props.showMessagePreview && this.showMessagePreview) { this.setState({messagePreview: this.generatePreview()}); } + if (prevProps.room?.roomId !== this.props.room?.roomId) { + MessagePreviewStore.instance.off( + MessagePreviewStore.getPreviewChangedEventName(prevProps.room), + this.onRoomPreviewChanged, + ); + MessagePreviewStore.instance.on( + MessagePreviewStore.getPreviewChangedEventName(this.props.room), + this.onRoomPreviewChanged, + ); + } } public componentDidMount() { @@ -140,9 +153,12 @@ export default class RoomTile extends React.PureComponent { public componentWillUnmount() { if (this.props.room) { ActiveRoomObserver.removeListener(this.props.room.roomId, this.onActiveRoomUpdate); + MessagePreviewStore.instance.off( + MessagePreviewStore.getPreviewChangedEventName(this.props.room), + this.onRoomPreviewChanged, + ); } defaultDispatcher.unregister(this.dispatcherRef); - MessagePreviewStore.instance.off(ROOM_PREVIEW_CHANGED, this.onRoomPreviewChanged); this.notificationState.off(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate); CommunityPrototypeStore.instance.off(UPDATE_EVENT, this.onCommunityUpdate); } diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts index 2803f0a23e..38e56881cc 100644 --- a/src/stores/room-list/MessagePreviewStore.ts +++ b/src/stores/room-list/MessagePreviewStore.ts @@ -30,7 +30,7 @@ import { UPDATE_EVENT } from "../AsyncStore"; // Emitted event for when a room's preview has changed. First argument will the room for which // the change happened. -export const ROOM_PREVIEW_CHANGED = "room_preview_changed"; +const ROOM_PREVIEW_CHANGED = "room_preview_changed"; const PREVIEWS = { 'm.room.message': { @@ -84,6 +84,10 @@ export class MessagePreviewStore extends AsyncStoreWithClient { return MessagePreviewStore.internalInstance; } + public static getPreviewChangedEventName(room: Room): string { + return `${ROOM_PREVIEW_CHANGED}:${room?.roomId}`; + } + /** * Gets the pre-translated preview for a given room * @param room The room to get the preview for. @@ -150,7 +154,7 @@ export class MessagePreviewStore extends AsyncStoreWithClient { // We've muted the underlying Map, so just emit that we've changed. this.previews.set(room.roomId, map); this.emit(UPDATE_EVENT, this); - this.emit(ROOM_PREVIEW_CHANGED, room); + this.emit(MessagePreviewStore.getPreviewChangedEventName(room), room); } return; // we're done } @@ -158,7 +162,7 @@ export class MessagePreviewStore extends AsyncStoreWithClient { // At this point, we didn't generate a preview so clear it this.previews.set(room.roomId, new Map()); this.emit(UPDATE_EVENT, this); - this.emit(ROOM_PREVIEW_CHANGED, room); + this.emit(MessagePreviewStore.getPreviewChangedEventName(room), room); } protected async onAction(payload: ActionPayload) { From 8a341446aaecb00ccf357209ce5521e358365f71 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 14:34:56 +0000 Subject: [PATCH 29/40] Use room-specific listeners for community prototype Similar to message previews, this changes another area to use room-specific listeners for better performance and avoiding warnings. --- src/components/views/rooms/RoomTile.tsx | 18 ++++++++++++++++-- src/stores/CommunityPrototypeStore.ts | 9 +++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index 2ad10c79c8..959b2f162a 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -107,7 +107,10 @@ export default class RoomTile extends React.PureComponent { this.notificationState.on(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate); this.roomProps = EchoChamber.forRoom(this.props.room); this.roomProps.on(PROPERTY_UPDATED, this.onRoomPropertyUpdate); - CommunityPrototypeStore.instance.on(UPDATE_EVENT, this.onCommunityUpdate); + CommunityPrototypeStore.instance.on( + CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId), + this.onCommunityUpdate, + ); } private onNotificationUpdate = () => { @@ -140,6 +143,14 @@ export default class RoomTile extends React.PureComponent { MessagePreviewStore.getPreviewChangedEventName(this.props.room), this.onRoomPreviewChanged, ); + CommunityPrototypeStore.instance.off( + CommunityPrototypeStore.getUpdateEventName(prevProps.room?.roomId), + this.onCommunityUpdate, + ); + CommunityPrototypeStore.instance.on( + CommunityPrototypeStore.getUpdateEventName(this.props.room?.roomId), + this.onCommunityUpdate, + ); } } @@ -157,10 +168,13 @@ export default class RoomTile extends React.PureComponent { MessagePreviewStore.getPreviewChangedEventName(this.props.room), this.onRoomPreviewChanged, ); + CommunityPrototypeStore.instance.off( + CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId), + this.onCommunityUpdate, + ); } defaultDispatcher.unregister(this.dispatcherRef); this.notificationState.off(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate); - CommunityPrototypeStore.instance.off(UPDATE_EVENT, this.onCommunityUpdate); } private onAction = (payload: ActionPayload) => { diff --git a/src/stores/CommunityPrototypeStore.ts b/src/stores/CommunityPrototypeStore.ts index 95d56bd40e..92e094c83b 100644 --- a/src/stores/CommunityPrototypeStore.ts +++ b/src/stores/CommunityPrototypeStore.ts @@ -48,6 +48,10 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { return CommunityPrototypeStore.internalInstance; } + public static getUpdateEventName(roomId: string): string { + return `${UPDATE_EVENT}:${roomId}`; + } + public getSelectedCommunityId(): string { if (SettingsStore.getValue("feature_communities_v2_prototypes")) { return GroupFilterOrderStore.getSelectedTags()[0]; @@ -134,7 +138,8 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { } } else if (payload.action === "MatrixActions.accountData") { if (payload.event_type.startsWith("im.vector.group_info.")) { - this.emit(UPDATE_EVENT, payload.event_type.substring("im.vector.group_info.".length)); + const roomId = payload.event_type.substring("im.vector.group_info.".length); + this.emit(CommunityPrototypeStore.getUpdateEventName(roomId), roomId); } } else if (payload.action === "select_tag") { // Automatically select the general chat when switching communities @@ -167,7 +172,7 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { if (getEffectiveMembership(myMember.membership) === EffectiveMembership.Invite) { // Fake an update for anything that might have started listening before the invite // data was available (eg: RoomPreviewBar after a refresh) - this.emit(UPDATE_EVENT, room.roomId); + this.emit(CommunityPrototypeStore.getUpdateEventName(room.roomId), room.roomId); } } } From 462e0889f05172e06de3927cf81d594af848d748 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 14:46:38 +0000 Subject: [PATCH 30/40] Fix lint --- src/components/views/rooms/RoomTile.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index 959b2f162a..c985e80010 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -51,7 +51,6 @@ import IconizedContextMenu, { IconizedContextMenuRadio, } from "../context_menus/IconizedContextMenu"; import { CommunityPrototypeStore, IRoomProfile } from "../../../stores/CommunityPrototypeStore"; -import { UPDATE_EVENT } from "../../../stores/AsyncStore"; interface IProps { room: Room; From ea61c979f91f323d6806f4044bb95808c5794074 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 16 Jan 2021 23:29:27 -0700 Subject: [PATCH 31/40] Try a different string --- src/i18n/strings/en_EN.json | 2 +- src/widgets/CapabilityText.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b53bb90c92..384f6d04e9 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -584,7 +584,7 @@ "Send stickers into this room": "Send stickers into this room", "Send stickers into your active room": "Send stickers into your active room", "Change which room you're viewing": "Change which room you're viewing", - "Change which room you're viewing and use permalinks": "Change which room you're viewing and use permalinks", + "Change which room, message, or user you're viewing": "Change which room, message, or user you're viewing", "Change the topic of this room": "Change the topic of this room", "See when the topic changes in this room": "See when the topic changes in this room", "Change the topic of your active room": "Change the topic of your active room", diff --git a/src/widgets/CapabilityText.tsx b/src/widgets/CapabilityText.tsx index 044b7701ba..273d22dc81 100644 --- a/src/widgets/CapabilityText.tsx +++ b/src/widgets/CapabilityText.tsx @@ -61,7 +61,7 @@ export class CapabilityText { [GENERIC_WIDGET_KIND]: _td("Change which room you're viewing"), }, [MatrixCapabilities.MSC2931Navigate]: { - [GENERIC_WIDGET_KIND]: _td("Change which room you're viewing and use permalinks"), + [GENERIC_WIDGET_KIND]: _td("Change which room, message, or user you're viewing"), }, }; From f6a328a55b44ca508a6aaed7ef7f63f5759d110c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 16 Jan 2021 23:34:16 -0700 Subject: [PATCH 32/40] Update widget api --- package.json | 2 +- yarn.lock | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 92b574da34..cb70541f99 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "linkifyjs": "^2.1.9", "lodash": "^4.17.19", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", - "matrix-widget-api": "^0.1.0-beta.10", + "matrix-widget-api": "0.1.0-beta.11", "minimist": "^1.2.5", "pako": "^1.0.11", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index b0769c2c04..e2292d66ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1809,6 +1809,11 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== +"@types/events@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + "@types/fbemitter@*": version "2.0.32" resolved "https://registry.yarnpkg.com/@types/fbemitter/-/fbemitter-2.0.32.tgz#8ed204da0f54e9c8eaec31b1eec91e25132d082c" @@ -6580,11 +6585,12 @@ matrix-react-test-utils@^0.2.2: resolved "https://registry.yarnpkg.com/matrix-react-test-utils/-/matrix-react-test-utils-0.2.2.tgz#c87144d3b910c7edc544a6699d13c7c2bf02f853" integrity sha512-49+7gfV6smvBIVbeloql+37IeWMTD+fiywalwCqk8Dnz53zAFjKSltB3rmWHso1uecLtQEcPtCijfhzcLXAxTQ== -matrix-widget-api@^0.1.0-beta.10: - version "0.1.0-beta.10" - resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-0.1.0-beta.10.tgz#2e4d658d90ff3152c5567089b4ddd21fb44ec1dd" - integrity sha512-yX2UURjM1zVp7snPiOFcH9+FDBdHfAdt5HEAyDUHGJ7w/F2zOtcK/y0dMlZ1+XhxY7Wv0IBZH0US8X/ioJRX1A== +matrix-widget-api@0.1.0-beta.11: + version "0.1.0-beta.11" + resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-0.1.0-beta.11.tgz#3658e244bf82eebea36e64475ebfce86b778b476" + integrity sha512-RxIghopRKTQdmYMJzZg/QR+wcPcKe9S1pZZ31zN/M1LKsvTLThBYdMcP1idKh7MkhpO9eCdCVjJOMJTrqxNzbQ== dependencies: + "@types/events" "^3.0.0" events "^3.2.0" mdast-util-compact@^1.0.0: From 461c0733d9325c4620d876ca82eea46f4d39c6b9 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 18 Jan 2021 11:35:08 +0000 Subject: [PATCH 33/40] Revert strings --- src/i18n/strings/ar.json | 2 +- src/i18n/strings/bg.json | 4 ++-- src/i18n/strings/cs.json | 4 ++-- src/i18n/strings/de_DE.json | 4 ++-- src/i18n/strings/en_EN.json | 20 +++++--------------- src/i18n/strings/eo.json | 4 ++-- src/i18n/strings/es.json | 4 ++-- src/i18n/strings/et.json | 4 ++-- src/i18n/strings/eu.json | 4 ++-- src/i18n/strings/fi.json | 4 ++-- src/i18n/strings/fr.json | 4 ++-- src/i18n/strings/gl.json | 4 ++-- src/i18n/strings/hu.json | 4 ++-- src/i18n/strings/it.json | 4 ++-- src/i18n/strings/kab.json | 4 ++-- src/i18n/strings/lt.json | 4 ++-- src/i18n/strings/nl.json | 4 ++-- src/i18n/strings/pt_BR.json | 4 ++-- src/i18n/strings/ru.json | 4 ++-- src/i18n/strings/sk.json | 4 ++-- src/i18n/strings/sq.json | 4 ++-- src/i18n/strings/sv.json | 4 ++-- src/i18n/strings/tr.json | 4 ++-- src/i18n/strings/uk.json | 4 ++-- src/i18n/strings/zh_Hans.json | 4 ++-- src/i18n/strings/zh_Hant.json | 4 ++-- 26 files changed, 54 insertions(+), 64 deletions(-) diff --git a/src/i18n/strings/ar.json b/src/i18n/strings/ar.json index 8e8ae3f775..5da09afd23 100644 --- a/src/i18n/strings/ar.json +++ b/src/i18n/strings/ar.json @@ -1056,7 +1056,7 @@ "Failed to upload profile picture!": "تعذَّر رفع صورة الملف الشخصي!", "Show more": "أظهر أكثر", "Show less": "أظهر أقل", - "Channel: ": "قناة: ", + "Channel: %(channelName)s": "قناة: %(channelName)s", "This bridge is managed by .": "هذا الجسر يديره .", "Upload": "رفع", "Accept to continue:": "قبول للمتابعة:", diff --git a/src/i18n/strings/bg.json b/src/i18n/strings/bg.json index ebe4e65a16..e4010e8b64 100644 --- a/src/i18n/strings/bg.json +++ b/src/i18n/strings/bg.json @@ -1840,8 +1840,8 @@ "Other users may not trust it": "Други потребители може да не се доверят", "From %(deviceName)s (%(deviceId)s)": "От %(deviceName)s (%(deviceId)s)", "This bridge was provisioned by .": "Мостът е настроен от .", - "Workspace: ": "Работна област: ", - "Channel: ": "Канал: ", + "Workspace: %(networkName)s": "Работна област: %(networkName)s", + "Channel: %(channelName)s": "Канал: %(channelName)s", "Show less": "Покажи по-малко", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Промяната на паролата в момента би нулирало всички ключове за шифроване-от-край-до-край, правейки историята на чата нечетима, освен ако първо не експортирате ключовете, а след промяната на паролата ги импортирате. В бъдеще, това ще бъде подобрено.", "Your homeserver does not support cross-signing.": "Сървърът ви не поддържа кръстосано-подписване.", diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index d4451bb902..3f9d231317 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -1753,8 +1753,8 @@ "Review": "Prohlédnout", "This bridge was provisioned by .": "Toto propojení poskytuje .", "This bridge is managed by .": "Toto propojení spravuje .", - "Workspace: ": "Pracovní oblast: ", - "Channel: ": "Kanál: ", + "Workspace: %(networkName)s": "Pracovní oblast: %(networkName)s", + "Channel: %(channelName)s": "Kanál: %(channelName)s", "Show less": "Skrýt detaily", "Show more": "Více", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Změna hesla resetuje šifrovací klíče pro všechny vaše relace. Pokud si nejdřív nevyexportujete klíče místností a po změně je znovu neimportujete, nedostanete se k historickým zprávám. V budoucnu se toto zjednoduší.", diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 972440e80a..8588ccb7d6 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1668,8 +1668,8 @@ "Verify yourself & others to keep your chats safe": "Verifiziere dich & andere, um eure Chats zu schützen", "This bridge was provisioned by .": "Diese Brücke wurde von bereitgestellt.", "This bridge is managed by .": "Diese Brücke wird von verwaltet.", - "Workspace: ": "Arbeitsbereich: ", - "Channel: ": "Kanal: ", + "Workspace: %(networkName)s": "Arbeitsbereich: %(networkName)s", + "Channel: %(channelName)s": "Kanal: %(channelName)s", "Show less": "Weniger zeigen", "Warning: You should only set up key backup from a trusted computer.": "Achtung: Du solltest die Schlüsselsicherung nur auf einem vertrauenswürdigen Gerät einrichten.", "Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.": "Melde dich an um die ausschließlich in dieser Sitzung gespeicherten Verschlüsselungsschlüssel wiederherzustellen. Du benötigst sie, um deine verschlüsselten Nachrichten in jeder Sitzung zu lesen.", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ac45a6b763..c6a724f02f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -411,8 +411,6 @@ "Command error": "Command error", "Usage": "Usage", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Prepends ¯\\_(ツ)_/¯ to a plain-text message", - "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message": "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message", - "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message": "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message", "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message", "Sends a message as plain text, without interpreting it as markdown": "Sends a message as plain text, without interpreting it as markdown", "Sends a message as html, without interpreting it as markdown": "Sends a message as html, without interpreting it as markdown", @@ -861,9 +859,6 @@ "Fill Screen": "Fill Screen", "Return to call": "Return to call", "%(name)s on hold": "%(name)s on hold", - "Unable to look up phone number": "Unable to look up phone number", - "There was an error looking up the phone number": "There was an error looking up the phone number", - "Dial pad": "Dial pad", "Unknown caller": "Unknown caller", "Incoming voice call": "Incoming voice call", "Incoming video call": "Incoming video call", @@ -965,8 +960,10 @@ "Upload": "Upload", "This bridge was provisioned by .": "This bridge was provisioned by .", "This bridge is managed by .": "This bridge is managed by .", - "Workspace: ": "Workspace: ", - "Channel: ": "Channel: ", + "Workspace: %s": "Workspace: %s", + "Channel: %s": "Channel: %s", + "Show less": "Show less", + "Show more": "Show more", "Failed to upload profile picture!": "Failed to upload profile picture!", "Upload new:": "Upload new:", "No display name": "No display name", @@ -1460,8 +1457,6 @@ "Hide Widgets": "Hide Widgets", "Show Widgets": "Show Widgets", "Search": "Search", - "Start a Conversation": "Start a Conversation", - "Open dial pad": "Open dial pad", "Invites": "Invites", "Favourites": "Favourites", "People": "People", @@ -1530,7 +1525,6 @@ "Jump to first invite.": "Jump to first invite.", "Show %(count)s more|other": "Show %(count)s more", "Show %(count)s more|one": "Show %(count)s more", - "Show less": "Show less", "Use default": "Use default", "All messages": "All messages", "Mentions & Keywords": "Mentions & Keywords", @@ -1593,7 +1587,6 @@ "New published address (e.g. #alias:server)": "New published address (e.g. #alias:server)", "Local Addresses": "Local Addresses", "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)": "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", - "Show more": "Show more", "Error updating flair": "Error updating flair", "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.": "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.", "Invalid community ID": "Invalid community ID", @@ -2082,8 +2075,6 @@ "We couldn't create your DM. Please check the users you want to invite and try again.": "We couldn't create your DM. Please check the users you want to invite and try again.", "Something went wrong trying to invite the users.": "Something went wrong trying to invite the users.", "We couldn't invite those users. Please check the users you want to invite and try again.": "We couldn't invite those users. Please check the users you want to invite and try again.", - "A call can only be transferred to a single user.": "A call can only be transferred to a single user.", - "Failed to transfer call": "Failed to transfer call", "Failed to find the following users": "Failed to find the following users", "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s": "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s", "Recent Conversations": "Recent Conversations", @@ -2097,7 +2088,6 @@ "Go": "Go", "Invite someone using their name, email address, username (like ) or share this room.": "Invite someone using their name, email address, username (like ) or share this room.", "Invite someone using their name, username (like ) or share this room.": "Invite someone using their name, username (like ) or share this room.", - "Transfer": "Transfer", "a new master key signature": "a new master key signature", "a new cross-signing key signature": "a new cross-signing key signature", "a device cross-signing signature": "a device cross-signing signature", @@ -2439,7 +2429,7 @@ "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’re all caught up": "You’re all caught up", - "You have no visible notifications.": "You have no visible notifications.", + "You have no visible notifications in this room.": "You have no visible notifications in this room.", "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.": "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.", "%(brand)s failed to get the public room list.": "%(brand)s failed to get the public room list.", "The homeserver may be unavailable or overloaded.": "The homeserver may be unavailable or overloaded.", diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index f151d8a857..3545565fa3 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -1720,7 +1720,7 @@ "They don't match": "Ili ne akordas", "To be secure, do this in person or use a trusted way to communicate.": "Por plia sekureco, faru tion persone, aŭ uzu alian fidatan komunikilon.", "Verify yourself & others to keep your chats safe": "Kontrolu vin mem kaj aliajn por sekurigi viajn babilojn", - "Channel: ": "Kanalo: ", + "Channel: %(channelName)s": "Kanalo: %(channelName)s", "Show less": "Montri malpli", "Show more": "Montri pli", "Help": "Helpo", @@ -1760,7 +1760,7 @@ "Review": "Rekontroli", "This bridge was provisioned by .": "Ĉi tiu ponto estas provizita de .", "This bridge is managed by .": "Ĉi tiu ponto estas administrata de .", - "Workspace: ": "Labortablo: ", + "Workspace: %(networkName)s": "Labortablo: %(networkName)s", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ŝanĝo de pasvorto nuntempe restarigos ĉiujn tutvoje ĉifrajn ŝlosilojn en ĉiuj salutaĵoj, malebligante legadon de ĉifrita historio, malse vi unue elportus la ŝlosilojn de viaj ĉambroj kaj reenportus ilin poste. Ĉi tion ni plibonigos ose.", "Your homeserver does not support cross-signing.": "Via hejmservilo ne subtenas delegajn subskribojn.", "Cross-signing and secret storage are enabled.": "Delegaj subskriboj kaj sekreta deponejo estas ŝaltitaj.", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 11c92c9ccf..34c40800f7 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1209,8 +1209,8 @@ "Verify": "Verificar", "Later": "Más tarde", "Upload": "Subir", - "Workspace: ": "Espacio de trabajo: ", - "Channel: ": "Canal: ", + "Workspace: %(networkName)s": "Espacio de trabajo: %(networkName)s", + "Channel: %(channelName)s": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar más", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Cambiar la contraseña reiniciará cualquier clave de encriptación end-to-end en todas las sesiones, haciendo el historial de conversaciones encriptado ilegible, a no ser que primero exportes tus claves de sala y después las reimportes. En un futuro esto será mejorado.", diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 3361242ce5..10f4b6f4a0 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1804,8 +1804,8 @@ "Waiting for your other session to verify…": "Ootan, et sinu teine sessioon alustaks verifitseerimist…", "This bridge was provisioned by .": "Selle võrgusilla võttis kasutusele .", "This bridge is managed by .": "Seda võrgusilda haldab .", - "Workspace: ": "Tööruum: ", - "Channel: ": "Kanal: ", + "Workspace: %(networkName)s": "Tööruum: %(networkName)s", + "Channel: %(channelName)s": "Kanal: %(channelName)s", "Upload new:": "Lae üles uus:", "Export E2E room keys": "Ekspordi jututubade läbiva krüptimise võtmed", "Your homeserver does not support cross-signing.": "Sinu koduserver ei toeta risttunnustamist.", diff --git a/src/i18n/strings/eu.json b/src/i18n/strings/eu.json index 8809129efe..2740ea2079 100644 --- a/src/i18n/strings/eu.json +++ b/src/i18n/strings/eu.json @@ -1805,8 +1805,8 @@ "Verify yourself & others to keep your chats safe": "Egiaztatu zure burua eta besteak txatak seguru mantentzeko", "Review": "Berrikusi", "This bridge was provisioned by .": "Zubi hau erabiltzaileak hornitu du.", - "Workspace: ": "Lan eremua: ", - "Channel: ": "Kanala: ", + "Workspace: %(networkName)s": "Lan eremua: %(networkName)s", + "Channel: %(channelName)s": "Kanala: %(channelName)s", "Show less": "Erakutsi gutxiago", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Pasahitza aldatzean oraingo muturretik muturrerako zifratze gako guztiak ezeztatuko ditu saio guztietan, zifratutako txaten historiala ezin izango da irakurri ez badituzu aurretik zure geletako gakoak esportatzen eta gero berriro inportatzen. Etorkizunean hau hobetuko da.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Zure kontuak zeharkako sinatze identitate bat du biltegi sekretuan, baina saio honek ez du oraindik fidagarritzat.", diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index e4bcc0623d..842ee436b6 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -1876,8 +1876,8 @@ "Review": "Katselmoi", "This bridge was provisioned by .": "Tämän sillan tarjoaa käyttäjä .", "This bridge is managed by .": "Tätä siltaa hallinnoi käyttäjä .", - "Workspace: ": "Työtila: ", - "Channel: ": "Kanava: ", + "Workspace: %(networkName)s": "Työtila: %(networkName)s", + "Channel: %(channelName)s": "Kanava: %(channelName)s", "Delete %(count)s sessions|other": "Poista %(count)s istuntoa", "Enable": "Ota käyttöön", "Backup is not signed by any of your sessions": "Mikään istuntosi ei ole allekirjoittanut varmuuskopiota", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 8b7e2656ea..efae1f7b26 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -1809,8 +1809,8 @@ "They match": "Ils correspondent", "They don't match": "Ils ne correspondent pas", "This bridge was provisioned by .": "Cette passerelle a été fournie par .", - "Workspace: ": "Espace de travail : ", - "Channel: ": "Canal : ", + "Workspace: %(networkName)s": "Espace de travail : %(networkName)s", + "Channel: %(channelName)s": "Canal : %(channelName)s", "Show less": "En voir moins", "This room is bridging messages to the following platforms. Learn more.": "Ce salon transmet les messages vers les plateformes suivantes. En savoir plus.", "This room isn’t bridging messages to any platforms. Learn more.": "Ce salon ne transmet les messages à aucune plateforme. En savoir plus.", diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index d43ff020ab..cc3575dbb3 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1307,8 +1307,8 @@ "Upload": "Subir", "This bridge was provisioned by .": "Esta ponte está proporcionada por .", "This bridge is managed by .": "Esta ponte está xestionada por .", - "Workspace: ": "Espazo de traballo: ", - "Channel: ": "Canal: ", + "Workspace: %(networkName)s": "Espazo de traballo: %(networkName)s", + "Channel: %(channelName)s": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar máis", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao cambiar o contrasinal vas restablecer todas as chaves de cifrado extremo-a-extremo en tódalas sesións, facendo que o historial de conversa cifrado non sexa lexible, a menos que primeiro exportes todas as chaves das salas e as importes posteriormente. No futuro melloraremos o procedemento.", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index d8d3f01f66..2739154c19 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -1793,8 +1793,8 @@ "Enable message search in encrypted rooms": "Üzenetek keresésének bekapcsolása a titkosított szobákban", "Review": "Átnéz", "This bridge was provisioned by .": "Ezt a hidat az alábbi felhasználó készítette: .", - "Workspace: ": "Munkahely: ", - "Channel: ": "Csatorna: ", + "Workspace: %(networkName)s": "Munkahely: %(networkName)s", + "Channel: %(channelName)s": "Csatorna: %(channelName)s", "Show less": "Kevesebbet mutat", "Securely cache encrypted messages locally for them to appear in search results, using ": "A titkosított üzenetek kereséséhez azokat biztonságos módon helyileg kell tárolnod, felhasználva: ", " to store messages from ": " üzenetek tárolásához ", diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 616071c785..74255a6d2a 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -1797,8 +1797,8 @@ "They don't match": "Non corrispondono", "Review": "Controlla", "This bridge was provisioned by .": "Questo bridge è stato fornito da .", - "Workspace: ": "Spazio di lavoro: ", - "Channel: ": "Canale: ", + "Workspace: %(networkName)s": "Spazio di lavoro: %(networkName)s", + "Channel: %(channelName)s": "Canale: %(channelName)s", "Show less": "Mostra meno", "Securely cache encrypted messages locally for them to appear in search results, using ": "Tieni in cache localmente i messaggi cifrati in modo sicuro affinché appaiano nei risultati di ricerca, usando ", " to store messages from ": " per conservare i messaggi da ", diff --git a/src/i18n/strings/kab.json b/src/i18n/strings/kab.json index 74b203efb6..7a9261f25c 100644 --- a/src/i18n/strings/kab.json +++ b/src/i18n/strings/kab.json @@ -847,8 +847,8 @@ "Accept to continue:": "Qbel i wakken ad tkemmleḍ:", "This bridge was provisioned by .": "Tileggit-a tella-d sɣur .", "This bridge is managed by .": "Tileggit-a tettusefrak sɣur .", - "Workspace: ": "Tallunt n uxeddim: ", - "Channel: ": "Abadu: ", + "Workspace: %(networkName)s": "Tallunt n uxeddim: %(networkName)s", + "Channel: %(channelName)s": "Abadu: %(channelName)s", "Upload new:": "Asali amaynut:", "New passwords don't match": "Awalen uffiren imaynuten ur mṣadan ara", "Passwords can't be empty": "Awalen uffiren ur ilaq ara ad ilin d ilmawen", diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index b4fc60b931..62b34104a6 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -1953,8 +1953,8 @@ "not found in storage": "saugykloje nerasta", "Cross-signing is not set up.": "Kryžminis pasirašymas nenustatytas.", "Cross-signing is ready for use.": "Kryžminis pasirašymas yra paruoštas naudoti.", - "Channel: ": "Kanalas: ", - "Workspace: ": "Darbo sritis: ", + "Channel: %(channelName)s": "Kanalas: %(channelName)s", + "Workspace: %(networkName)s": "Darbo sritis: %(networkName)s", "This bridge is managed by .": "Šis tiltas yra tvarkomas .", "This bridge was provisioned by .": "Šis tiltas buvo parūpintas .", "Your server isn't responding to some requests.": "Jūsų serveris neatsako į kai kurias užklausas.", diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index 1277769ad3..1ec887c364 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -1625,8 +1625,8 @@ "Decline (%(counter)s)": "Afwijzen (%(counter)s)", "This bridge was provisioned by .": "Dank aan voor de brug.", "This bridge is managed by .": "Brug onderhouden door .", - "Workspace: ": "Werkruimte: ", - "Channel: ": "Kanaal: ", + "Workspace: %(networkName)s": "Werkruimte: %(networkName)s", + "Channel: %(channelName)s": "Kanaal: %(channelName)s", "Show less": "Minder tonen", "Show more": "Meer tonen", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Momenteel stelt een wachtwoordswijziging alle berichtsleutels in alle sessies opnieuw in, en maakt zo oude versleutelde berichten onleesbaar - tenzij u uw sleutels eerst wegschrijft, en na afloop weer inleest. Dit zal verbeterd worden.", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index d3ecf00c1c..b456c98aed 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -1380,8 +1380,8 @@ "Upload": "Enviar", "This bridge was provisioned by .": "Esta integração foi disponibilizada por .", "This bridge is managed by .": "Esta integração é desenvolvida por .", - "Workspace: ": "Espaço de trabalho: ", - "Channel: ": "Canal: ", + "Workspace: %(networkName)s": "Espaço de trabalho: %(networkName)s", + "Channel: %(channelName)s": "Canal: %(channelName)s", "Show less": "Mostrar menos", "Show more": "Mostrar mais", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ao mudar a senha, você apagará todas as chaves de criptografia de ponta a ponta existentes em todas as sessões, fazendo com que o histórico de conversas criptografadas fique ilegível, a não ser que você exporte as salas das chaves criptografadas antes de mudar a senha e então as importe novamente depois. No futuro, isso será melhorado.", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index b99fef0915..bb6dbdf308 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -1670,8 +1670,8 @@ "Decline (%(counter)s)": "Отклонить (%(counter)s)", "This bridge was provisioned by .": "Этот мост был подготовлен пользователем .", "This bridge is managed by .": "Этот мост управляется .", - "Workspace: ": "Рабочая область: ", - "Channel: ": "Канал: ", + "Workspace: %(networkName)s": "Рабочая область: %(networkName)s", + "Channel: %(channelName)s": "Канал: %(channelName)s", "Show less": "Показать меньше", "Show more": "Показать больше", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Если вы не экспортируете ключи для этой комнаты и не импортируете их в будущем, смена пароля приведёт к сбросу всех ключей сквозного шифрования и сделает невозможным чтение истории чата. В будущем это будет улучшено.", diff --git a/src/i18n/strings/sk.json b/src/i18n/strings/sk.json index 77e7d9de2b..454d86cb64 100644 --- a/src/i18n/strings/sk.json +++ b/src/i18n/strings/sk.json @@ -1536,8 +1536,8 @@ "Joins room with given address": "Pridať sa do miestnosti s danou adresou", "Unrecognised room address:": "Nerozpoznaná adresa miestnosti:", "This bridge is managed by .": "Tento most spravuje .", - "Workspace: ": "Pracovisko: ", - "Channel: ": "Kanál: ", + "Workspace: %(networkName)s": "Pracovisko: %(networkName)s", + "Channel: %(channelName)s": "Kanál: %(channelName)s", "Show less": "Zobraziť menej", "Show more": "Zobraziť viac", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Zmena hesla reštartuje všetky šifrovacie kľúče pre všetky vaše relácie. Šifrované správy sa stanú nečitateľnými, pokiaľ najprv nevyexportujete vaše kľúče a po zmene ich nenaimportujete. V budúcnosti sa tento proces zjednoduší.", diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index a65892f4d0..827df3fb70 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -1819,8 +1819,8 @@ "To be secure, do this in person or use a trusted way to communicate.": "Për të qenë i sigurt, bëjeni këtë duke qenë vetë i pranishëm ose përdorni për të komunikuar një rrugë të besuar.", "Verify yourself & others to keep your chats safe": "Verifikoni veten & të tjerët, që t’i mbani bisedat tuaja të sigurta", "This bridge was provisioned by .": "Kjo urë është dhënë nga .", - "Workspace: ": "Hapësirë pune: ", - "Channel: ": "Kanal: ", + "Workspace: %(networkName)s": "Hapësirë pune: %(networkName)s", + "Channel: %(channelName)s": "Kanal: %(channelName)s", "Show less": "Shfaq më pak", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Ndryshimi i fjalëkalimit do të sjellë zerimin e çfarëdo kyçesh fshehtëzimi skaj-më-skaj në krejt sesionet, duke e bërë të palexueshëm historikun e fshehtëzuar të bisedave, hiq rastin kur i eksportoni më parë kyçet tuaj të dhomës dhe i ri-importoni ata më pas. Në të ardhmen kjo do të përmirësohet.", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Llogaria juaj ka një identitet cross-signing në depozitë të fshehtë, por s’është ende i besuar në këtë sesion.", diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 4824895988..8c053de410 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -1692,8 +1692,8 @@ "From %(deviceName)s (%(deviceId)s)": "Från %(deviceName)s (%(deviceId)s)", "This bridge was provisioned by .": "Den här bryggan tillhandahålls av .", "This bridge is managed by .": "Den här bryggan tillhandahålls av .", - "Workspace: ": "Arbetsyta: ", - "Channel: ": "Kanal: ", + "Workspace: %(networkName)s": "Arbetsyta: %(networkName)s", + "Channel: %(channelName)s": "Kanal: %(channelName)s", "Show less": "Visa mindre", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Att byta lösenord återställer just nu alla krypteringsnycklar på alla sessioner, vilket gör krypterad chatthistorik oläslig om du inte först exporterar dina rumsnycklar och sedan importerar dem igen efteråt. Detta kommer att förbättras i framtiden.", "Your homeserver does not support cross-signing.": "Din hemserver stöder inte korssignering.", diff --git a/src/i18n/strings/tr.json b/src/i18n/strings/tr.json index c7711973f9..5a152eeab6 100644 --- a/src/i18n/strings/tr.json +++ b/src/i18n/strings/tr.json @@ -1410,8 +1410,8 @@ "Other users may not trust it": "Diğer kullanıcılar güvenmeyebilirler", "Later": "Sonra", "Review": "Gözden Geçirme", - "Workspace: ": "Çalışma alanı: ", - "Channel: ": "Kanal: ", + "Workspace: %(networkName)s": "Çalışma alanı: %(networkName)s", + "Channel: %(channelName)s": "Kanal: %(channelName)s", "Show less": "Daha az göster", "Show more": "Daha fazla göster", "in memory": "hafızada", diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 37b9472d3c..061c0799ac 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -955,8 +955,8 @@ "Globe": "Глобус", "This bridge was provisioned by .": "Цей місток був підготовленим .", "This bridge is managed by .": "Цей міст керується .", - "Workspace: ": "Робочий простір: ", - "Channel: ": "Канал: ", + "Workspace: %(networkName)s": "Робочий простір: %(networkName)s", + "Channel: %(channelName)s": "Канал: %(channelName)s", "Show less": "Згорнути", "Show more": "Розгорнути", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Змінення пароля призведе до скидання всіх ключів наскрізного шифрування та унеможливить читання історії листування, якщо тільки ви не експортуєте ваші ключі кімнати та не імпортуєте їх згодом. Це буде вдосконалено у майбутньому.", diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 45ca22fdcd..672b1befd1 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -2320,8 +2320,8 @@ "Uploading logs": "正在上传日志", "Downloading logs": "正在下载日志", "This bridge was provisioned by .": "桥接由 准备。", - "Workspace: ": "工作区:", - "Channel: ": "频道:", + "Workspace: %(networkName)s": "工作区:%(networkName)s", + "Channel: %(channelName)s": "频道:%(channelName)s", "well formed": "格式正确", "Master private key:": "主私钥:", "Self signing private key:": "自签名私钥:", diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index b8cecd3b76..c820d9b1cf 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -1804,8 +1804,8 @@ "To be secure, do this in person or use a trusted way to communicate.": "為了安全,請親自進行或使用可信的通訊方式。", "Review": "評論", "This bridge was provisioned by .": "此橋接是由 設定。", - "Workspace: ": "工作空間:", - "Channel: ": "頻道:", + "Workspace: %(networkName)s": "工作空間:%(networkName)s", + "Channel: %(channelName)s": "頻道:%(channelName)s", "Show less": "顯示較少", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "變更密碼將會重設所有工作階段上的所有端到端加密金鑰,讓已加密的聊天歷史無法讀取,除非您先匯出您的聊天室金鑰並在稍後重新匯入。未來會有所改善。", "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "您的帳號在秘密儲存空間中有交叉簽章的身份,但尚未被此工作階段信任。", From 74b5febb9c7cb3e6584574a7c8453a68c31ea399 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 18 Jan 2021 11:38:06 +0000 Subject: [PATCH 34/40] oops strings --- src/i18n/strings/en_EN.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 6137923264..851890bdb7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -411,6 +411,8 @@ "Command error": "Command error", "Usage": "Usage", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Prepends ¯\\_(ツ)_/¯ to a plain-text message", + "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message": "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message", + "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message": "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message", "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message", "Sends a message as plain text, without interpreting it as markdown": "Sends a message as plain text, without interpreting it as markdown", "Sends a message as html, without interpreting it as markdown": "Sends a message as html, without interpreting it as markdown", @@ -859,6 +861,9 @@ "Fill Screen": "Fill Screen", "Return to call": "Return to call", "%(name)s on hold": "%(name)s on hold", + "Unable to look up phone number": "Unable to look up phone number", + "There was an error looking up the phone number": "There was an error looking up the phone number", + "Dial pad": "Dial pad", "Unknown caller": "Unknown caller", "Incoming voice call": "Incoming voice call", "Incoming video call": "Incoming video call", @@ -960,8 +965,8 @@ "Upload": "Upload", "This bridge was provisioned by .": "This bridge was provisioned by .", "This bridge is managed by .": "This bridge is managed by .", - "Workspace: %s": "Workspace: %s", - "Channel: %s": "Channel: %s", + "Workspace: ": "Workspace: ", + "Channel: ": "Channel: ", "Show less": "Show less", "Show more": "Show more", "Failed to upload profile picture!": "Failed to upload profile picture!", @@ -1457,6 +1462,8 @@ "Hide Widgets": "Hide Widgets", "Show Widgets": "Show Widgets", "Search": "Search", + "Start a Conversation": "Start a Conversation", + "Open dial pad": "Open dial pad", "Invites": "Invites", "Favourites": "Favourites", "People": "People", @@ -2077,6 +2084,8 @@ "We couldn't create your DM. Please check the users you want to invite and try again.": "We couldn't create your DM. Please check the users you want to invite and try again.", "Something went wrong trying to invite the users.": "Something went wrong trying to invite the users.", "We couldn't invite those users. Please check the users you want to invite and try again.": "We couldn't invite those users. Please check the users you want to invite and try again.", + "A call can only be transferred to a single user.": "A call can only be transferred to a single user.", + "Failed to transfer call": "Failed to transfer call", "Failed to find the following users": "Failed to find the following users", "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s": "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s", "Recent Conversations": "Recent Conversations", @@ -2090,6 +2099,7 @@ "Go": "Go", "Invite someone using their name, email address, username (like ) or share this room.": "Invite someone using their name, email address, username (like ) or share this room.", "Invite someone using their name, username (like ) or share this room.": "Invite someone using their name, username (like ) or share this room.", + "Transfer": "Transfer", "a new master key signature": "a new master key signature", "a new cross-signing key signature": "a new cross-signing key signature", "a device cross-signing signature": "a device cross-signing signature", @@ -2431,7 +2441,7 @@ "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’re all caught up": "You’re all caught up", - "You have no visible notifications in this room.": "You have no visible notifications in this room.", + "You have no visible notifications.": "You have no visible notifications.", "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.": "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.", "%(brand)s failed to get the public room list.": "%(brand)s failed to get the public room list.", "The homeserver may be unavailable or overloaded.": "The homeserver may be unavailable or overloaded.", From e9d2daab8f03d29f904acce02c159d4ad3466bda Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 18 Jan 2021 13:09:39 +0000 Subject: [PATCH 35/40] fix strings --- src/i18n/strings/en_EN.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 851890bdb7..71b390f0fc 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -965,10 +965,8 @@ "Upload": "Upload", "This bridge was provisioned by .": "This bridge was provisioned by .", "This bridge is managed by .": "This bridge is managed by .", - "Workspace: ": "Workspace: ", - "Channel: ": "Channel: ", - "Show less": "Show less", - "Show more": "Show more", + "Workspace: ": "Workspace: ", + "Channel: ": "Channel: ", "Failed to upload profile picture!": "Failed to upload profile picture!", "Upload new:": "Upload new:", "No display name": "No display name", @@ -1532,6 +1530,7 @@ "Jump to first invite.": "Jump to first invite.", "Show %(count)s more|other": "Show %(count)s more", "Show %(count)s more|one": "Show %(count)s more", + "Show less": "Show less", "Use default": "Use default", "All messages": "All messages", "Mentions & Keywords": "Mentions & Keywords", @@ -1594,6 +1593,7 @@ "New published address (e.g. #alias:server)": "New published address (e.g. #alias:server)", "Local Addresses": "Local Addresses", "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)": "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", + "Show more": "Show more", "Error updating flair": "Error updating flair", "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.": "There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.", "Invalid community ID": "Invalid community ID", From c4570cdaee41b02510aae390e10abdc925d864fa Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 18 Jan 2021 15:09:22 +0000 Subject: [PATCH 36/40] Upgrade matrix-js-sdk to 9.5.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 050e2562a0..4bdcc3b6b8 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "katex": "^0.12.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "9.5.0-rc.1", + "matrix-js-sdk": "9.5.0", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index 00f97f966c..cb4fa0e13a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6553,10 +6553,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -matrix-js-sdk@9.5.0-rc.1: - version "9.5.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.5.0-rc.1.tgz#91c2f0ff969baea1416611a39354ca016cc1b7c6" - integrity sha512-TOWU6QKfc3BBTdLyzKMnc0trsaw9sQw3/LaNU/ZqP1LuVDK+qRQxcUfsev0EFfRKURIcI7KvtzRiV+DakN/X+Q== +matrix-js-sdk@9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.5.0.tgz#2f54e73b0fbb03e85b3f81f41da9d33b028c4b30" + integrity sha512-Fg1SGrZ4N2WAtgbK5mEoOfDwTGV83noJ3VUJ9z3rparbQCBr8Rd8ppHBD8RgshVWGdJMPJ4EQBwhQUgHeyhz9g== dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" From 5cf6d578838f8ec944e24842aeeb2783f478c95a Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 18 Jan 2021 15:14:52 +0000 Subject: [PATCH 37/40] Prepare changelog for v3.12.0 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef56762a31..8c460b4f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +Changes in [3.12.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.0) (2021-01-18) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.0-rc.1...v3.12.0) + + * Upgrade to JS SDK 9.5.0 + * Fix incoming call box on dark theme + [\#5543](https://github.com/matrix-org/matrix-react-sdk/pull/5543) + Changes in [3.12.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.0-rc.1) (2021-01-13) =============================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.11.1...v3.12.0-rc.1) From 5a54bb0e7f5a41622f42b549b1cb654543824a97 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 18 Jan 2021 15:14:53 +0000 Subject: [PATCH 38/40] v3.12.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bdcc3b6b8..807bcaf9f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.12.0-rc.1", + "version": "3.12.0", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 5455b90c980a207541c70c61c66ee3f6fc289819 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 18 Jan 2021 15:16:18 +0000 Subject: [PATCH 39/40] Resetting package fields for development --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 807bcaf9f4..710d1e784a 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "matrix-gen-i18n": "scripts/gen-i18n.js", "matrix-prune-i18n": "scripts/prune-i18n.js" }, - "main": "./lib/index.js", + "main": "./src/index.js", "matrix_src_main": "./src/index.js", "matrix_lib_main": "./lib/index.js", "matrix_lib_typings": "./lib/index.d.ts", @@ -188,6 +188,5 @@ "transformIgnorePatterns": [ "/node_modules/(?!matrix-js-sdk).+$" ] - }, - "typings": "./lib/index.d.ts" + } } From 6c8e6096da01cdc3153d2b120d9e9e3f5a482078 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 18 Jan 2021 15:16:31 +0000 Subject: [PATCH 40/40] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 710d1e784a..eb97ff1995 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "katex": "^0.12.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "9.5.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index cb4fa0e13a..eefe6e071e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6553,10 +6553,9 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -matrix-js-sdk@9.5.0: +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "9.5.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.5.0.tgz#2f54e73b0fbb03e85b3f81f41da9d33b028c4b30" - integrity sha512-Fg1SGrZ4N2WAtgbK5mEoOfDwTGV83noJ3VUJ9z3rparbQCBr8Rd8ppHBD8RgshVWGdJMPJ4EQBwhQUgHeyhz9g== + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/214a9df3823e602400b24d9a81cfc7b7df0a863b" dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0"