Add menu entry to show decrypted source

Also make hidden entries not consume space in Menus with some qml
styles.
master
Nicolas Werner 5 years ago
parent 69c8476cb7
commit 0e1bb5137b
  1. 5
      CHANGELOG.md
  2. 31
      resources/langs/nheko_de.ts
  3. 29
      resources/langs/nheko_el.ts
  4. 29
      resources/langs/nheko_en.ts
  5. 29
      resources/langs/nheko_fi.ts
  6. 29
      resources/langs/nheko_fr.ts
  7. 29
      resources/langs/nheko_ja.ts
  8. 29
      resources/langs/nheko_nl.ts
  9. 29
      resources/langs/nheko_pl.ts
  10. 29
      resources/langs/nheko_ru.ts
  11. 29
      resources/langs/nheko_zh_CN.ts
  12. 7
      resources/qml/TimelineRow.qml
  13. 11
      resources/qml/TimelineView.qml
  14. 13
      src/timeline/TimelineModel.cpp
  15. 1
      src/timeline/TimelineModel.h

@ -2,11 +2,16 @@
## [0.7.1] -- unreleased
### Features
- Show decrypted message source (helps debugging)
### Bugfixes
- Fix display of images sent by the user (thank you, wnereiz and not-chicken for reporting)
- Fix crash when trying to maximize image, that wasn't downloaded yet.
- Fix Binding restorMode flooding logs on Qt 5.14.2+
- Fix with some qml styles hidden menu items leave empty space
## [0.7.0] -- 2020-04-19

@ -327,12 +327,12 @@
<translation>REGISTRIEREN</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation>Keine unterstützten Registrierungsmethoden!</translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Ungültiger Benutzername</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- Entschlüsselungsfehler (Fehler bei Kommunikation mit Datenbank) --</translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation>-- Entschlüsselungsfehler (Fehler bei Suche nach megolm Schlüsseln in Datenbank) --</translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation>-- Entschlüsselungsfehler (%1) --</translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>Nachricht zurückziehen fehlgeschlagen: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation>Bild speichern</translation>
</message>
@ -514,19 +514,19 @@
<translation>Datei speichern</translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation>-- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) --</translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation>-- Verschlüsseltes Event (Unbekannter Eventtyp) --</translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation>Antworten</translation>
</message>
@ -694,7 +694,12 @@
<message>
<location line="+3"/>
<source>View raw message</source>
<translation type="unfinished">Zeige rohen Nachrichteninhalt</translation>
<translation>Zeige rohen Nachrichteninhalt</translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation>Zeige rohen, entschlüsselten Nachrichteninhalt</translation>
</message>
<message>
<location line="+4"/>
@ -702,7 +707,7 @@
<translation>Nachricht löschen</translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation>Speichern unter...</translation>
</message>

@ -327,12 +327,12 @@
<translation>ΕΓΓΡΑΦΗ</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Μη έγκυρο όνομα χρήστη</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Αποθήκευση Εικόνας</translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -696,13 +696,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -327,12 +327,12 @@
<translation>REGISTER</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation>No supported registration flows!</translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Invalid username</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- Decryption Error (failed to communicate with DB) --</translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation>-- Decryption Error (failed to retrieve megolm keys from db) --</translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation>-- Decryption Error (%1) --</translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>Message redaction failed: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation>Save image</translation>
</message>
@ -514,19 +514,19 @@
<translation>Save file</translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation>-- Encrypted Event (No keys found for decryption) --</translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation>-- Encrypted Event (Unknown event type) --</translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation>Reply</translation>
</message>
@ -696,13 +696,18 @@
<source>View raw message</source>
<translation>View raw message</translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation>Redact message</translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation>Save as</translation>
</message>

@ -327,12 +327,12 @@
<translation>REKISTERÖIDY</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Epäkelpo käyttäjänimi</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (tietokannan kanssa kommunikointi epäonnistui) --</translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (megolm-avaimien hakeminen tietokannasta epäonnistui) --</translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (%1) --</translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Viestin poisto epäonnistui: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Tallenna kuva</translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished">-- Salattu viesti (salauksen purkuavaimia ei löydetty) --</translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished">-- Salattu viesti (tuntematon viestityyppi) --</translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -696,13 +696,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -328,12 +328,12 @@
<translation>S&apos;ENREGISTRER</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Nom d&apos;utilisateur invalide</translation>
</message>
@ -472,30 +472,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Enregistrer l&apos;image</translation>
</message>
@ -515,19 +515,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -697,13 +697,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -327,12 +327,12 @@
<translation></translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation></translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- () --</translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation>-- (megolm鍵を取得できませんでした) --</translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished">-- (%1) --</translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation></translation>
</message>
@ -514,19 +514,19 @@
<translation></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished">-- () --</translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished">-- () --</translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@ -676,7 +676,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -695,13 +695,18 @@
<source>View raw message</source>
<translation></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation></translation>
</message>

@ -327,12 +327,12 @@
<translation>REGISTREREN</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Ongeldige gebruikersnaam</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Afbeelding opslaan</translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -696,13 +696,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -327,12 +327,12 @@
<translation>ZAREJESTRUJ</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Nieprawidłowa nazwa użytkownika</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Redagowanie wiadomości nie powiodło się: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Zapisz obraz</translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -697,13 +697,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -327,12 +327,12 @@
<translation>РЕГИСТРАЦИЯ</translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation>Некорректное имя пользователя</translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Ошибка редактирования сообщения: %1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Сохранить изображение</translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -697,13 +697,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -327,12 +327,12 @@
<translation></translation>
</message>
<message>
<location line="+54"/>
<location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+132"/>
<location line="+135"/>
<source>Invalid username</source>
<translation></translation>
</message>
@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
<location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
<location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can&apos;t be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+85"/>
<location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">%1</translation>
</message>
<message>
<location line="+454"/>
<location line="+455"/>
<source>Save image</source>
<translation type="unfinished"></translation>
</message>
@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-591"/>
<location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can&apos;t be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+75"/>
<location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn&apos;t parse it, because Nheko/mtxclient don&apos;t support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+648"/>
<location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@ -676,7 +676,7 @@
<context>
<name>TimelineView</name>
<message>
<location filename="../qml/TimelineView.qml" line="+46"/>
<location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@ -695,13 +695,18 @@
<source>View raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>View decrypted raw message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>

@ -17,11 +17,11 @@ MouseArea {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if (mouse.button === Qt.RightButton)
messageContextMenu.show(model.id, model.type, row)
messageContextMenu.show(model.id, model.type, model.isEncrypted, row)
}
onPressAndHold: {
if (mouse.source === Qt.MouseEventNotSynthesized)
messageContextMenu.show(model.id, model.type, row)
messageContextMenu.show(model.id, model.type, model.isEncrypted, row)
}
RowLayout {
@ -97,8 +97,7 @@ MouseArea {
ToolTip.visible: hovered
ToolTip.text: qsTr("Options")
onClicked: messageContextMenu.show(model.id, model.type, optionsButton)
onClicked: messageContextMenu.show(model.id, model.type, model.isEncrypted, optionsButton)
}
Label {

@ -33,14 +33,16 @@ Page {
id: messageContextMenu
modal: true
function show(eventId_, eventType_, showAt) {
function show(eventId_, eventType_, isEncrypted_, showAt) {
eventId = eventId_
eventType = eventType_
isEncrypted = isEncrypted_
popup(showAt)
}
property string eventId
property int eventType
property bool isEncrypted
MenuItem {
text: qsTr("Reply")
@ -57,12 +59,19 @@ Page {
text: qsTr("View raw message")
onTriggered: chat.model.viewRawMessage(messageContextMenu.eventId)
}
MenuItem {
visible: messageContextMenu.isEncrypted
height: visible ? implicitHeight : 0
text: qsTr("View decrypted raw message")
onTriggered: chat.model.viewDecryptedRawMessage(messageContextMenu.eventId)
}
MenuItem {
text: qsTr("Redact message")
onTriggered: chat.model.redactEvent(messageContextMenu.eventId)
}
MenuItem {
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
height: visible ? implicitHeight : 0
text: qsTr("Save as")
onTriggered: timelineManager.timeline.saveMedia(messageContextMenu.eventId)
}

@ -697,7 +697,20 @@ TimelineModel::viewRawMessage(QString id) const
}
void
TimelineModel::viewDecryptedRawMessage(QString id) const
{
auto event = events.value(id);
if (auto e =
std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(&event)) {
event = decryptEvent(*e).event;
}
std::string ev = utils::serialize_event(event).dump(4);
auto dialog = new dialogs::RawMessage(QString::fromStdString(ev));
Q_UNUSED(dialog);
}
void
TimelineModel::openUserProfile(QString userid) const
{
MainWindow::instance()->openUserProfile(userid, room_id_);

@ -179,6 +179,7 @@ public:
Q_INVOKABLE QString escapeEmoji(QString str) const;
Q_INVOKABLE void viewRawMessage(QString id) const;
Q_INVOKABLE void viewDecryptedRawMessage(QString id) const;
Q_INVOKABLE void openUserProfile(QString userid) const;
Q_INVOKABLE void replyAction(QString id);
Q_INVOKABLE void readReceiptsAction(QString id) const;

Loading…
Cancel
Save