diff --git a/CMakeLists.txt b/CMakeLists.txt index c962d2da..36403890 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,7 +333,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG 1018c0822b80cdfc5d6b589fe94d1fd759113ef6 + GIT_TAG f5c78f4331b62a1e25a2d839cb38b07bb9bd7829 ) FetchContent_MakeAvailable(MatrixClient) else() diff --git a/io.github.NhekoReborn.Nheko.json b/io.github.NhekoReborn.Nheko.json index 3de04370..50fa3b33 100644 --- a/io.github.NhekoReborn.Nheko.json +++ b/io.github.NhekoReborn.Nheko.json @@ -146,9 +146,9 @@ "name": "mtxclient", "sources": [ { - "sha256": "537f4e6b280f351ad950cd6598c2407505a55f0d6c856b4ff97a9c59fc6fdb7a", + "sha256": "16203a92b03c488178b31bedca9d9015b1d406443f7e5363a2e09171e50f8dfc", "type": "archive", - "url": "https://github.com/Nheko-Reborn/mtxclient/archive/1018c0822b80cdfc5d6b589fe94d1fd759113ef6.tar.gz" + "url": "https://github.com/Nheko-Reborn/mtxclient/archive/f5c78f4331b62a1e25a2d839cb38b07bb9bd7829.tar.gz" } ] }, diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 24c6cea7..3936febc 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -18,7 +18,7 @@ - + Invited user: %1 Eingeladener Benutzer: %1 @@ -151,6 +151,12 @@ Low priority rooms Räume niedriger Priorität + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -494,12 +500,59 @@ Beispiel: https://mein.server:8787 RoomInfoListItem - + Leave room Raum verlassen - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Akzeptieren @@ -563,7 +616,7 @@ Beispiel: https://mein.server:8787 TextInputWidget - + Send a file Versende Datei @@ -584,7 +637,7 @@ Beispiel: https://mein.server:8787 Emoji - + Select a file Datei auswählen @@ -602,7 +655,7 @@ Beispiel: https://mein.server:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Entschlüsselungsfehler (Fehler bei Kommunikation mit Datenbank) -- @@ -771,12 +824,12 @@ Beispiel: https://mein.server:8787 %1 hat das Anklopfen zurückgezogen. - + You joined this room. Du bist dem Raum beigetreten. - + Rejected the knock from %1. Hat das Anklopfen von %1 abgewiesen. @@ -800,12 +853,12 @@ Beispiel: https://mein.server:8787 TimelineRow - + React - + Reply Antworten @@ -818,7 +871,7 @@ Beispiel: https://mein.server:8787 TimelineView - + React @@ -863,7 +916,7 @@ Beispiel: https://mein.server:8787 Kein Raum geöffnet - + Close Schließen @@ -925,7 +978,7 @@ Beispiel: https://mein.server:8787 UserSettingsPage - + Minimize to tray Ins Benachrichtigungsfeld minimieren @@ -979,6 +1032,11 @@ Beispiel: https://mein.server:8787 Desktop notifications Desktopbenachrichtigungen + + + Highlight message on hover + + Scale factor @@ -1010,7 +1068,7 @@ Beispiel: https://mein.server:8787 Gerätefingerabdruck - + Session Keys Sitzungsschlüssel @@ -1030,22 +1088,22 @@ Beispiel: https://mein.server:8787 VERSCHLÜSSELUNG - + GENERAL ALLGEMEINES - + INTERFACE OBERFLÄCHE - + Emoji Font Family Emojischriftart - + Open Sessions File Öffne Sessions Datei diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 6c186504..c92e29d6 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Βγές - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Αποδοχή @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file @@ -580,7 +633,7 @@ Example: https://server.my:8787 - + Select a file Διάλεξε ένα αρχείο @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -767,12 +820,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -796,12 +849,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -814,7 +867,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -859,7 +912,7 @@ Example: https://server.my:8787 - + Close @@ -921,7 +974,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Ελαχιστοποίηση @@ -975,6 +1028,11 @@ Example: https://server.my:8787 Desktop notifications + + + Highlight message on hover + + Scale factor @@ -1006,7 +1064,7 @@ Example: https://server.my:8787 - + Session Keys @@ -1026,22 +1084,22 @@ Example: https://server.my:8787 - + GENERAL ΓΕΝΙΚΑ - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index d6f5336b..ea2241f1 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -18,7 +18,7 @@ - + Invited user: %1 Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -494,12 +500,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Leave room - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Accept @@ -563,7 +616,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file Send a file @@ -584,7 +637,7 @@ Example: https://server.my:8787 Emoji - + Select a file Select a file @@ -602,7 +655,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Decryption Error (failed to communicate with DB) -- @@ -771,12 +824,12 @@ Example: https://server.my:8787 %1 redacted their knock. - + You joined this room. You joined this room. - + Rejected the knock from %1. Rejected the knock from %1. @@ -800,12 +853,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply Reply @@ -818,7 +871,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -863,7 +916,7 @@ Example: https://server.my:8787 No room open - + Close Close @@ -925,7 +978,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Minimize to tray @@ -979,6 +1032,11 @@ Example: https://server.my:8787 Desktop notifications Desktop notifications + + + Highlight message on hover + + Scale factor @@ -1010,7 +1068,7 @@ Example: https://server.my:8787 Device Fingerprint - + Session Keys Session Keys @@ -1030,22 +1088,22 @@ Example: https://server.my:8787 ENCRYPTION - + GENERAL GENERAL - + INTERFACE INTERFACE - + Emoji Font Family Emoji Font Family - + Open Sessions File Open Sessions File diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index b8aa463f..01f78691 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms Alhaisen prioriteetin huoneet + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Poistu huoneesta - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Hyväksy @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file Lähetä tiedosto @@ -580,7 +633,7 @@ Example: https://server.my:8787 Emoji - + Select a file Valitse tiedosto @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- Virhe purkaessa salausta (tietokannan kanssa kommunikointi epäonnistui) -- @@ -767,12 +820,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -796,12 +849,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -814,7 +867,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -859,7 +912,7 @@ Example: https://server.my:8787 - + Close Sulje @@ -921,7 +974,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Pienennä ilmoitusalueelle @@ -975,6 +1028,11 @@ Example: https://server.my:8787 Desktop notifications Työpöytäilmoitukset + + + Highlight message on hover + + Scale factor @@ -1006,7 +1064,7 @@ Example: https://server.my:8787 Laitteen sormenjälki - + Session Keys Istunnon avaimet @@ -1026,22 +1084,22 @@ Example: https://server.my:8787 SALAUS - + GENERAL YLEISET ASETUKSET - + INTERFACE - + Emoji Font Family - + Open Sessions File Avaa Istuntoavaintiedosto diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index cc8c8238..2efe7777 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Quitter le salon - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Accepter @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file @@ -580,7 +633,7 @@ Example: https://server.my:8787 - + Select a file Sélectionnez un fichier @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -767,12 +820,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -796,12 +849,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -814,7 +867,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -859,7 +912,7 @@ Example: https://server.my:8787 - + Close @@ -921,7 +974,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Réduire à la barre des tâches @@ -975,6 +1028,11 @@ Example: https://server.my:8787 Desktop notifications + + + Highlight message on hover + + Scale factor @@ -1006,7 +1064,7 @@ Example: https://server.my:8787 - + Session Keys @@ -1026,22 +1084,22 @@ Example: https://server.my:8787 - + GENERAL GÉNÉRAL - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index aaba8bd4..40840af3 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -18,7 +18,7 @@ - + Invited user: %1 招待されたユーザー: %1 @@ -151,6 +151,12 @@ Low priority rooms 優先度の低い部屋 + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room 部屋を出る - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept 容認 @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file ファイルを送信 @@ -580,7 +633,7 @@ Example: https://server.my:8787 絵文字 - + Select a file ファイルを選択 @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. -- 復号エラー (データベースと通信できませんでした) -- @@ -766,12 +819,12 @@ Example: https://server.my:8787 %1がノックを編集しました。 - + You joined this room. - + Rejected the knock from %1. %1からのノックを拒否しました。 @@ -795,12 +848,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply 返信 @@ -813,7 +866,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -858,7 +911,7 @@ Example: https://server.my:8787 部屋が開いていません - + Close 閉じる @@ -920,7 +973,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray トレイへ最小化 @@ -974,6 +1027,11 @@ Example: https://server.my:8787 Desktop notifications デスクトップ通知 + + + Highlight message on hover + + Scale factor @@ -1005,7 +1063,7 @@ Example: https://server.my:8787 デバイスの指紋 - + Session Keys セッション鍵 @@ -1025,22 +1083,22 @@ Example: https://server.my:8787 暗号化 - + GENERAL 全般 - + INTERFACE - + Emoji Font Family - + Open Sessions File セッションファイルを開く diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 8f5a9f21..3994c843 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Kamer verlaten - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Accepteren @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file @@ -580,7 +633,7 @@ Example: https://server.my:8787 - + Select a file Kies een bestand @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -767,12 +820,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -796,12 +849,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -814,7 +867,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -859,7 +912,7 @@ Example: https://server.my:8787 - + Close @@ -921,7 +974,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Minimaliseren naar systeemvak @@ -975,6 +1028,11 @@ Example: https://server.my:8787 Desktop notifications + + + Highlight message on hover + + Scale factor @@ -1006,7 +1064,7 @@ Example: https://server.my:8787 - + Session Keys @@ -1026,22 +1084,22 @@ Example: https://server.my:8787 - + GENERAL ALGEMEEN - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index 7e4495fa..ce1478f4 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Opuść pokój - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Akceptuj @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file Wyślij plik @@ -580,7 +633,7 @@ Example: https://server.my:8787 Emoji - + Select a file Wybierz plik @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -768,12 +821,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -797,12 +850,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -815,7 +868,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -860,7 +913,7 @@ Example: https://server.my:8787 - + Close @@ -922,7 +975,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Zminimalizuj do paska zadań @@ -976,6 +1029,11 @@ Example: https://server.my:8787 Desktop notifications Powiadomienia na pulpicie + + + Highlight message on hover + + Scale factor @@ -1007,7 +1065,7 @@ Example: https://server.my:8787 Odcisk palca urządzenia - + Session Keys @@ -1027,22 +1085,22 @@ Example: https://server.my:8787 SZYFROWANIE - + GENERAL OGÓLNE - + INTERFACE - + Emoji Font Family - + Open Sessions File diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 99a31673..42b0948e 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms Комнаты с низким приоритетом + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room Покинуть комнату - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept Принять @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file Отправить файл @@ -580,7 +633,7 @@ Example: https://server.my:8787 - + Select a file Выберите файл @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -768,12 +821,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -797,12 +850,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -815,7 +868,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -860,7 +913,7 @@ Example: https://server.my:8787 - + Close Закрыть @@ -922,7 +975,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray Сворачивать в системную панель @@ -976,6 +1029,11 @@ Example: https://server.my:8787 Desktop notifications Уведомления на рабочем столе + + + Highlight message on hover + + Scale factor @@ -1007,7 +1065,7 @@ Example: https://server.my:8787 Отпечаток устройства - + Session Keys Ключи сеанса @@ -1027,22 +1085,22 @@ Example: https://server.my:8787 ШИФРОВАНИЕ - + GENERAL ГЛАВНОЕ - + INTERFACE - + Emoji Font Family - + Open Sessions File Открыть файл сеансов diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 8afd6e3b..33598230 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -18,7 +18,7 @@ - + Invited user: %1 @@ -151,6 +151,12 @@ Low priority rooms + + + Server Notices + Tag translation for m.server_notice + + @@ -189,7 +195,7 @@ EmojiPicker - + Search @@ -490,12 +496,59 @@ Example: https://server.my:8787 RoomInfoListItem - + Leave room 离开聊天室 - + + Tag room as: + + + + + Favourite + Standard matrix tag for favourites + + + + + Low Priority + Standard matrix tag for low priority rooms + + + + + Server Notice + Standard matrix tag for server notices + + + + + Adds or removes the specified tag. + WhatsThis hint for tag menu actions + + + + + New tag... + Add a new tag to the room + + + + + New Tag + Tag name prompt title + + + + + Tag: + Tag name prompt + + + + Accept 接受 @@ -559,7 +612,7 @@ Example: https://server.my:8787 TextInputWidget - + Send a file 发送一个文件 @@ -580,7 +633,7 @@ Example: https://server.my:8787 - + Select a file 选择一个文件 @@ -598,7 +651,7 @@ Example: https://server.my:8787 TimelineModel - + -- Decryption Error (failed to communicate with DB) -- Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session. @@ -766,12 +819,12 @@ Example: https://server.my:8787 - + You joined this room. - + Rejected the knock from %1. @@ -795,12 +848,12 @@ Example: https://server.my:8787 TimelineRow - + React - + Reply @@ -813,7 +866,7 @@ Example: https://server.my:8787 TimelineView - + React @@ -858,7 +911,7 @@ Example: https://server.my:8787 - + Close @@ -920,7 +973,7 @@ Example: https://server.my:8787 UserSettingsPage - + Minimize to tray 最小化至托盘 @@ -974,6 +1027,11 @@ Example: https://server.my:8787 Desktop notifications 桌面通知 + + + Highlight message on hover + + Scale factor @@ -1005,7 +1063,7 @@ Example: https://server.my:8787 设备指纹 - + Session Keys 会话密钥 @@ -1025,22 +1083,22 @@ Example: https://server.my:8787 加密 - + GENERAL 通用 - + INTERFACE - + Emoji Font Family - + Open Sessions File 打开会话文件 diff --git a/src/Cache.cpp b/src/Cache.cpp index 3a388bb9..1061e60e 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -915,8 +915,8 @@ Cache::saveState(const mtx::responses::Sync &res) bool has_new_tags = false; for (const auto &evt : room.second.account_data.events) { // for now only fetch tag events - if (std::holds_alternative>(evt)) { - auto tags_evt = std::get>(evt); + if (std::holds_alternative>(evt)) { + auto tags_evt = std::get>(evt); has_new_tags = true; for (const auto &tag : tags_evt.content.tags) { updatedInfo.tags.push_back(tag.first); @@ -1081,7 +1081,7 @@ Cache::roomsWithTagUpdates(const mtx::responses::Sync &res) for (const auto &room : res.rooms.join) { bool hasUpdates = false; for (const auto &evt : room.second.account_data.events) { - if (std::holds_alternative>(evt)) { + if (std::holds_alternative>(evt)) { hasUpdates = true; } } diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 6670532c..1e06da5d 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -300,6 +300,29 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) connect(text_input_, &TextInputWidget::sendBanRoomRequest, this, &ChatPage::banUser); connect(text_input_, &TextInputWidget::sendUnbanRoomRequest, this, &ChatPage::unbanUser); + connect( + text_input_, &TextInputWidget::changeRoomNick, this, [this](const QString &displayName) { + mtx::events::state::Member member; + member.display_name = displayName.toStdString(); + member.avatar_url = + cache::avatarUrl(currentRoom(), + QString::fromStdString(http::client()->user_id().to_string())) + .toStdString(); + member.membership = mtx::events::state::Membership::Join; + + http::client() + ->send_state_event( + currentRoom().toStdString(), + http::client()->user_id().to_string(), + member, + [](mtx::responses::EventId, mtx::http::RequestErr err) { + if (err) + nhlog::net()->error("Failed to set room displayname: {}", + err->matrix_error.error); + }); + }); + connect( text_input_, &TextInputWidget::uploadMedia, diff --git a/src/ChatPage.h b/src/ChatPage.h index 94a5db59..b6b72319 100644 --- a/src/ChatPage.h +++ b/src/ChatPage.h @@ -77,6 +77,8 @@ public: QSharedPointer userSettings() { return userSettings_; } void deleteConfigs(); + CommunitiesList *communitiesList() { return communitiesList_; } + //! Calculate the width of the message timeline. uint64_t timelineWidth(); bool isSideBarExpanded(); diff --git a/src/CommunitiesList.cpp b/src/CommunitiesList.cpp index bb57ca40..8a938646 100644 --- a/src/CommunitiesList.cpp +++ b/src/CommunitiesList.cpp @@ -257,6 +257,18 @@ CommunitiesList::roomList(const QString &id) const return {}; } +std::vector +CommunitiesList::currentTags() const +{ + std::vector tags; + for (auto &entry : communities_) { + CommunitiesListItem *item = entry.second.data(); + if (item->is_tag()) + tags.push_back(entry.first.mid(4).toStdString()); + } + return tags; +} + void CommunitiesList::sortEntries() { diff --git a/src/CommunitiesList.h b/src/CommunitiesList.h index d3cbeeff..63f7af07 100644 --- a/src/CommunitiesList.h +++ b/src/CommunitiesList.h @@ -28,6 +28,7 @@ public: void syncTags(const std::map &info); void setTagsForRoom(const QString &id, const std::vector &tags); + std::vector currentTags() const; signals: void communityChanged(const QString &id); diff --git a/src/CommunitiesListItem.cpp b/src/CommunitiesListItem.cpp index 274271e5..c56c74a2 100644 --- a/src/CommunitiesListItem.cpp +++ b/src/CommunitiesListItem.cpp @@ -137,6 +137,8 @@ CommunitiesListItem::updateTooltip() setToolTip(tr("Favourite rooms")); else if (tag == "m.lowpriority") setToolTip(tr("Low priority rooms")); + else if (tag == "m.server_notice") + setToolTip(tr("Server Notices", "Tag translation for m.server_notice")); else if (tag.startsWith("u.")) setToolTip(tag.right(tag.size() - 2) + tr(" (tag)")); else diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp index ee8d532d..ad774360 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -23,7 +24,10 @@ #include "AvatarProvider.h" #include "Cache.h" +#include "ChatPage.h" #include "Config.h" +#include "Logging.h" +#include "MatrixClient.h" #include "RoomInfoListItem.h" #include "Splitter.h" #include "UserSettingsPage.h" @@ -97,7 +101,106 @@ RoomInfoListItem::init(QWidget *parent) menu_ = new Menu(this); leaveRoom_ = new QAction(tr("Leave room"), this); connect(leaveRoom_, &QAction::triggered, this, [this]() { emit leaveRoom(roomId_); }); - menu_->addAction(leaveRoom_); + + connect(menu_, &QMenu::aboutToShow, this, [this]() { + menu_->clear(); + menu_->addAction(leaveRoom_); + + menu_->addSection(QIcon(":/icons/icons/ui/tag.png"), tr("Tag room as:")); + + auto roomInfo = cache::singleRoomInfo(roomId_.toStdString()); + + auto tags = ChatPage::instance()->communitiesList()->currentTags(); + + // add default tag, remove server notice tag + if (std::find(tags.begin(), tags.end(), "m.favourite") == tags.end()) + tags.push_back("m.favourite"); + if (std::find(tags.begin(), tags.end(), "m.lowpriority") == tags.end()) + tags.push_back("m.lowpriority"); + if (auto it = std::find(tags.begin(), tags.end(), "m.server_notice"); + it != tags.end()) + tags.erase(it); + + for (const auto &tag : tags) { + QString tagName; + if (tag == "m.favourite") + tagName = tr("Favourite", "Standard matrix tag for favourites"); + else if (tag == "m.lowpriority") + tagName = + tr("Low Priority", "Standard matrix tag for low priority rooms"); + else if (tag == "m.server_notice") + tagName = + tr("Server Notice", "Standard matrix tag for server notices"); + else if ((tag.size() > 2 && tag.substr(0, 2) == "u.") || + tag.find(".") != + std::string::npos) // tag manager creates tags without u., which + // is wrong, but we still want to display them + tagName = QString::fromStdString(tag.substr(2)); + + if (tagName.isEmpty()) + continue; + + auto tagAction = menu_->addAction(tagName); + tagAction->setCheckable(true); + tagAction->setWhatsThis(tr("Adds or removes the specified tag.", + "WhatsThis hint for tag menu actions")); + + for (const auto &riTag : roomInfo.tags) + if (riTag == tag) { + tagAction->setChecked(true); + break; + } + + connect(tagAction, &QAction::triggered, this, [this, tag](bool checked) { + if (checked) + http::client()->put_tag( + roomId_.toStdString(), + tag, + {}, + [tag](mtx::http::RequestErr err) { + if (err) { + nhlog::ui()->error( + "Failed to add tag: {}, {}", + tag, + err->matrix_error.error); + } + }); + else + http::client()->delete_tag( + roomId_.toStdString(), + tag, + [tag](mtx::http::RequestErr err) { + if (err) { + nhlog::ui()->error( + "Failed to delete tag: {}, {}", + tag, + err->matrix_error.error); + } + }); + }); + } + + auto newTagAction = menu_->addAction(tr("New tag...", "Add a new tag to the room")); + connect(newTagAction, &QAction::triggered, this, [this]() { + QString tagName = + QInputDialog::getText(this, + tr("New Tag", "Tag name prompt title"), + tr("Tag:", "Tag name prompt")); + if (tagName.isEmpty()) + return; + + std::string tag = "u." + tagName.toStdString(); + + http::client()->put_tag( + roomId_.toStdString(), tag, {}, [tag](mtx::http::RequestErr err) { + if (err) { + nhlog::ui()->error("Failed to add tag: {}, {}", + tag, + err->matrix_error.error); + } + }); + }); + }); } RoomInfoListItem::RoomInfoListItem(QString room_id, diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp index af5c278e..3e3915bb 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp @@ -279,6 +279,7 @@ FilteredTextEdit::canInsertFromMimeData(const QMimeData *source) const void FilteredTextEdit::insertFromMimeData(const QMimeData *source) { + qInfo() << "Got mime formats: \n" << source->formats(); const auto formats = source->formats().filter("/"); const auto image = formats.filter("image/", Qt::CaseInsensitive); const auto audio = formats.filter("audio/", Qt::CaseInsensitive); @@ -576,6 +577,8 @@ TextInputWidget::command(QString command, QString args) sendBanRoomRequest(args.section(' ', 0, 0), args.section(' ', 1, -1)); } else if (command == "unban") { sendUnbanRoomRequest(args.section(' ', 0, 0), args.section(' ', 1, -1)); + } else if (command == "roomnick") { + changeRoomNick(args); } else if (command == "shrug") { sendTextMessage("¯\\_(ツ)_/¯"); } else if (command == "fliptable") { diff --git a/src/TextInputWidget.h b/src/TextInputWidget.h index addb61ec..a0105eb0 100644 --- a/src/TextInputWidget.h +++ b/src/TextInputWidget.h @@ -167,6 +167,7 @@ signals: void sendKickRoomRequest(const QString &userid, const QString &reason); void sendBanRoomRequest(const QString &userid, const QString &reason); void sendUnbanRoomRequest(const QString &userid, const QString &reason); + void changeRoomNick(const QString &displayname); void startedTyping(); void stoppedTyping(); diff --git a/src/dialogs/PreviewUploadOverlay.cpp b/src/dialogs/PreviewUploadOverlay.cpp index 42558d67..20959b0a 100644 --- a/src/dialogs/PreviewUploadOverlay.cpp +++ b/src/dialogs/PreviewUploadOverlay.cpp @@ -136,6 +136,11 @@ PreviewUploadOverlay::setLabels(const QString &type, const QString &mime, uint64 void PreviewUploadOverlay::setPreview(const QImage &src, const QString &mime) { + nhlog::ui()->info("Pasting image with size: {}x{}, format: {}", + src.height(), + src.width(), + mime.toStdString()); + auto const &split = mime.split('/'); auto const &type = split[1];