From efc5cf28893c79847b97fed8f99c9ad91d1e0109 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 21 Jun 2017 21:49:41 +0100 Subject: [PATCH] Remove dead special-casing for OLM.BAD_LEGACY_ACCOUNT_PICKLE We used to show a special error message when we got this error; however https://github.com/matrix-org/matrix-react-sdk/pull/783 made that not work. You'll only hit it if you're upgrading from some ancient version of Olm, and I'm quite happy for us to fall back to the generic 'couldn't restore: vape your storage?' flow in that case. (In any case that's preferable to dumping you at the login prompt with no warning that we've just vaped your storage). --- src/Lifecycle.js | 18 +----------------- src/i18n/strings/de_DE.json | 1 - src/i18n/strings/el.json | 1 - src/i18n/strings/en_EN.json | 1 - src/i18n/strings/en_US.json | 1 - src/i18n/strings/fr.json | 1 - src/i18n/strings/hu.json | 1 - src/i18n/strings/pt.json | 1 - src/i18n/strings/pt_BR.json | 1 - src/i18n/strings/ru.json | 1 - 10 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 424c58249c..06f5d9ef00 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -29,7 +29,6 @@ import DMRoomMap from './utils/DMRoomMap'; import RtsClient from './RtsClient'; import Modal from './Modal'; import sdk from './index'; -import { _t } from './languageHandler'; /** * Called at startup, to attempt to build a logged-in Matrix session. It tries @@ -237,27 +236,12 @@ function _restoreFromLocalStorage() { function _handleRestoreFailure(e) { console.log("Unable to restore session", e); - let msg = e.message; - if (msg == "OLM.BAD_LEGACY_ACCOUNT_PICKLE") { - msg = _t( - 'You need to log back in to generate end-to-end encryption keys' - + ' for this device and submit the public key to your homeserver.' - + ' This is a once off; sorry for the inconvenience.', - ); - - _clearStorage(); - - return q.reject(new Error( - _t('Unable to restore previous session') + ': ' + msg, - )); - } - const def = q.defer(); const SessionRestoreErrorDialog = sdk.getComponent('views.dialogs.SessionRestoreErrorDialog'); Modal.createDialog(SessionRestoreErrorDialog, { - error: msg, + error: e.message, onFinished: (success) => { def.resolve(success); }, diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index a99671402b..f328c364ce 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -305,7 +305,6 @@ "You are already in a call.": "Du bist bereits in einem Gespräch.", "You cannot place a call with yourself.": "Du kannst keinen Anruf mit dir selbst starten.", "You cannot place VoIP calls in this browser.": "VoIP-Gespräche werden von diesem Browser nicht unterstützt.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Du musst dich erneut anmelden, um Ende-zu-Ende-Verschlüsselungs-Schlüssel für dieses Gerät zu generieren und um den öffentlichen Schlüssel auf deinem Homeserver zu hinterlegen. Dies muss nur einmal durchgeführt werden, bitte entschuldige die Unannehmlichkeiten.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Deine E-Mail-Adresse scheint nicht mit einer Matrix-ID auf diesem Heimserver verbunden zu sein.", "Sun": "So", "Mon": "Mo", diff --git a/src/i18n/strings/el.json b/src/i18n/strings/el.json index 4e09fd7f2a..6ca1fafc29 100644 --- a/src/i18n/strings/el.json +++ b/src/i18n/strings/el.json @@ -861,7 +861,6 @@ "since the point in time of selecting this option": "από το χρονικό σημείο επιλογής αυτής της ρύθμισης", "The signing key you provided matches the signing key you received from %(userId)s's device %(deviceId)s. Device marked as verified.": "Το κλειδί υπογραφής που δώσατε αντιστοιχεί στο κλειδί υπογραφής που λάβατε από τη συσκευή %(userId)s %(deviceId)s. Η συσκευή έχει επισημανθεί ως επιβεβαιωμένη.", "To link to a room it must have an address.": "Για να συνδεθείτε σε ένα δωμάτιο πρέπει να έχετε μια διεύθυνση.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Πρέπει να συνδεθείτε ξανά για να δημιουργήσετε τα κλειδιά κρυπτογράφησης από άκρο σε άκρο για αυτήν τη συσκευή και να υποβάλετε το δημόσιο κλειδί στον διακομιστή σας. Αυτό θα χρειαστεί να γίνει μόνο μια φορά.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Η διεύθυνση ηλεκτρονικής αλληλογραφίας σας δεν φαίνεται να συσχετίζεται με Matrix ID σε αυτόν τον διακομιστή.", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Ο κωδικός πρόσβασής σας άλλαξε επιτυχώς. Δεν θα λάβετε ειδοποιήσεις push σε άλλες συσκευές μέχρι να συνδεθείτε ξανά σε αυτές", "You will not be able to undo this change as you are promoting the user to have the same power level as yourself.": "Δεν θα μπορέσετε να αναιρέσετε αυτήν την αλλαγή καθώς προωθείτε τον χρήστη να έχει το ίδιο επίπεδο δύναμης με τον εαυτό σας.", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 6334c797e8..7eb8beeafd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -668,7 +668,6 @@ "You need to be able to invite users to do that.": "You need to be able to invite users to do that.", "You need to be logged in.": "You need to be logged in.", "You need to enter a user name.": "You need to enter a user name.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Your email address does not appear to be associated with a Matrix ID on this Homeserver.", "Your password has been reset": "Your password has been reset", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index 5233111065..e060add84f 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -601,7 +601,6 @@ "You need to be able to invite users to do that.": "You need to be able to invite users to do that.", "You need to be logged in.": "You need to be logged in.", "You need to enter a user name.": "You need to enter a user name.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a one-off; sorry for the inconvenience.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Your email address does not appear to be associated with a Matrix ID on this Homeserver.", "Your password has been reset": "Your password has been reset", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 039198f0cf..5ba39d730b 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -566,7 +566,6 @@ "You need to be able to invite users to do that.": "Vous devez être capable d’inviter des utilisateurs pour faire ça.", "You need to be logged in.": "Vous devez être connecté.", "You need to enter a user name.": "Vous devez entrer un nom d’utilisateur.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Vous devez vous connecter à nouveau pour générer les clés d’encryption pour cet appareil, et soumettre la clé publique à votre homeserver. Cette action ne se reproduira pas ; veuillez nous excuser pour la gêne occasionnée.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Votre adresse e-mail ne semble pas associée à un identifiant Matrix sur ce homeserver.", "Your password has been reset": "Votre mot de passe a été réinitialisé", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Votre mot de passe a été mis à jour avec succès. Vous ne recevrez plus de notification sur vos appareils jusqu’à ce que vous vous identifiez à nouveau", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index f2fa3bb63e..6b0d03900c 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -675,7 +675,6 @@ "You need to be able to invite users to do that.": "Hogy ezt csinálhasd meg kell tudnod hívni felhasználókat.", "You need to be logged in.": "Be kell jelentkezz.", "You need to enter a user name.": "Be kell írnod a felhasználói nevet.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Ahhoz, hogy kulcsot tudjál készíteni a végponttól végpontig való titkosításhoz ehhez az eszközhöz és elküld a kulcsot a egyéni szerverhez vissza kell jelentkezned. Ez egyszeri alkalom, elnézést a kellemetlenségér.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Ez az e-mail cím, úgy néz ki, nincs összekötve a Matrix azonosítóval ezen az egyedi szerveren.", "Your password has been reset": "A jelszavad visszaállítottuk", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "A jelszavadat sikeresen megváltoztattuk. Nem kapsz \"push\" értesítéseket amíg a többi eszközön vissza nem jelentkezel" diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index a8dd8758d4..d48f1a914f 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -404,7 +404,6 @@ "You cannot place VoIP calls in this browser.": "Você não pode fazer chamadas de voz neste navegador.", "You need to be able to invite users to do that.": "Para fazer isso, você tem que ter permissão para convidar outras pessoas.", "You need to be logged in.": "Você tem que estar logado.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "É necessário que você faça login novamente para poder gerar as chaves de criptografia ponta-a-ponta para este dispositivo e então enviar sua chave pública para o servidor. Pedimos desculpas pela inconveniência, é preciso fazer isso apenas única uma vez.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "O seu endereço de email não parece estar associado a uma conta de usuária/o Matrix neste servidor.", "Set a display name:": "Defina um nome público para você:", "Upload an avatar:": "Envie uma imagem de perfil para identificar você:", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 1e915a5491..0dc732ebaa 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -405,7 +405,6 @@ "You cannot place VoIP calls in this browser.": "Você não pode fazer chamadas de voz neste navegador.", "You need to be able to invite users to do that.": "Para fazer isso, você tem que ter permissão para convidar outras pessoas.", "You need to be logged in.": "Você tem que estar logado.", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "É necessário que você faça login novamente para poder gerar as chaves de criptografia ponta-a-ponta para este dispositivo e então enviar sua chave pública para o servidor. Pedimos desculpas pela inconveniência, é preciso fazer isso apenas única uma vez.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "O seu endereço de email não parece estar associado a uma conta de usuária/o Matrix neste servidor.", "Set a display name:": "Defina um nome público para você:", "Upload an avatar:": "Envie uma imagem de perfil para identificar você:", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 6b6eadf928..30daf9d807 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -385,7 +385,6 @@ "Thu": "Чт", "Fri": "Пя", "Sat": "Сб", - "You need to log back in to generate end-to-end encryption keys for this device and submit the public key to your homeserver. This is a once off; sorry for the inconvenience.": "Вам необходимо снова войти в генерировать сквозное шифрование (е2е) ключей для этого устройства и предоставить публичный ключ Вашему домашнему серверу. Это после выключения; приносим извинения за причиненные неудобства.", "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Ваш адрес электронной почты, кажется, не связан с Matrix ID на этом Homeserver.", "to start a chat with someone": "Начать чат с кем-то", "to tag direct chat": "отметить прямой чат",