From 3a8bfbf7e0426a2db7b82d0569b807d3bb859199 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Sep 2017 17:11:30 +0100 Subject: [PATCH 01/10] Construct address picker message using provided `validAddressTypes` --- .../views/dialogs/AddressPickerDialog.js | 17 +++++++++++++++-- src/i18n/strings/en_EN.json | 7 ++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index c72510cbe7..4610388afc 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -419,7 +419,7 @@ module.exports = React.createClass({ address: addressText, isKnown: false, }; - if (addrType == null) { + if (!this.props.validAddressTypes.includes(addrType)) { this.setState({ error: true }); return null; } else if (addrType == 'mx-user-id') { @@ -517,8 +517,21 @@ module.exports = React.createClass({ let error; let addressSelector; if (this.state.error) { + let tryUsing = ''; + const validTypeDescriptions = this.props.validAddressTypes.map((t) => { + return { + 'mx-user-id': _t("Matrix ID"), + 'mx-room-id': _t("Matrix Room ID"), + 'email': _t("email address"), + }[t]; + }); + tryUsing = _t("Try using one of the following valid address types: %(validTypesList)s.", { + validTypesList: validTypeDescriptions.join(", "), + }); error =
- {_t("You have entered an invalid contact. Try using their Matrix ID or email address.")} + {_t("You have entered an invalid address.")} +
+ {tryUsing}
; } else if (this.state.searchError) { error =
{this.state.searchError}
; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 09b3f045df..a4219d7467 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -891,5 +891,10 @@ "Unpublish": "Unpublish", "This group is published on your profile": "This group is published on your profile", "Publish": "Publish", - "This group is not published on your profile": "This group is not published on your profile" + "This group is not published on your profile": "This group is not published on your profile", + "Matrix ID": "Matrix ID", + "Matrix Room ID": "Matrix Room ID", + "email address": "email address", + "Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.", + "You have entered an invalid address.": "You have entered an invalid address." } From 1f66baca4bbece167f587d5c1048a8b5ad644ab0 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Sep 2017 17:55:04 +0100 Subject: [PATCH 02/10] Remove "You have entered an invalid contact..." from translations --- 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/es.json | 1 - src/i18n/strings/eu.json | 1 - src/i18n/strings/fr.json | 1 - src/i18n/strings/hu.json | 1 - src/i18n/strings/ko.json | 1 - src/i18n/strings/lv.json | 1 - src/i18n/strings/nl.json | 1 - src/i18n/strings/pl.json | 1 - src/i18n/strings/pt.json | 1 - src/i18n/strings/pt_BR.json | 1 - src/i18n/strings/ru.json | 1 - src/i18n/strings/tr.json | 1 - src/i18n/strings/zh_Hans.json | 1 - src/i18n/strings/zh_Hant.json | 1 - 18 files changed, 18 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index e3c589bbb2..aa114e241d 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -734,7 +734,6 @@ "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "WARNUNG: SCHLÜSSEL-VERIFIZIERUNG FEHLGESCHLAGEN! Der Signatur-Schlüssel für %(userId)s und das Gerät %(deviceId)s ist \"%(fprint)s\", welcher nicht mit dem bereitgestellten Schlüssel \"%(fingerprint)s\" übereinstimmt. Dies kann bedeuten, dass deine Kommunikation abgehört wird!", "You have disabled URL previews by default.": "Du hast die URL-Vorschau standardmäßig deaktiviert.", "You have enabled URL previews by default.": "Du hast die URL-Vorschau standardmäßig aktiviert.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Du hast einen ungültigen Kontakt eingegeben. Versuche es mit der Matrix-Kennung oder der E-Mail-Adresse des Kontakts.", "$senderDisplayName changed the room avatar to ": "$senderDisplayName hat das Raum-Bild geändert zu ", "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s hat das Raum-Bild für %(roomName)s geändert", "Hide removed messages": "Gelöschte Nachrichten verbergen", diff --git a/src/i18n/strings/el.json b/src/i18n/strings/el.json index 5cee10d3d7..bc45e6da9e 100644 --- a/src/i18n/strings/el.json +++ b/src/i18n/strings/el.json @@ -685,7 +685,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Έχετε αποσυνδεθεί από όλες τις συσκευές και δεν θα λαμβάνετε πλέον ειδοποιήσεις push. Για να ενεργοποιήσετε τις ειδοποιήσεις, συνδεθείτε ξανά σε κάθε συσκευή", "You have disabled URL previews by default.": "Έχετε απενεργοποιημένη από προεπιλογή την προεπισκόπηση συνδέσμων.", "You have enabled URL previews by default.": "Έχετε ενεργοποιημένη από προεπιλογή την προεπισκόπηση συνδέσμων.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Έχετε πληκτρολογήσει μια άκυρη επαφή. Χρησιμοποιήστε το Matrix ID ή την ηλεκτρονική διεύθυνση αλληλογραφίας τους.", "You may wish to login with a different account, or add this email to this account.": "Μπορεί να θέλετε να συνδεθείτε με διαφορετικό λογαριασμό, ή να προσθέσετε αυτή τη διεύθυνση ηλεκτρονικής αλληλογραφίας σε αυτόν τον λογαριασμό.", "You need to be able to invite users to do that.": "Για να το κάνετε αυτό πρέπει να έχετε τη δυνατότητα να προσκαλέσετε χρήστες.", "You seem to be uploading files, are you sure you want to quit?": "Φαίνεται ότι αποστέλετε αρχεία, είστε βέβαιοι ότι θέλετε να αποχωρήσετε;", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a4219d7467..87fd6d4364 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -554,7 +554,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device", "You have disabled URL previews by default.": "You have disabled URL previews by default.", "You have enabled URL previews by default.": "You have enabled URL previews by default.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "You have entered an invalid contact. Try using their Matrix ID or email address.", "You have no visible notifications": "You have no visible notifications", "You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.", "you must be a": "you must be a", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index 6e182c5334..928f1a9d0f 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -478,7 +478,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device", "You have disabled URL previews by default.": "You have disabled URL previews by default.", "You have enabled URL previews by default.": "You have enabled URL previews by default.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "You have entered an invalid contact. Try using their Matrix ID or email address.", "You have no visible notifications": "You have no visible notifications", "you must be a": "you must be a", "You need to be able to invite users to do that.": "You need to be able to invite users to do that.", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index f7bdc21874..bc2391a5c7 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -621,7 +621,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Ha sido desconectado de todos los dispositivos y no continuara recibiendo notificaciones. Para volver a habilitar las notificaciones, vuelva a conectarse en cada dispositivo", "You have disabled URL previews by default.": "Ha deshabilitado la vista previa de URL por defecto.", "You have enabled URL previews by default.": "Ha habilitado vista previa de URL por defecto.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Ha ingresado un contacto no valido. Intente usando la ID Matrix o e-mail del contacto.", "You have no visible notifications": "No tiene notificaciones visibles", "You may wish to login with a different account, or add this email to this account.": "Puede ingresar con una cuenta diferente, o agregar este e-mail a esta cuenta.", "you must be a": "usted debe ser un", diff --git a/src/i18n/strings/eu.json b/src/i18n/strings/eu.json index 15e785114c..9f3d06ec52 100644 --- a/src/i18n/strings/eu.json +++ b/src/i18n/strings/eu.json @@ -555,7 +555,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Saioa amaitu duzu eta ez dituzu jakinarazpenak jasoko. Jakinarazpenak jaso nahi badituzu hasi saioa berriro gailu bakoitzean", "You have disabled URL previews by default.": "Lehenetsita URLak aurreikustea desgaitu duzu.", "You have enabled URL previews by default.": "Lehenetsita URLak aurreikustea gaitu duzu.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Kontaktu baliogabea sartu duzu. Saiatu bere Matrix ID-a edo e-mail helbidea erabiltzen.", "You have no visible notifications": "Ez daukazu jakinarazpen ikusgairik", "You may wish to login with a different account, or add this email to this account.": "Agian beste kontu batekin hasi nahi duzu saioa, edo e-mail hau kontu honetara gehitu.", "you must be a": "hau izan behar duzu:", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 09761d2a6e..585e47f5a3 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -679,7 +679,6 @@ "Tagged as: ": "Étiquetter comme : ", "You have disabled URL previews by default.": "Vous avez désactivé les aperçus d’URL par défaut.", "You have enabled URL previews by default.": "Vous avez activé les aperçus d’URL par défaut.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Vous avez entré un contact invalide. Essayez d’utiliser leur identifiant Matrix ou leur adresse email.", "Hide removed messages": "Cacher les messages supprimés", "Add": "Ajouter", "%(count)s new messages|one": "%(count)s nouveau message", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 16a0e8b1d0..2c34e05b1a 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -529,7 +529,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Kijelentkeztél minden eszközről így nem fogsz \"push\" értesítéseket kapni. Az értesítések engedélyezéséhez jelentkezz vissza mindegyik eszközön", "You have disabled URL previews by default.": "Az URL előnézet alapból tiltva van.", "You have enabled URL previews by default.": "Az URL előnézet alapból engedélyezve van.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Érvénytelen kapcsolatot adtál meg. Próbáld meg a Matrix azonosítóját vagy e-mail címét használni.", "You have no visible notifications": "Nincsenek látható értesítéseid", "You may wish to login with a different account, or add this email to this account.": "Lehet, hogy más fiókba szeretnél belépni vagy ezt az e-mail címet szeretnéd ehhez a fiókhoz kötni.", "you must be a": "szükséges szerep:", diff --git a/src/i18n/strings/ko.json b/src/i18n/strings/ko.json index c725ecdcd4..8b6e233437 100644 --- a/src/i18n/strings/ko.json +++ b/src/i18n/strings/ko.json @@ -535,7 +535,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "모든 장치에서 로그아웃되었고 더 이상 알림을 받지 않으실 거에요. 다시 알림을 받으시려면, 각 장치에 로그인해주세요", "You have disabled URL previews by default.": "URL 미리보기 쓰지 않기를 기본으로 하셨어요.", "You have enabled URL previews by default.": "URL 미리보기 쓰기를 기본으로 하셨어요.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "잘못된 연락처를 입력하셨어요. 매트릭스 ID나 이메일 주소를 써보세요.", "You have no visible notifications": "보여드릴 알림이 없어요", "You may wish to login with a different account, or add this email to this account.": "다른 계정으로 로그인하거나, 이 이메일을 이 계정에 추가할 수도 있어요.", "you must be a": "해야해요", diff --git a/src/i18n/strings/lv.json b/src/i18n/strings/lv.json index 7bdc0612c6..5f58fd9515 100644 --- a/src/i18n/strings/lv.json +++ b/src/i18n/strings/lv.json @@ -593,7 +593,6 @@ "You cannot place VoIP calls in this browser.": "Tu nevari veikt VoIP zvanus šajā pārlūkā.", "You do not have permission to post to this room": "Tev nav vajadzīgās atļaujas pievienot ziņas šajā istabā", "You have disabled URL previews by default.": "URL priekšskatījums pēc noklusējuma Tev ir atspējots.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Tu ievadīji nepareizu kontaktu. Mēģini izmantot viņa Matrix ID vai epasta adresi.", "You may wish to login with a different account, or add this email to this account.": "Tu varētu, iespējams, vēlēties pierakstīties no cita konta vai piesaistīt šo epastu šim kontam.", "you must be a": "Tev ir jābūt", "You must register to use this functionality": "Lai izmantotu šo funkcionalitāti, Tev ir jāreģistrējas", diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index a1e929bbd1..f770e335cf 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -560,7 +560,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Je bent op alle apparaten uitgelegd en je zal niet langer notificaties ontvangen. Om notificaties weer aan te zetten, log op elk apparaat opnieuw in", "You have disabled URL previews by default.": "Je hebt URL-voorvertoningen standaard uitgezet.", "You have enabled URL previews by default.": "Je hebt URL-voorvertoningen standaard aangezet.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Je hebt een ongeldig contact ingevoerd. Probeer zijn of haar Matrix-ID of e-mailadres te gebruiken.", "You have no visible notifications": "Je hebt geen zichtbare notificaties", "You may wish to login with a different account, or add this email to this account.": "Je wilt misschien met een ander account inloggen of deze e-mail aan je account toevoegen.", "you must be a": "wat je moet zijn is een", diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index f049112d23..bd1e4c5c24 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -603,7 +603,6 @@ "You have been kicked from %(roomName)s by %(userName)s.": "Zostałeś usunięty z %(roomName)s przez %(userName)s.", "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Wylogowałeś się ze wszystkich urządzeń i nie będziesz już otrzymywał powiadomień push. Aby ponownie aktywować powiadomienia zaloguj się ponownie na każdym urządzeniu", "You have disabled URL previews by default.": "Masz domyślnie wyłączone podglądy linków.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Wpisałeś niewłaściwy kontakt. Spróbuj używając Matrix ID lub adresu e-mail.", "You have no visible notifications": "Nie masz widocznych powiadomień", "You may wish to login with a different account, or add this email to this account.": "Możesz chcieć zalogować się z innego konta lub dodać e-mail do tego konta.", "you must be a": "musisz być", diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index 8d37776afb..ba4968b7ad 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -733,7 +733,6 @@ "Tagged as: ": "Marcado como: ", "You have disabled URL previews by default.": "Você desabilitou pré-visualizações de links por padrão.", "You have enabled URL previews by default.": "Você habilitou pré-visualizações de links por padrão.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Você inseriu um contato inválido. Tente usar o ID Matrix ou endereço de e-mail da pessoa que está buscando.", "You have been banned from %(roomName)s by %(userName)s.": "Você foi expulso(a) da sala %(roomName)s por %(userName)s.", "Send anyway": "Enviar de qualquer maneira", "This room": "Esta sala", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index fc089a8191..af4804bd85 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -730,7 +730,6 @@ "Tagged as: ": "Marcado como: ", "You have disabled URL previews by default.": "Você desabilitou pré-visualizações de links por padrão.", "You have enabled URL previews by default.": "Você habilitou pré-visualizações de links por padrão.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Você inseriu um contato inválido. Tente usar o ID Matrix ou endereço de e-mail da pessoa que está buscando.", "Hide removed messages": "Ocultar mensagens removidas", "Add": "Adicionar", "%(count)s new messages|one": "%(count)s nova mensagem", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index e0304a134a..cfab960e32 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -618,7 +618,6 @@ "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "ВНИМАНИЕ: ОШИБКА ПРОВЕРКИ КЛЮЧЕЙ! Ключ подписи пользователя %(userId)s на устройстве %(deviceId)s — \"%(fprint)s\", и он не соответствует предоставленному ключу \"%(fingerprint)s\". Это может означать, что ваше общение перехватывается!", "You have disabled URL previews by default.": "Предварительный просмотр ссылок отключен по-умолчанию.", "You have enabled URL previews by default.": "Предварительный просмотр ссылок включен по-умолчанию.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Вы ввели недопустимый контакт. Попробуйте использовать Matrix ID или адрес электронной почты.", "You need to enter a user name.": "Необходимо ввести имя пользователя.", "You seem to be in a call, are you sure you want to quit?": "Звонок не завершен, вы уверены, что хотите выйти?", "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/tr.json b/src/i18n/strings/tr.json index 82e9129f00..23d4e284bc 100644 --- a/src/i18n/strings/tr.json +++ b/src/i18n/strings/tr.json @@ -516,7 +516,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Tüm cihazlardan çıkış yaptınız ve artık bildirimler almayacaksınız . Bildirimleri yeniden etkinleştirmek için , her cihazda tekrar giriş yapın", "You have disabled URL previews by default.": "URL önizlemelerini varsayılan olarak devre dışı bıraktınız.", "You have enabled URL previews by default.": "URL önizlemelerini varsayılan olarak etkinleştirdiniz .", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Geçersiz bir kişi girdiniz . Matrix ID veya e-posta adresini kullanarak tekrar deneyin.", "You have no visible notifications": "Hiçbir görünür bildiriminiz yok", "You may wish to login with a different account, or add this email to this account.": "Farklı bir hesap ile giriş yapmak veya bu e-postayı bu hesaba eklemek istemiş olabilirsiniz.", "you must be a": "olabilirsiniz", diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index c4c29fc5c8..69ba19ca27 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -630,7 +630,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "你已经登出了所有的设备并不再接收推送通知。要重新启用通知,请再在每个设备上登录", "You have disabled URL previews by default.": "你已经默认 禁用 URL 预览。", "You have enabled URL previews by default.": "你已经默认 启用 URL 预览。", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "你输入了一个非法的联系人。尝试使用他们的 Matrix ID 或者电子邮件地址。", "Your home server does not support device management.": "你的 home server 不支持设备管理。", "Set a display name:": "设置一个昵称:", "This server does not support authentication with a phone number.": "这个服务器不支持用电话号码认证。", diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index a05b22d2a9..596bc55a01 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -574,7 +574,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "您已在所有裝置上登出,並且不會再收到推送通知。要重新啟用通知,再次於每個裝置上登入", "You have disabled URL previews by default.": "您已預設停用 URL 預覽。", "You have enabled URL previews by default.": "您已預設啟用 URL 預覽。", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "您輸入了無效的聯絡人。嘗試使用他們的 Matrix ID 或電子郵件地址。", "You have no visible notifications": "您沒有可見的通知", "You may wish to login with a different account, or add this email to this account.": "您可能會想要以不同的帳號登入,或是把這個電子郵件加入到此帳號中。", "you must be a": "您一定是", From c7728bd9ade40ca407fd7ae2f714d9612ff75749 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 10:02:40 +0100 Subject: [PATCH 03/10] Add eslint rule to disallow spaces inside of curly braces --- .eslintrc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 74790a2964..f7a78223ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -40,6 +40,10 @@ module.exports = { }], "react/jsx-key": ["error"], + // Assert no spacing in JSX curly brackets + // + "react/jsx-curly-spacing": ["error", "never"], + /** flowtype **/ "flowtype/require-parameter-type": ["warn", { "excludeArrowFunctions": true, From 38fdd155f0089500a898558c137b9a0ff2271970 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Sep 2017 17:11:30 +0100 Subject: [PATCH 04/10] Construct address picker message using provided `validAddressTypes` --- .../views/dialogs/AddressPickerDialog.js | 17 +++++++++++++++-- src/i18n/strings/en_EN.json | 7 ++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index c72510cbe7..4610388afc 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -419,7 +419,7 @@ module.exports = React.createClass({ address: addressText, isKnown: false, }; - if (addrType == null) { + if (!this.props.validAddressTypes.includes(addrType)) { this.setState({ error: true }); return null; } else if (addrType == 'mx-user-id') { @@ -517,8 +517,21 @@ module.exports = React.createClass({ let error; let addressSelector; if (this.state.error) { + let tryUsing = ''; + const validTypeDescriptions = this.props.validAddressTypes.map((t) => { + return { + 'mx-user-id': _t("Matrix ID"), + 'mx-room-id': _t("Matrix Room ID"), + 'email': _t("email address"), + }[t]; + }); + tryUsing = _t("Try using one of the following valid address types: %(validTypesList)s.", { + validTypesList: validTypeDescriptions.join(", "), + }); error =
- {_t("You have entered an invalid contact. Try using their Matrix ID or email address.")} + {_t("You have entered an invalid address.")} +
+ {tryUsing}
; } else if (this.state.searchError) { error =
{this.state.searchError}
; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 09b3f045df..a4219d7467 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -891,5 +891,10 @@ "Unpublish": "Unpublish", "This group is published on your profile": "This group is published on your profile", "Publish": "Publish", - "This group is not published on your profile": "This group is not published on your profile" + "This group is not published on your profile": "This group is not published on your profile", + "Matrix ID": "Matrix ID", + "Matrix Room ID": "Matrix Room ID", + "email address": "email address", + "Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.", + "You have entered an invalid address.": "You have entered an invalid address." } From e9cf25f946cbf1bb18cd1b18c93b1bb888c69acf Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Sep 2017 17:55:04 +0100 Subject: [PATCH 05/10] Remove "You have entered an invalid contact..." from translations --- 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/es.json | 1 - src/i18n/strings/eu.json | 1 - src/i18n/strings/fr.json | 1 - src/i18n/strings/hu.json | 1 - src/i18n/strings/ko.json | 1 - src/i18n/strings/lv.json | 1 - src/i18n/strings/nl.json | 1 - src/i18n/strings/pl.json | 1 - src/i18n/strings/pt.json | 1 - src/i18n/strings/pt_BR.json | 1 - src/i18n/strings/ru.json | 1 - src/i18n/strings/tr.json | 1 - src/i18n/strings/zh_Hans.json | 1 - src/i18n/strings/zh_Hant.json | 1 - 18 files changed, 18 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index e3c589bbb2..aa114e241d 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -734,7 +734,6 @@ "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "WARNUNG: SCHLÜSSEL-VERIFIZIERUNG FEHLGESCHLAGEN! Der Signatur-Schlüssel für %(userId)s und das Gerät %(deviceId)s ist \"%(fprint)s\", welcher nicht mit dem bereitgestellten Schlüssel \"%(fingerprint)s\" übereinstimmt. Dies kann bedeuten, dass deine Kommunikation abgehört wird!", "You have disabled URL previews by default.": "Du hast die URL-Vorschau standardmäßig deaktiviert.", "You have enabled URL previews by default.": "Du hast die URL-Vorschau standardmäßig aktiviert.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Du hast einen ungültigen Kontakt eingegeben. Versuche es mit der Matrix-Kennung oder der E-Mail-Adresse des Kontakts.", "$senderDisplayName changed the room avatar to ": "$senderDisplayName hat das Raum-Bild geändert zu ", "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s hat das Raum-Bild für %(roomName)s geändert", "Hide removed messages": "Gelöschte Nachrichten verbergen", diff --git a/src/i18n/strings/el.json b/src/i18n/strings/el.json index 5cee10d3d7..bc45e6da9e 100644 --- a/src/i18n/strings/el.json +++ b/src/i18n/strings/el.json @@ -685,7 +685,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Έχετε αποσυνδεθεί από όλες τις συσκευές και δεν θα λαμβάνετε πλέον ειδοποιήσεις push. Για να ενεργοποιήσετε τις ειδοποιήσεις, συνδεθείτε ξανά σε κάθε συσκευή", "You have disabled URL previews by default.": "Έχετε απενεργοποιημένη από προεπιλογή την προεπισκόπηση συνδέσμων.", "You have enabled URL previews by default.": "Έχετε ενεργοποιημένη από προεπιλογή την προεπισκόπηση συνδέσμων.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Έχετε πληκτρολογήσει μια άκυρη επαφή. Χρησιμοποιήστε το Matrix ID ή την ηλεκτρονική διεύθυνση αλληλογραφίας τους.", "You may wish to login with a different account, or add this email to this account.": "Μπορεί να θέλετε να συνδεθείτε με διαφορετικό λογαριασμό, ή να προσθέσετε αυτή τη διεύθυνση ηλεκτρονικής αλληλογραφίας σε αυτόν τον λογαριασμό.", "You need to be able to invite users to do that.": "Για να το κάνετε αυτό πρέπει να έχετε τη δυνατότητα να προσκαλέσετε χρήστες.", "You seem to be uploading files, are you sure you want to quit?": "Φαίνεται ότι αποστέλετε αρχεία, είστε βέβαιοι ότι θέλετε να αποχωρήσετε;", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a4219d7467..87fd6d4364 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -554,7 +554,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device", "You have disabled URL previews by default.": "You have disabled URL previews by default.", "You have enabled URL previews by default.": "You have enabled URL previews by default.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "You have entered an invalid contact. Try using their Matrix ID or email address.", "You have no visible notifications": "You have no visible notifications", "You may wish to login with a different account, or add this email to this account.": "You may wish to login with a different account, or add this email to this account.", "you must be a": "you must be a", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index 6e182c5334..928f1a9d0f 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -478,7 +478,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device", "You have disabled URL previews by default.": "You have disabled URL previews by default.", "You have enabled URL previews by default.": "You have enabled URL previews by default.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "You have entered an invalid contact. Try using their Matrix ID or email address.", "You have no visible notifications": "You have no visible notifications", "you must be a": "you must be a", "You need to be able to invite users to do that.": "You need to be able to invite users to do that.", diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index f7bdc21874..bc2391a5c7 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -621,7 +621,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Ha sido desconectado de todos los dispositivos y no continuara recibiendo notificaciones. Para volver a habilitar las notificaciones, vuelva a conectarse en cada dispositivo", "You have disabled URL previews by default.": "Ha deshabilitado la vista previa de URL por defecto.", "You have enabled URL previews by default.": "Ha habilitado vista previa de URL por defecto.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Ha ingresado un contacto no valido. Intente usando la ID Matrix o e-mail del contacto.", "You have no visible notifications": "No tiene notificaciones visibles", "You may wish to login with a different account, or add this email to this account.": "Puede ingresar con una cuenta diferente, o agregar este e-mail a esta cuenta.", "you must be a": "usted debe ser un", diff --git a/src/i18n/strings/eu.json b/src/i18n/strings/eu.json index 15e785114c..9f3d06ec52 100644 --- a/src/i18n/strings/eu.json +++ b/src/i18n/strings/eu.json @@ -555,7 +555,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Saioa amaitu duzu eta ez dituzu jakinarazpenak jasoko. Jakinarazpenak jaso nahi badituzu hasi saioa berriro gailu bakoitzean", "You have disabled URL previews by default.": "Lehenetsita URLak aurreikustea desgaitu duzu.", "You have enabled URL previews by default.": "Lehenetsita URLak aurreikustea gaitu duzu.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Kontaktu baliogabea sartu duzu. Saiatu bere Matrix ID-a edo e-mail helbidea erabiltzen.", "You have no visible notifications": "Ez daukazu jakinarazpen ikusgairik", "You may wish to login with a different account, or add this email to this account.": "Agian beste kontu batekin hasi nahi duzu saioa, edo e-mail hau kontu honetara gehitu.", "you must be a": "hau izan behar duzu:", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 09761d2a6e..585e47f5a3 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -679,7 +679,6 @@ "Tagged as: ": "Étiquetter comme : ", "You have disabled URL previews by default.": "Vous avez désactivé les aperçus d’URL par défaut.", "You have enabled URL previews by default.": "Vous avez activé les aperçus d’URL par défaut.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Vous avez entré un contact invalide. Essayez d’utiliser leur identifiant Matrix ou leur adresse email.", "Hide removed messages": "Cacher les messages supprimés", "Add": "Ajouter", "%(count)s new messages|one": "%(count)s nouveau message", diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 16a0e8b1d0..2c34e05b1a 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -529,7 +529,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Kijelentkeztél minden eszközről így nem fogsz \"push\" értesítéseket kapni. Az értesítések engedélyezéséhez jelentkezz vissza mindegyik eszközön", "You have disabled URL previews by default.": "Az URL előnézet alapból tiltva van.", "You have enabled URL previews by default.": "Az URL előnézet alapból engedélyezve van.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Érvénytelen kapcsolatot adtál meg. Próbáld meg a Matrix azonosítóját vagy e-mail címét használni.", "You have no visible notifications": "Nincsenek látható értesítéseid", "You may wish to login with a different account, or add this email to this account.": "Lehet, hogy más fiókba szeretnél belépni vagy ezt az e-mail címet szeretnéd ehhez a fiókhoz kötni.", "you must be a": "szükséges szerep:", diff --git a/src/i18n/strings/ko.json b/src/i18n/strings/ko.json index c725ecdcd4..8b6e233437 100644 --- a/src/i18n/strings/ko.json +++ b/src/i18n/strings/ko.json @@ -535,7 +535,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "모든 장치에서 로그아웃되었고 더 이상 알림을 받지 않으실 거에요. 다시 알림을 받으시려면, 각 장치에 로그인해주세요", "You have disabled URL previews by default.": "URL 미리보기 쓰지 않기를 기본으로 하셨어요.", "You have enabled URL previews by default.": "URL 미리보기 쓰기를 기본으로 하셨어요.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "잘못된 연락처를 입력하셨어요. 매트릭스 ID나 이메일 주소를 써보세요.", "You have no visible notifications": "보여드릴 알림이 없어요", "You may wish to login with a different account, or add this email to this account.": "다른 계정으로 로그인하거나, 이 이메일을 이 계정에 추가할 수도 있어요.", "you must be a": "해야해요", diff --git a/src/i18n/strings/lv.json b/src/i18n/strings/lv.json index 7bdc0612c6..5f58fd9515 100644 --- a/src/i18n/strings/lv.json +++ b/src/i18n/strings/lv.json @@ -593,7 +593,6 @@ "You cannot place VoIP calls in this browser.": "Tu nevari veikt VoIP zvanus šajā pārlūkā.", "You do not have permission to post to this room": "Tev nav vajadzīgās atļaujas pievienot ziņas šajā istabā", "You have disabled URL previews by default.": "URL priekšskatījums pēc noklusējuma Tev ir atspējots.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Tu ievadīji nepareizu kontaktu. Mēģini izmantot viņa Matrix ID vai epasta adresi.", "You may wish to login with a different account, or add this email to this account.": "Tu varētu, iespējams, vēlēties pierakstīties no cita konta vai piesaistīt šo epastu šim kontam.", "you must be a": "Tev ir jābūt", "You must register to use this functionality": "Lai izmantotu šo funkcionalitāti, Tev ir jāreģistrējas", diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index a1e929bbd1..f770e335cf 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -560,7 +560,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Je bent op alle apparaten uitgelegd en je zal niet langer notificaties ontvangen. Om notificaties weer aan te zetten, log op elk apparaat opnieuw in", "You have disabled URL previews by default.": "Je hebt URL-voorvertoningen standaard uitgezet.", "You have enabled URL previews by default.": "Je hebt URL-voorvertoningen standaard aangezet.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Je hebt een ongeldig contact ingevoerd. Probeer zijn of haar Matrix-ID of e-mailadres te gebruiken.", "You have no visible notifications": "Je hebt geen zichtbare notificaties", "You may wish to login with a different account, or add this email to this account.": "Je wilt misschien met een ander account inloggen of deze e-mail aan je account toevoegen.", "you must be a": "wat je moet zijn is een", diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index f049112d23..bd1e4c5c24 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -603,7 +603,6 @@ "You have been kicked from %(roomName)s by %(userName)s.": "Zostałeś usunięty z %(roomName)s przez %(userName)s.", "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Wylogowałeś się ze wszystkich urządzeń i nie będziesz już otrzymywał powiadomień push. Aby ponownie aktywować powiadomienia zaloguj się ponownie na każdym urządzeniu", "You have disabled URL previews by default.": "Masz domyślnie wyłączone podglądy linków.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Wpisałeś niewłaściwy kontakt. Spróbuj używając Matrix ID lub adresu e-mail.", "You have no visible notifications": "Nie masz widocznych powiadomień", "You may wish to login with a different account, or add this email to this account.": "Możesz chcieć zalogować się z innego konta lub dodać e-mail do tego konta.", "you must be a": "musisz być", diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index 8d37776afb..ba4968b7ad 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -733,7 +733,6 @@ "Tagged as: ": "Marcado como: ", "You have disabled URL previews by default.": "Você desabilitou pré-visualizações de links por padrão.", "You have enabled URL previews by default.": "Você habilitou pré-visualizações de links por padrão.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Você inseriu um contato inválido. Tente usar o ID Matrix ou endereço de e-mail da pessoa que está buscando.", "You have been banned from %(roomName)s by %(userName)s.": "Você foi expulso(a) da sala %(roomName)s por %(userName)s.", "Send anyway": "Enviar de qualquer maneira", "This room": "Esta sala", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index fc089a8191..af4804bd85 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -730,7 +730,6 @@ "Tagged as: ": "Marcado como: ", "You have disabled URL previews by default.": "Você desabilitou pré-visualizações de links por padrão.", "You have enabled URL previews by default.": "Você habilitou pré-visualizações de links por padrão.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Você inseriu um contato inválido. Tente usar o ID Matrix ou endereço de e-mail da pessoa que está buscando.", "Hide removed messages": "Ocultar mensagens removidas", "Add": "Adicionar", "%(count)s new messages|one": "%(count)s nova mensagem", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index e0304a134a..cfab960e32 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -618,7 +618,6 @@ "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "ВНИМАНИЕ: ОШИБКА ПРОВЕРКИ КЛЮЧЕЙ! Ключ подписи пользователя %(userId)s на устройстве %(deviceId)s — \"%(fprint)s\", и он не соответствует предоставленному ключу \"%(fingerprint)s\". Это может означать, что ваше общение перехватывается!", "You have disabled URL previews by default.": "Предварительный просмотр ссылок отключен по-умолчанию.", "You have enabled URL previews by default.": "Предварительный просмотр ссылок включен по-умолчанию.", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Вы ввели недопустимый контакт. Попробуйте использовать Matrix ID или адрес электронной почты.", "You need to enter a user name.": "Необходимо ввести имя пользователя.", "You seem to be in a call, are you sure you want to quit?": "Звонок не завершен, вы уверены, что хотите выйти?", "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/tr.json b/src/i18n/strings/tr.json index 82e9129f00..23d4e284bc 100644 --- a/src/i18n/strings/tr.json +++ b/src/i18n/strings/tr.json @@ -516,7 +516,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Tüm cihazlardan çıkış yaptınız ve artık bildirimler almayacaksınız . Bildirimleri yeniden etkinleştirmek için , her cihazda tekrar giriş yapın", "You have disabled URL previews by default.": "URL önizlemelerini varsayılan olarak devre dışı bıraktınız.", "You have enabled URL previews by default.": "URL önizlemelerini varsayılan olarak etkinleştirdiniz .", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "Geçersiz bir kişi girdiniz . Matrix ID veya e-posta adresini kullanarak tekrar deneyin.", "You have no visible notifications": "Hiçbir görünür bildiriminiz yok", "You may wish to login with a different account, or add this email to this account.": "Farklı bir hesap ile giriş yapmak veya bu e-postayı bu hesaba eklemek istemiş olabilirsiniz.", "you must be a": "olabilirsiniz", diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index c4c29fc5c8..69ba19ca27 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -630,7 +630,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "你已经登出了所有的设备并不再接收推送通知。要重新启用通知,请再在每个设备上登录", "You have disabled URL previews by default.": "你已经默认 禁用 URL 预览。", "You have enabled URL previews by default.": "你已经默认 启用 URL 预览。", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "你输入了一个非法的联系人。尝试使用他们的 Matrix ID 或者电子邮件地址。", "Your home server does not support device management.": "你的 home server 不支持设备管理。", "Set a display name:": "设置一个昵称:", "This server does not support authentication with a phone number.": "这个服务器不支持用电话号码认证。", diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index a05b22d2a9..596bc55a01 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -574,7 +574,6 @@ "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "您已在所有裝置上登出,並且不會再收到推送通知。要重新啟用通知,再次於每個裝置上登入", "You have disabled URL previews by default.": "您已預設停用 URL 預覽。", "You have enabled URL previews by default.": "您已預設啟用 URL 預覽。", - "You have entered an invalid contact. Try using their Matrix ID or email address.": "您輸入了無效的聯絡人。嘗試使用他們的 Matrix ID 或電子郵件地址。", "You have no visible notifications": "您沒有可見的通知", "You may wish to login with a different account, or add this email to this account.": "您可能會想要以不同的帳號登入,或是把這個電子郵件加入到此帳號中。", "you must be a": "您一定是", From 6eedf8b07331a2c3d62f84a8d9bb1dba107e4ba6 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 10:02:40 +0100 Subject: [PATCH 06/10] Add eslint rule to disallow spaces inside of curly braces --- .eslintrc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 74790a2964..f7a78223ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -40,6 +40,10 @@ module.exports = { }], "react/jsx-key": ["error"], + // Assert no spacing in JSX curly brackets + // + "react/jsx-curly-spacing": ["error", "never"], + /** flowtype **/ "flowtype/require-parameter-type": ["warn", { "excludeArrowFunctions": true, From e70336af11342bf6d466a234ed6e37ebd733a2a3 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 10:27:03 +0100 Subject: [PATCH 07/10] Add rule to enforce JSX tag spacing --- .eslintrc.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index f7a78223ff..425f2d2001 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -42,8 +42,17 @@ module.exports = { // Assert no spacing in JSX curly brackets // + // + // https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-curly-spacing.md "react/jsx-curly-spacing": ["error", "never"], + // Assert spacing before self-closing JSX tags, and no spacing before or + // after the closing slash, and no spacing after the opening bracket of + // the opening tag or closing tag. + // + // https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-tag-spacing.md + "react/jsx-tag-spacing": ["error"], + /** flowtype **/ "flowtype/require-parameter-type": ["warn", { "excludeArrowFunctions": true, From 3c99b2af3d3e65aa0c32532559f8d5ebf0ff2e7e Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 10:55:09 +0100 Subject: [PATCH 08/10] Fix ability to invite existing mx users Bug introduced by https://github.com/matrix-org/matrix-react-sdk/pull/1432 We should really not be using string constant literals all over the place. We'd be less likely to run into this sort of bug these address types weren't copied literals. --- src/RoomInvite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RoomInvite.js b/src/RoomInvite.js index af0ba3d1e7..ceb3dd0fda 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -28,7 +28,7 @@ export function inviteToRoom(roomId, addr) { if (addrType == 'email') { return MatrixClientPeg.get().inviteByEmail(roomId, addr); - } else if (addrType == 'mx') { + } else if (addrType == 'mx-user-id') { return MatrixClientPeg.get().invite(roomId, addr); } else { throw new Error('Unsupported address'); From 6b9a2909dff889cc74bc73a3bee4388f5e5d77f8 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 11:21:06 +0100 Subject: [PATCH 09/10] Add rule to enforce spacing in curly brackets in JSX children This required an updated in version of eslint-plugin-react to 7.4.0. --- .eslintrc.js | 2 +- jenkins.sh | 4 +- package.json | 3 +- src/SlashCommands.js | 4 +- .../views/dialogs/ExportE2eKeysDialog.js | 8 +- .../views/dialogs/ImportE2eKeysDialog.js | 10 +- src/autocomplete/CommandProvider.js | 4 +- src/autocomplete/RoomProvider.js | 2 +- src/components/structures/GroupView.js | 146 +++++++------- src/components/structures/MatrixChat.js | 4 +- src/components/structures/MyGroups.js | 26 +-- src/components/structures/UserSettings.js | 184 +++++++++--------- .../views/dialogs/AddressPickerDialog.js | 20 +- .../views/dialogs/ConfirmRedactDialog.js | 10 +- .../views/dialogs/ConfirmUserActionDialog.js | 14 +- .../views/dialogs/CreateGroupDialog.js | 12 +- .../views/dialogs/DeviceVerifyDialog.js | 16 +- src/components/views/dialogs/ErrorDialog.js | 4 +- .../views/dialogs/KeyShareDialog.js | 12 +- .../views/dialogs/QuestionDialog.js | 12 +- .../dialogs/SessionRestoreErrorDialog.js | 18 +- .../views/dialogs/SetEmailDialog.js | 6 +- src/components/views/dialogs/SetMxIdDialog.js | 12 +- .../views/dialogs/TextInputDialog.js | 6 +- .../views/elements/AppPermission.js | 8 +- src/components/views/elements/AppTile.js | 14 +- src/components/views/elements/AppWarning.js | 4 +- src/components/views/elements/Flair.js | 4 +- .../views/elements/ManageIntegsButton.js | 6 +- .../views/elements/MessageSpinner.js | 4 +- src/components/views/elements/Pill.js | 12 +- .../views/elements/TruncatedList.js | 6 +- .../views/groups/GroupInviteTile.js | 8 +- .../views/groups/GroupMemberInfo.js | 14 +- .../views/groups/GroupMemberList.js | 4 +- src/components/views/groups/GroupRoomList.js | 4 +- src/components/views/groups/GroupRoomTile.js | 4 +- src/components/views/login/LoginFooter.js | 2 +- .../views/messages/SenderProfile.js | 6 +- src/components/views/messages/UnknownBody.js | 2 +- src/components/views/rooms/AppsDrawer.js | 6 +- src/components/views/rooms/ForwardMessage.js | 2 +- src/components/views/rooms/RoomHeader.js | 38 ++-- .../views/rooms/SimpleRoomHeader.js | 2 +- src/components/views/voip/CallView.js | 10 +- src/components/views/voip/IncomingCallBox.js | 6 +- src/components/views/voip/VideoView.js | 4 +- 47 files changed, 355 insertions(+), 354 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 425f2d2001..429aa24993 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -44,7 +44,7 @@ module.exports = { // // // https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-curly-spacing.md - "react/jsx-curly-spacing": ["error", "never"], + "react/jsx-curly-spacing": ["error", {"when": "never", "children": {"when": "always"}}], // Assert spacing before self-closing JSX tags, and no spacing before or // after the closing slash, and no spacing after the opening bracket of diff --git a/jenkins.sh b/jenkins.sh index 0979edfa13..3a2d66739e 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -21,9 +21,7 @@ npm run test -- --no-colors npm run lintall -- -f checkstyle -o eslint.xml || true # re-run the linter, excluding any files known to have errors or warnings. -./node_modules/.bin/eslint --max-warnings 0 \ - --ignore-path .eslintignore.errorfiles \ - src test +npm run lintwithexclusions # delete the old tarball, if it exists rm -f matrix-react-sdk-*.tgz diff --git a/package.json b/package.json index e9b4aa9a53..e185a9027d 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "start": "parallelshell \"npm run build:watch\" \"npm run reskindex:watch\"", "lint": "eslint src/", "lintall": "eslint src/ test/", + "lintwithexclusions": "eslint --max-warnings 0 --ignore-path .eslintignore.errorfiles src test", "clean": "rimraf lib", "prepublish": "npm run clean && npm run build && git rev-parse HEAD > git-revision.txt", "test": "karma start --single-run=true --browsers ChromeHeadless", @@ -99,7 +100,7 @@ "eslint-config-google": "^0.7.1", "eslint-plugin-babel": "^4.0.1", "eslint-plugin-flowtype": "^2.30.0", - "eslint-plugin-react": "^6.9.0", + "eslint-plugin-react": "^7.4.0", "expect": "^1.16.0", "json-loader": "^0.5.3", "karma": "^1.7.0", diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 1302aaa423..82665cc2f3 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -254,7 +254,7 @@ const commands = { title: _t("Ignored user"), description: (
-

{_t("You are now ignoring %(userId)s", {userId: userId})}

+

{ _t("You are now ignoring %(userId)s", {userId: userId}) }

), hasCancelButton: false, @@ -281,7 +281,7 @@ const commands = { title: _t("Unignored user"), description: (
-

{_t("You are no longer ignoring %(userId)s", {userId: userId})}

+

{ _t("You are no longer ignoring %(userId)s", {userId: userId}) }

), hasCancelButton: false, diff --git a/src/async-components/views/dialogs/ExportE2eKeysDialog.js b/src/async-components/views/dialogs/ExportE2eKeysDialog.js index 8f113353d9..04274442c2 100644 --- a/src/async-components/views/dialogs/ExportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/ExportE2eKeysDialog.js @@ -136,13 +136,13 @@ export default React.createClass({ ) }

- {this.state.errStr} + { this.state.errStr }
@@ -155,7 +155,7 @@ export default React.createClass({
@@ -172,7 +172,7 @@ export default React.createClass({ disabled={disableForm} />
diff --git a/src/async-components/views/dialogs/ImportE2eKeysDialog.js b/src/async-components/views/dialogs/ImportE2eKeysDialog.js index 9eac7f78b2..a01b6580f1 100644 --- a/src/async-components/views/dialogs/ImportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/ImportE2eKeysDialog.js @@ -134,13 +134,13 @@ export default React.createClass({ ) }

- {this.state.errStr} + { this.state.errStr }
@@ -153,14 +153,14 @@ export default React.createClass({
+ disabled={disableForm} />
@@ -170,7 +170,7 @@ export default React.createClass({ disabled={!this.state.enableSubmit || disableForm} />
diff --git a/src/autocomplete/CommandProvider.js b/src/autocomplete/CommandProvider.js index 011ad0a7dc..eda05ef514 100644 --- a/src/autocomplete/CommandProvider.js +++ b/src/autocomplete/CommandProvider.js @@ -129,7 +129,7 @@ export default class CommandProvider extends AutocompleteProvider { component: (), range, }; @@ -150,7 +150,7 @@ export default class CommandProvider extends AutocompleteProvider { renderCompletions(completions: [React.Component]): ?React.Component { return
- {completions} + { completions }
; } } diff --git a/src/autocomplete/RoomProvider.js b/src/autocomplete/RoomProvider.js index 1770089eb2..cc04f54dda 100644 --- a/src/autocomplete/RoomProvider.js +++ b/src/autocomplete/RoomProvider.js @@ -106,7 +106,7 @@ export default class RoomProvider extends AutocompleteProvider { renderCompletions(completions: [React.Component]): ?React.Component { return
- {completions} + { completions }
; } } diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 297d615d30..5381f9add3 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -106,9 +106,9 @@ const CategoryRoomList = React.createClass({ const TintableSvg = sdk.getComponent("elements.TintableSvg"); const addButton = this.props.editing ? ( - +
- {_t('Add a Room')} + { _t('Add a Room') }
) :
; @@ -117,17 +117,19 @@ const CategoryRoomList = React.createClass({ key={r.room_id} groupId={this.props.groupId} editing={this.props.editing} - summaryInfo={r}/>; + summaryInfo={r} />; }); let catHeader =
; if (this.props.category && this.props.category.profile) { - catHeader =
{this.props.category.profile.name}
; + catHeader =
+ { this.props.category.profile.name } +
; } return
- {catHeader} - {roomNodes} - {addButton} + { catHeader } + { roomNodes } + { addButton }
; }, }); @@ -196,9 +198,9 @@ const FeaturedRoom = React.createClass({ let roomNameNode = null; if (permalink) { - roomNameNode = {roomName}; + roomNameNode = { roomName }; } else { - roomNameNode = {roomName}; + roomNameNode = { roomName }; } const deleteButton = this.props.editing ? @@ -208,13 +210,13 @@ const FeaturedRoom = React.createClass({ width="14" height="14" alt="Delete" - onClick={this.onDeleteClicked}/> + onClick={this.onDeleteClicked} /> :
; return -
{roomNameNode}
- {deleteButton} +
{ roomNameNode }
+ { deleteButton }
; }, }); @@ -278,9 +280,9 @@ const RoleUserList = React.createClass({ const TintableSvg = sdk.getComponent("elements.TintableSvg"); const addButton = this.props.editing ? ( - +
- {_t('Add a User')} + { _t('Add a User') }
) :
; const userNodes = this.props.users.map((u) => { @@ -288,16 +290,16 @@ const RoleUserList = React.createClass({ key={u.user_id} summaryInfo={u} editing={this.props.editing} - groupId={this.props.groupId}/>; + groupId={this.props.groupId} />; }); let roleHeader =
; if (this.props.role && this.props.role.profile) { - roleHeader =
{this.props.role.profile.name}
; + roleHeader =
{ this.props.role.profile.name }
; } return
- {roleHeader} - {userNodes} - {addButton} + { roleHeader } + { userNodes } + { addButton }
; }, }); @@ -349,7 +351,7 @@ const FeaturedUser = React.createClass({ const name = this.props.summaryInfo.displayname || this.props.summaryInfo.user_id; const permalink = 'https://matrix.to/#/' + this.props.summaryInfo.user_id; - const userNameNode = {name}; + const userNameNode = { name }; const httpUrl = MatrixClientPeg.get() .mxcUrlToHttp(this.props.summaryInfo.avatar_url, 64, 64); @@ -360,13 +362,13 @@ const FeaturedUser = React.createClass({ width="14" height="14" alt="Delete" - onClick={this.onDeleteClicked}/> + onClick={this.onDeleteClicked} /> :
; return -
{userNameNode}
- {deleteButton} +
{ userNameNode }
+ { deleteButton }
; }, }); @@ -632,7 +634,7 @@ export default React.createClass({ const defaultCategoryNode = ; + editing={this.state.editing} />; const categoryRoomNodes = Object.keys(categoryRooms).map((catId) => { const cat = summary.rooms_section.categories[catId]; return ; + editing={this.state.editing} />; }); return
- {_t('Featured Rooms:')} + { _t('Featured Rooms:') }
- {defaultCategoryNode} - {categoryRoomNodes} + { defaultCategoryNode } + { categoryRoomNodes }
; }, @@ -673,7 +675,7 @@ export default React.createClass({ const noRoleNode = ; + editing={this.state.editing} />; const roleUserNodes = Object.keys(roleUsers).map((roleId) => { const role = summary.users_section.roles[roleId]; return ; + editing={this.state.editing} />; }); return
- {_t('Featured Users:')} + { _t('Featured Users:') }
- {noRoleNode} - {roleUserNodes} + { noRoleNode } + { roleUserNodes }
; }, @@ -708,18 +710,18 @@ export default React.createClass({ return
- {_t("%(inviter)s has invited you to join this group", {inviter: group.inviter.userId})} + { _t("%(inviter)s has invited you to join this group", {inviter: group.inviter.userId}) }
- {_t("Accept")} + { _t("Accept") } - {_t("Decline")} + { _t("Decline") }
; @@ -740,13 +742,13 @@ export default React.createClass({ publicisedButton = - {_t("Unpublish")} + { _t("Unpublish") } ; } publicisedSection =
- {_t("This group is published on your profile")} + { _t("This group is published on your profile") }
- {publicisedButton} + { publicisedButton }
; } else { @@ -754,13 +756,13 @@ export default React.createClass({ publicisedButton = - {_t("Publish")} + { _t("Publish") } ; } publicisedSection =
- {_t("This group is not published on your profile")} + { _t("This group is not published on your profile") }
- {publicisedButton} + { publicisedButton }
; } @@ -768,17 +770,17 @@ export default React.createClass({ return
- {youAreAMemberText} + { youAreAMemberText }
- {_t("Leave")} + { _t("Leave") }
- {publicisedSection} + { publicisedSection }
; } @@ -818,15 +820,15 @@ export default React.createClass({ avatarNode = (
- +
); @@ -846,13 +848,13 @@ export default React.createClass({ - {_t('Save')} + { _t('Save') } , ); rightButtons.push( {_t("Cancel")}/ + width="18" height="18" alt={_t("Cancel")} /> , ); roomBody =
@@ -860,8 +862,8 @@ export default React.createClass({ onChange={this._onLongDescChange} tabIndex="3" /> - {this._getFeaturedRoomsNode()} - {this._getFeaturedUsersNode()} + { this._getFeaturedRoomsNode() } + { this._getFeaturedUsersNode() }
; } else { const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; @@ -872,41 +874,41 @@ export default React.createClass({ />; if (summary.profile && summary.profile.name) { nameNode =
- {summary.profile.name} + { summary.profile.name } - ({this.props.groupId}) + ({ this.props.groupId })
; } else { - nameNode = {this.props.groupId}; + nameNode = { this.props.groupId }; } - shortDescNode = {summary.profile.short_description}; + shortDescNode = { summary.profile.short_description }; let description = null; if (summary.profile && summary.profile.long_description) { description = sanitizedHtmlNode(summary.profile.long_description); } roomBody =
- {this._getMembershipSection()} -
{description}
- {this._getFeaturedRoomsNode()} - {this._getFeaturedUsersNode()} + { this._getMembershipSection() } +
{ description }
+ { this._getFeaturedRoomsNode() } + { this._getFeaturedUsersNode() }
; if (summary.user && summary.user.is_privileged) { rightButtons.push( - + , ); } if (this.props.collapsedRhs) { rightButtons.push( - + , ); } @@ -919,40 +921,40 @@ export default React.createClass({
- {avatarNode} + { avatarNode }
- {nameNode} + { nameNode }
- {shortDescNode} + { shortDescNode }
- {rightButtons} + { rightButtons }
- {roomBody} + { roomBody }
); } else if (this.state.error) { if (this.state.error.httpStatus === 404) { return (
- Group {this.props.groupId} not found + Group { this.props.groupId } not found
); } else { let extraText; if (this.state.error.errcode === 'M_UNRECOGNIZED') { - extraText =
{_t('This Home server does not support groups')}
; + extraText =
{ _t('This Home server does not support groups') }
; } return (
- Failed to load {this.props.groupId} - {extraText} + Failed to load { this.props.groupId } + { extraText }
); } diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 4787d76be1..89303a2e41 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -853,7 +853,7 @@ module.exports = React.createClass({ title: _t("Leave room"), description: ( - {_t("Are you sure you want to leave the room '%(roomName)s'?", {roomName: roomToLeave.name})} + { _t("Are you sure you want to leave the room '%(roomName)s'?", {roomName: roomToLeave.name}) } ), onFinished: (shouldLeave) => { @@ -1450,7 +1450,7 @@ module.exports = React.createClass({ return ( diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 624f3c67dd..ab2111ee56 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -39,7 +39,7 @@ const GroupTile = React.createClass({ }, render: function() { - return {this.props.groupId}; + return { this.props.groupId }; }, }); @@ -90,51 +90,51 @@ export default withMatrixClient(React.createClass({ ); }); content =
-
{_t('You are a member of these groups:')}
- {groupNodes} +
{ _t('You are a member of these groups:') }
+ { groupNodes }
; } else if (this.state.error) { content =
- {_t('Error whilst fetching joined groups')} + { _t('Error whilst fetching joined groups') }
; } else { content = ; } return
- +
- {_t('Create a new group')} + { _t('Create a new group') }
- {_t( + { _t( 'Create a group to represent your community! '+ 'Define a set of rooms and your own custom homepage '+ 'to mark out your space in the Matrix universe.', - )} + ) }
- {_t('Join an existing group')} + { _t('Join an existing group') }
- {_tJsx( + { _tJsx( 'To join an existing group you\'ll have to '+ 'know its group identifier; this will look '+ 'something like +example:matrix.org.', /(.*)<\/i>/, - (sub) => {sub}, - )} + (sub) => { sub }, + ) }
- {content} + { content }
; }, diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index d2f27b63e1..f003ca2b6f 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -52,7 +52,7 @@ const gHVersionLabel = function(repo, token='') { } else { url = `https://github.com/${repo}/commit/${token.split('-')[0]}`; } - return {token}; + return { token }; }; // Enumerate some simple 'flip a bit' UI settings (if any). @@ -674,7 +674,7 @@ module.exports = React.createClass({

Referral

- {_t("Refer a friend to Riot:")} {href} + { _t("Refer a friend to Riot:") } { href }
); @@ -693,7 +693,7 @@ module.exports = React.createClass({ _renderLanguageSetting: function() { const LanguageDropdown = sdk.getComponent('views.elements.LanguageDropdown'); return
- + - {_t('Autocomplete Delay (ms):')} + { _t('Autocomplete Delay (ms):') }
@@ -871,13 +871,13 @@ module.exports = React.createClass({ if (setting.fn) setting.fn(e.target.checked); }; - return
- + -
; @@ -887,8 +887,8 @@ module.exports = React.createClass({ const DevicesPanel = sdk.getComponent('settings.DevicesPanel'); return (
-

{_t("Devices")}

- +

{ _t("Devices") }

+
); }, @@ -903,7 +903,7 @@ module.exports = React.createClass({

{ _t("Found a bug?") }

@@ -911,13 +911,13 @@ module.exports = React.createClass({ }, _renderAnalyticsControl: function() { - if (!SdkConfig.get().piwik) return
; + if (!SdkConfig.get().piwik) return
; return

{ _t('Analytics') }

- {_t('Riot collects anonymous analytics to allow us to improve the application.')} - {ANALYTICS_SETTINGS_LABELS.map( this._renderLocalSetting )} + { _t('Riot collects anonymous analytics to allow us to improve the application.') } + { ANALYTICS_SETTINGS_LABELS.map( this._renderLocalSetting ) }
; }, @@ -947,10 +947,10 @@ module.exports = React.createClass({ type="checkbox" id={feature.id} name={feature.id} - defaultChecked={ UserSettingsStore.isFeatureEnabled(feature.id) } - onChange={ onChange } + defaultChecked={UserSettingsStore.isFeatureEnabled(feature.id)} + onChange={onChange} /> - +
); }); @@ -964,7 +964,7 @@ module.exports = React.createClass({

{ _t("Labs") }

{ _t("These are experimental features that may break in unexpected ways") }. { _t("Use with caution") }.

- {features} + { features }
); @@ -997,10 +997,10 @@ module.exports = React.createClass({ const platform = PlatformPeg.get(); if ('canSelfUpdate' in platform && platform.canSelfUpdate() && 'startUpdateCheck' in platform) { return
-

{_t('Updates')}

+

{ _t('Updates') }

- {_t('Check for update')} + { _t('Check for update') }
; @@ -1026,7 +1026,7 @@ module.exports = React.createClass({ reject = ( - {_t("Reject all %(invitedRooms)s invites", {invitedRooms: invitedRooms.length})} + { _t("Reject all %(invitedRooms)s invites", {invitedRooms: invitedRooms.length}) } ); } @@ -1034,7 +1034,7 @@ module.exports = React.createClass({ return

{ _t("Bulk Options") }

- {reject} + { reject }
; }, @@ -1052,7 +1052,7 @@ module.exports = React.createClass({ defaultChecked={settings['auto-launch']} onChange={this._onAutoLaunchChanged} /> - +
; @@ -1064,7 +1064,7 @@ module.exports = React.createClass({ }, _mapWebRtcDevicesToSpans: function(devices) { - return devices.map((device) => {device.label}); + return devices.map((device) => { device.label }); }, _setAudioInput: function(deviceId) { @@ -1100,15 +1100,15 @@ module.exports = React.createClass({ if (this.state.mediaDevices === false) { return (

- {_t('Missing Media Permissions, click here to request.')} + { _t('Missing Media Permissions, click here to request.') }

); } else if (!this.state.mediaDevices) return; const Dropdown = sdk.getComponent('elements.Dropdown'); - let microphoneDropdown =

{_t('No Microphones detected')}

; - let webcamDropdown =

{_t('No Webcams detected')}

; + let microphoneDropdown =

{ _t('No Microphones detected') }

; + let webcamDropdown =

{ _t('No Webcams detected') }

; const defaultOption = { deviceId: '', @@ -1125,12 +1125,12 @@ module.exports = React.createClass({ } microphoneDropdown =
-

{_t('Microphone')}

+

{ _t('Microphone') }

- {this._mapWebRtcDevicesToSpans(audioInputs)} + { this._mapWebRtcDevicesToSpans(audioInputs) }
; } @@ -1145,25 +1145,25 @@ module.exports = React.createClass({ } webcamDropdown =
-

{_t('Camera')}

+

{ _t('Camera') }

- {this._mapWebRtcDevicesToSpans(videoInputs)} + { this._mapWebRtcDevicesToSpans(videoInputs) }
; } return
- {microphoneDropdown} - {webcamDropdown} + { microphoneDropdown } + { webcamDropdown }
; }, _renderWebRtcSettings: function() { return
-

{_t('VoIP')}

+

{ _t('VoIP') }

{ WEBRTC_SETTINGS_LABELS.map(this._renderLocalSetting) } { this._renderWebRtcDeviceSettings() } @@ -1229,7 +1229,7 @@ module.exports = React.createClass({ return (
- +
- {
@@ -1250,16 +1250,16 @@ module.exports = React.createClass({ addEmailSection = (
- +
+ placeholder={_t("Add email address")} + blurToCancel={false} + onValueChanged={this._onAddEmailEditFinished} />
{_t("Add")} @@ -1307,8 +1307,8 @@ module.exports = React.createClass({ return (
- {threepidsSection} + { threepidsSection }
-
+
+ showUploadSection={false} className="mx_UserSettings_avatarPicker_img" />
- +
@@ -1357,37 +1357,37 @@ module.exports = React.createClass({
: null } - {accountJsx} + { accountJsx }
- {this._renderReferral()} + { this._renderReferral() } - {notificationArea} + { notificationArea } - {this._renderUserInterfaceSettings()} - {this._renderLabs()} - {this._renderWebRtcSettings()} - {this._renderDevicesPanel()} - {this._renderCryptoInfo()} - {this._renderIgnoredUsers()} - {this._renderBulkOptions()} - {this._renderBugReport()} + { this._renderUserInterfaceSettings() } + { this._renderLabs() } + { this._renderWebRtcSettings() } + { this._renderDevicesPanel() } + { this._renderCryptoInfo() } + { this._renderIgnoredUsers() } + { this._renderBulkOptions() } + { this._renderBugReport() } - {PlatformPeg.get().isElectron() && this._renderElectronSettings()} + { PlatformPeg.get().isElectron() && this._renderElectronSettings() } - {this._renderAnalyticsControl()} + { this._renderAnalyticsControl() }

{ _t("Advanced") }

- { _t("Logged in as:") } {this._me} + { _t("Logged in as:") } { this._me }
- {_t('Access Token:')} + { _t('Access Token:') } + data-spoiler={MatrixClientPeg.get().getAccessToken()}> <{ _t("click to reveal") }>
@@ -1398,23 +1398,23 @@ module.exports = React.createClass({ { _t("Identity Server is") } { MatrixClientPeg.get().getIdentityServerUrl() }
- {_t('matrix-react-sdk version:')} {(REACT_SDK_VERSION !== '') + { _t('matrix-react-sdk version:') } { (REACT_SDK_VERSION !== '') ? gHVersionLabel('matrix-org/matrix-react-sdk', REACT_SDK_VERSION) : REACT_SDK_VERSION - }
- {_t('riot-web version:')} {(this.state.vectorVersion !== undefined) + }
+ { _t('riot-web version:') } { (this.state.vectorVersion !== undefined) ? gHVersionLabel('vector-im/riot-web', this.state.vectorVersion) : 'unknown' - }
- { _t("olm version:") } {olmVersionString}
+ }
+ { _t("olm version:") } { olmVersionString }
- {this._renderCheckUpdate()} + { this._renderCheckUpdate() } - {this._renderClearCache()} + { this._renderClearCache() } - {this._renderDeactivateAccount()} + { this._renderDeactivateAccount() }
diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index 4610388afc..6a027ac034 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -495,7 +495,7 @@ module.exports = React.createClass({ const AddressTile = sdk.getComponent("elements.AddressTile"); for (let i = 0; i < this.state.userList.length; i++) { query.push( - , + , ); } } @@ -529,24 +529,24 @@ module.exports = React.createClass({ validTypesList: validTypeDescriptions.join(", "), }); error =
- {_t("You have entered an invalid address.")} + { _t("You have entered an invalid address.") }
- {tryUsing} + { tryUsing }
; } else if (this.state.searchError) { - error =
{this.state.searchError}
; + error =
{ this.state.searchError }
; } else if ( this.state.query.length > 0 && this.state.queryList.length === 0 && !this.state.busy ) { - error =
{_t("No results")}
; + error =
{ _t("No results") }
; } else { addressSelector = ( {this.addressSelector = ref;}} - addressList={ this.state.queryList } - onSelected={ this.onSelected } - truncateAt={ TRUNCATE_QUERY_LIST } + addressList={this.state.queryList} + onSelected={this.onSelected} + truncateAt={TRUNCATE_QUERY_LIST} /> ); } @@ -554,7 +554,7 @@ module.exports = React.createClass({ return (
- {this.props.title} + { this.props.title }
@@ -570,7 +570,7 @@ module.exports = React.createClass({
diff --git a/src/components/views/dialogs/ConfirmRedactDialog.js b/src/components/views/dialogs/ConfirmRedactDialog.js index 7922b7b289..7b5a9f776b 100644 --- a/src/components/views/dialogs/ConfirmRedactDialog.js +++ b/src/components/views/dialogs/ConfirmRedactDialog.js @@ -52,20 +52,20 @@ export default React.createClass({ return (
- {_t("Are you sure you wish to remove (delete) this event? " + - "Note that if you delete a room name or topic change, it could undo the change.")} + { _t("Are you sure you wish to remove (delete) this event? " + + "Note that if you delete a room name or topic change, it could undo the change.") }
diff --git a/src/components/views/dialogs/ConfirmUserActionDialog.js b/src/components/views/dialogs/ConfirmUserActionDialog.js index 11fba1a322..9091d8975e 100644 --- a/src/components/views/dialogs/ConfirmUserActionDialog.js +++ b/src/components/views/dialogs/ConfirmUserActionDialog.js @@ -88,7 +88,7 @@ export default React.createClass({
@@ -112,22 +112,22 @@ export default React.createClass({ return (
- {avatar} + { avatar }
-
{name}
-
{userId}
+
{ name }
+
{ userId }
- {reasonBox} + { reasonBox }
diff --git a/src/components/views/dialogs/KeyShareDialog.js b/src/components/views/dialogs/KeyShareDialog.js index aed8e6a5af..bc84d52021 100644 --- a/src/components/views/dialogs/KeyShareDialog.js +++ b/src/components/views/dialogs/KeyShareDialog.js @@ -126,17 +126,17 @@ export default React.createClass({ return (
-

{text}

+

{ text }

@@ -154,7 +154,7 @@ export default React.createClass({ } else { content = (
-

{_t('Loading device info...')}

+

{ _t('Loading device info...') }

); @@ -165,7 +165,7 @@ export default React.createClass({ onFinished={this.props.onFinished} title={_t('Encryption key request')} > - {content} + { content } ); }, diff --git a/src/components/views/dialogs/QuestionDialog.js b/src/components/views/dialogs/QuestionDialog.js index 22e68e3ac3..339b284e2f 100644 --- a/src/components/views/dialogs/QuestionDialog.js +++ b/src/components/views/dialogs/QuestionDialog.js @@ -55,7 +55,7 @@ export default React.createClass({ const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); const cancelButton = this.props.hasCancelButton ? ( ) : null; const buttonClasses = classnames({ @@ -64,18 +64,18 @@ export default React.createClass({ }); return (
- {this.props.description} + { this.props.description }
- {this.props.extraButtons} - {cancelButton} + { this.props.extraButtons } + { cancelButton }
); diff --git a/src/components/views/dialogs/SessionRestoreErrorDialog.js b/src/components/views/dialogs/SessionRestoreErrorDialog.js index 010072e8c6..f404bdd975 100644 --- a/src/components/views/dialogs/SessionRestoreErrorDialog.js +++ b/src/components/views/dialogs/SessionRestoreErrorDialog.js @@ -45,10 +45,10 @@ export default React.createClass({ if (SdkConfig.get().bug_report_endpoint_url) { bugreport = (

- {_tJsx( + { _tJsx( "Otherwise, click here to send a bug report.", - /(.*?)<\/a>/, (sub) => {sub}, - )} + /(.*?)<\/a>/, (sub) => { sub }, + ) }

); } @@ -57,19 +57,19 @@ export default React.createClass({
-

{_t("We encountered an error trying to restore your previous session. If " + +

{ _t("We encountered an error trying to restore your previous session. If " + "you continue, you will need to log in again, and encrypted chat " + - "history will be unreadable.")}

+ "history will be unreadable.") }

-

{_t("If you have previously used a more recent version of Riot, your session " + +

{ _t("If you have previously used a more recent version of Riot, your session " + "may be incompatible with this version. Close this window and return " + - "to the more recent version.")}

+ "to the more recent version.") }

- {bugreport} + { bugreport }
diff --git a/src/components/views/dialogs/SetEmailDialog.js b/src/components/views/dialogs/SetEmailDialog.js index ed5cef2f67..2dd996953d 100644 --- a/src/components/views/dialogs/SetEmailDialog.js +++ b/src/components/views/dialogs/SetEmailDialog.js @@ -130,10 +130,10 @@ export default React.createClass({ const emailInput = this.state.emailBusy ? : ; + blurToCancel={false} + onValueChanged={this.onEmailAddressChanged} />; return ( ; + usernameBusyIndicator = ; } else { const usernameAvailable = this.state.username && this.state.usernameCheckSupport && !this.state.usernameError; @@ -275,17 +275,17 @@ export default React.createClass({ /(.*?)<\/a>/, ], [ - (sub) => {this.props.homeserverUrl}, - (sub) => {sub}, + (sub) => { this.props.homeserverUrl }, + (sub) => { sub }, ], - )} + ) }

{ _tJsx( 'If you already have a Matrix account you can log in instead.', /(.*?)<\/a>/, - [(sub) => {sub}], - )} + [(sub) => { sub }], + ) }

{ auth } { authErrorIndicator } diff --git a/src/components/views/dialogs/TextInputDialog.js b/src/components/views/dialogs/TextInputDialog.js index 673be42030..c924da7745 100644 --- a/src/components/views/dialogs/TextInputDialog.js +++ b/src/components/views/dialogs/TextInputDialog.js @@ -65,10 +65,10 @@ export default React.createClass({ >
- +
- +
@@ -76,7 +76,7 @@ export default React.createClass({ { _t("Cancel") }
diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index 3dc7e86d75..f1117fd5aa 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -50,16 +50,16 @@ export default class AppPermission extends React.Component { let e2eWarningText; if (this.props.isRoomEncrypted) { e2eWarningText = - {_t('NOTE: Apps are not end-to-end encrypted')}; + { _t('NOTE: Apps are not end-to-end encrypted') }; } return (
- {_t('Warning!')}/ + {_t('Warning!')}
- {_t('Do you want to load widget from URL:')} {this.state.curlBase} - {e2eWarningText} + { _t('Do you want to load widget from URL:') } { this.state.curlBase } + { e2eWarningText }
- +
); } else if (this.state.hasPermissionToLoad == true) { @@ -312,19 +312,19 @@ export default React.createClass({ return (
- {this.formatAppTileName()} + { this.formatAppTileName() } - {/* Edit widget */} - {showEditButton && {_t('Edit')}} + /> } - {/* Delete widget */} + { /* Delete widget */ }
- {appTileBody} + { appTileBody }
); }, diff --git a/src/components/views/elements/AppWarning.js b/src/components/views/elements/AppWarning.js index 944f1422e6..f4015ae5b7 100644 --- a/src/components/views/elements/AppWarning.js +++ b/src/components/views/elements/AppWarning.js @@ -6,10 +6,10 @@ const AppWarning = (props) => { return (
- {_t('Warning!')}/ + {_t('Warning!')}
- {props.errorMsg} + { props.errorMsg }
); diff --git a/src/components/views/elements/Flair.js b/src/components/views/elements/Flair.js index 0628c6fc8c..11dbcbc021 100644 --- a/src/components/views/elements/Flair.js +++ b/src/components/views/elements/Flair.js @@ -238,11 +238,11 @@ export default class Flair extends React.Component { return
; } const avatars = this.state.profiles.map((profile, index) => { - return ; + return ; }); return ( - {avatars} + { avatars } ); } diff --git a/src/components/views/elements/ManageIntegsButton.js b/src/components/views/elements/ManageIntegsButton.js index 68f67cfad5..17dbbeee62 100644 --- a/src/components/views/elements/ManageIntegsButton.js +++ b/src/components/views/elements/ManageIntegsButton.js @@ -80,7 +80,7 @@ export default class ManageIntegsButton extends React.Component { }); if (this.state.scalarError && !this.scalarClient.hasCredentials()) { - integrationsWarningTriangle = ; + integrationsWarningTriangle = ; // Popup shown when hovering over integrationsButton_error (via CSS) integrationsErrorPopup = ( @@ -90,8 +90,8 @@ export default class ManageIntegsButton extends React.Component { } integrationsButton = ( - - + + { integrationsWarningTriangle } { integrationsErrorPopup } diff --git a/src/components/views/elements/MessageSpinner.js b/src/components/views/elements/MessageSpinner.js index bc0a326338..500c919d45 100644 --- a/src/components/views/elements/MessageSpinner.js +++ b/src/components/views/elements/MessageSpinner.js @@ -26,8 +26,8 @@ module.exports = React.createClass({ const msg = this.props.msg || "Loading..."; return (
-
{msg}
  - +
{ msg }
  +
); }, diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 214abc2329..51ae85ba5a 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -167,7 +167,7 @@ const Pill = React.createClass({ userId = member.userId; linkText = member.rawDisplayName.replace(' (IRC)', ''); // FIXME when groups are done if (this.props.shouldShowPillAvatar) { - avatar = ; + avatar = ; } pillClass = 'mx_UserPill'; href = null; @@ -180,7 +180,7 @@ const Pill = React.createClass({ if (room) { linkText = (room ? getDisplayAliasForRoom(room) : null) || resource; if (this.props.shouldShowPillAvatar) { - avatar = ; + avatar = ; } pillClass = 'mx_RoomPill'; } @@ -195,12 +195,12 @@ const Pill = React.createClass({ if (this.state.pillType) { return this.props.inMessage ? - {avatar} - {linkText} + { avatar } + { linkText } : - {avatar} - {linkText} + { avatar } + { linkText } ; } else { // Deliberately render nothing if the URL isn't recognised diff --git a/src/components/views/elements/TruncatedList.js b/src/components/views/elements/TruncatedList.js index 1801b1c3ab..1a674eef65 100644 --- a/src/components/views/elements/TruncatedList.js +++ b/src/components/views/elements/TruncatedList.js @@ -46,7 +46,7 @@ module.exports = React.createClass({ truncateAt: 2, createOverflowElement: function(overflowCount, totalCount) { return ( -
{_t("And %(count)s more...", {count: overflowCount})}
+
{ _t("And %(count)s more...", {count: overflowCount}) }
); }, }; @@ -93,8 +93,8 @@ module.exports = React.createClass({ return (
- {childNodes} - {overflowNode} + { childNodes } + { overflowNode }
); }, diff --git a/src/components/views/groups/GroupInviteTile.js b/src/components/views/groups/GroupInviteTile.js index b1578888bc..07c0bcf6b9 100644 --- a/src/components/views/groups/GroupInviteTile.js +++ b/src/components/views/groups/GroupInviteTile.js @@ -50,7 +50,7 @@ export default React.createClass({ className="mx_GroupInviteTile_name" dir="auto" > - {this.props.group.name} + { this.props.group.name } ; const badge =
!
; @@ -58,11 +58,11 @@ export default React.createClass({ return (
- {av} + { av }
- {label} - {badge} + { label } + { badge }
); diff --git a/src/components/views/groups/GroupMemberInfo.js b/src/components/views/groups/GroupMemberInfo.js index 499fb43ccb..6f1a370f26 100644 --- a/src/components/views/groups/GroupMemberInfo.js +++ b/src/components/views/groups/GroupMemberInfo.js @@ -128,7 +128,7 @@ module.exports = withMatrixClient(React.createClass({ kickButton = ( - {_t('Remove from group')} + { _t('Remove from group') } ); @@ -143,11 +143,11 @@ module.exports = withMatrixClient(React.createClass({ if (kickButton || adminButton) { adminTools =
-

{_t("Admin Tools")}

+

{ _t("Admin Tools") }

- {kickButton} - {adminButton} + { kickButton } + { adminButton }
; } @@ -173,13 +173,13 @@ module.exports = withMatrixClient(React.createClass({
- +
- {avatar} + { avatar }
- {groupMemberName} + { groupMemberName }
diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index fdaf815fe1..6a257259f9 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -135,7 +135,7 @@ export default withMatrixClient(React.createClass({
+ placeholder={_t('Filter group members')} />
); @@ -146,7 +146,7 @@ export default withMatrixClient(React.createClass({ - {this.makeGroupMemberTiles(this.state.searchQuery)} + { this.makeGroupMemberTiles(this.state.searchQuery) }
diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index 0a9dbb4d76..39ff3e4a07 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -123,7 +123,7 @@ export default React.createClass({
+ placeholder={_t('Filter group rooms')} />
); @@ -134,7 +134,7 @@ export default React.createClass({ - {this.makeGroupRoomTiles(this.state.searchQuery)} + { this.makeGroupRoomTiles(this.state.searchQuery) }
diff --git a/src/components/views/groups/GroupRoomTile.js b/src/components/views/groups/GroupRoomTile.js index 771e3d9c4f..452f862d16 100644 --- a/src/components/views/groups/GroupRoomTile.js +++ b/src/components/views/groups/GroupRoomTile.js @@ -71,10 +71,10 @@ const GroupRoomTile = React.createClass({ return (
- {av} + { av }
- {name} + { name }
); diff --git a/src/components/views/login/LoginFooter.js b/src/components/views/login/LoginFooter.js index 8bdec71685..392d36e288 100644 --- a/src/components/views/login/LoginFooter.js +++ b/src/components/views/login/LoginFooter.js @@ -25,7 +25,7 @@ module.exports = React.createClass({ render: function() { return ( ); }, diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index d9ab00e03f..0311239e7a 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -32,9 +32,9 @@ export default function SenderProfile(props) { return (
- {name || ''} - {props.enableFlair ? : null} - {props.aux ? {props.aux} : null} + { name || '' } + { props.enableFlair ? : null } + { props.aux ? { props.aux } : null }
); } diff --git a/src/components/views/messages/UnknownBody.js b/src/components/views/messages/UnknownBody.js index 346d157e24..083d7ac12e 100644 --- a/src/components/views/messages/UnknownBody.js +++ b/src/components/views/messages/UnknownBody.js @@ -31,7 +31,7 @@ module.exports = React.createClass({ const text = this.props.mxEvent.getContent().body; return ( - {text} + { text } ); }, diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 536259ae91..1c9296228d 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -231,16 +231,16 @@ module.exports = React.createClass({ "mx_AddWidget_button" } title={_t('Add a widget')}> - [+] {_t('Add a widget')} + [+] { _t('Add a widget') }
; } return (
- {apps} + { apps }
- {this._canUserModify() && addWidget} + { this._canUserModify() && addWidget }
); }, diff --git a/src/components/views/rooms/ForwardMessage.js b/src/components/views/rooms/ForwardMessage.js index 3c97128a02..67e55101e8 100644 --- a/src/components/views/rooms/ForwardMessage.js +++ b/src/components/views/rooms/ForwardMessage.js @@ -61,7 +61,7 @@ module.exports = React.createClass({ render: function() { return (
-

{_t('Please select the destination room for this message')}

+

{ _t('Please select the destination room for this message') }

); }, diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index afba4eba1e..42cbb90cd9 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -186,18 +186,18 @@ module.exports = React.createClass({ saveButton = ( - {_t("Save")} + { _t("Save") } ); } if (this.props.onCancelClick) { - cancelButton = ; + cancelButton = ; } if (this.props.saving) { const Spinner = sdk.getComponent("elements.Spinner"); - spinner =
; + spinner =
; } if (canSetRoomName) { @@ -254,7 +254,7 @@ module.exports = React.createClass({ } if (topic) { topicElement = -
{ topic }
; +
{ topic }
; } } @@ -262,16 +262,16 @@ module.exports = React.createClass({ if (canSetRoomAvatar) { roomAvatar = (
-
+
- +
); @@ -286,7 +286,7 @@ module.exports = React.createClass({ if (this.props.onSettingsClick) { settingsButton = - + ; } @@ -301,24 +301,24 @@ module.exports = React.createClass({ let forgetButton; if (this.props.onForgetClick) { forgetButton = - - + + ; } let searchButton; if (this.props.onSearchClick && this.props.inRoom) { searchButton = - - + + ; } let rightPanelButtons; if (this.props.collapsedRhs) { rightPanelButtons = - - + + ; } @@ -342,7 +342,7 @@ module.exports = React.createClass({ } return ( -
+
@@ -353,10 +353,10 @@ module.exports = React.createClass({ { topicElement }
- {spinner} - {saveButton} - {cancelButton} - {rightRow} + { spinner } + { saveButton } + { cancelButton } + { rightRow }
); diff --git a/src/components/views/rooms/SimpleRoomHeader.js b/src/components/views/rooms/SimpleRoomHeader.js index 8c06d71b6f..c47d219624 100644 --- a/src/components/views/rooms/SimpleRoomHeader.js +++ b/src/components/views/rooms/SimpleRoomHeader.js @@ -26,7 +26,7 @@ export function CancelButton(props) { return ( {_t("Cancel")}/ + width="18" height="18" alt={_t("Cancel")} /> ); } diff --git a/src/components/views/voip/CallView.js b/src/components/views/voip/CallView.js index e669f7e0a6..37d111be93 100644 --- a/src/components/views/voip/CallView.js +++ b/src/components/views/voip/CallView.js @@ -129,17 +129,17 @@ module.exports = React.createClass({ if (this.state.call && this.state.call.type === "voice" && this.props.showVoice) { const callRoom = MatrixClientPeg.get().getRoom(this.state.call.roomId); voice = ( -
- {_t("Active call (%(roomName)s)", {roomName: callRoom.name})} +
+ { _t("Active call (%(roomName)s)", {roomName: callRoom.name}) }
); } return (
- { voice }
diff --git a/src/components/views/voip/IncomingCallBox.js b/src/components/views/voip/IncomingCallBox.js index c5934b74dc..c12924791a 100644 --- a/src/components/views/voip/IncomingCallBox.js +++ b/src/components/views/voip/IncomingCallBox.js @@ -62,17 +62,17 @@ module.exports = React.createClass({
- {incomingCallText} + { incomingCallText }
- {_t("Decline")} + { _t("Decline") }
- {_t("Accept")} + { _t("Accept") }
diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js index 6ebf2078c1..8f062d27ae 100644 --- a/src/components/views/voip/VideoView.js +++ b/src/components/views/voip/VideoView.js @@ -110,13 +110,13 @@ module.exports = React.createClass({ const maxVideoHeight = fullscreenElement ? null : this.props.maxHeight; return ( -
+
- +
); From 07b6040c39c619b4dd3ae4dcdf7803661d36ca0b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 11:33:36 +0100 Subject: [PATCH 10/10] Update travis script to use lintwithexclusions --- scripts/travis.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/travis.sh b/scripts/travis.sh index f349b06ad5..c4a06c1bd1 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -6,6 +6,4 @@ npm run test ./.travis-test-riot.sh # run the linter, but exclude any files known to have errors or warnings. -./node_modules/.bin/eslint --max-warnings 0 \ - --ignore-path .eslintignore.errorfiles \ - src test +npm run lintwithexclusions