From 000ab4853a4b83408af42d59ed753ae76aa26e80 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 10 May 2020 01:38:40 +0200 Subject: Translation updates --- resources/langs/nheko_pl.ts | 122 ++++++++++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 32 deletions(-) (limited to 'resources/langs/nheko_pl.ts') diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index 07ecf4a4..c089a5b4 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -1,6 +1,14 @@ + + Cache + + + You joined this room. + + + ChatPage @@ -10,12 +18,22 @@ - + Invited user: %1 - + + Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually. + + + + + Room %1 created. + + + + Failed to invite %1 to %2: %3 @@ -50,7 +68,7 @@ - + Failed to upload media. Please try again. @@ -60,12 +78,7 @@ - - Migrating the cache to the current version failed. This can have different reasons. Please open an issue and try to use an older version in the mean time. Alternatively you can try deleting the cache manually - - - - + Incompatible cache version @@ -91,7 +104,7 @@ - + Please try to login again: %1 Spróbuj zalogować się ponownie: %1 @@ -116,12 +129,7 @@ Tworzenie pokoju nie powiodło się: %1 - - Room %1 created - - - - + Failed to leave room: %1 Nie udało się opuścić pokoju: %1 @@ -197,7 +205,7 @@ LoginPage - + Matrix ID ID Matrixa @@ -207,22 +215,42 @@ np. @joe:matrix.org - + + Your login name. A mxid should start with @ followed by the user id. After the user id you need to include your server name after a :. +You can also put your homeserver address there, if your server doesn't support .well-known lookup. +Example: @user:server.my +If Nheko fails to discover your homeserver, it will show you a field to enter the server manually. + + + + Password Hasło - + Device name Nazwa urządzenia - + + A name for this device, which will be shown to others, when verifying your devices. If none is provided, a random string is used for privacy purposes. + + + + + The address that can be used to contact you homeservers client API. +Example: https://server.my:8787 + + + + + LOGIN ZALOGUJ - + Autodiscovery failed. Received malformed response. @@ -232,7 +260,7 @@ - + The required endpoints were not found. Possibly not a Matrix server. Nie odnaleziono wymaganych punktów końcowych. To może nie być serwer Matriksa. @@ -247,10 +275,20 @@ Wystąpił nieznany błąd. Upewnij się, że domena serwera domowego jest prawidłowa. - + + SSO LOGIN + + + + Empty password Puste hasło + + + SSO login failed + + MemberList @@ -328,9 +366,19 @@ + The username must not be empty, and must contain only the characters a-z, 0-9, ., _, =, -, and /. + + + + Password Hasło + + + Please choose a secure password. The exact requirements for password strength may depend on your server. + + Password confirmation @@ -338,11 +386,16 @@ - Home Server - Serwer domowy + Homeserver + - + + A server that allows registration. Since matrix is decentralized, you need to first find a server you can register on or host your own. + + + + REGISTER ZAREJESTRUJ @@ -375,7 +428,7 @@ RoomInfo - + no version stored @@ -491,7 +544,7 @@ 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. @@ -661,7 +714,12 @@ - + + You joined this room. + + + + Rejected the knock from %1. @@ -685,7 +743,7 @@ TimelineRow - + Reply @@ -698,7 +756,7 @@ TimelineView - + Reply @@ -738,7 +796,7 @@ - + Close -- cgit 1.4.1 From 18f934efad19821bb2932ba687b2f3c42735add2 Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Thu, 14 May 2020 20:35:29 -0400 Subject: Add un-encrypted warning icon for messages in encrypted rooms --- resources/icons/ui/unlock.png | Bin 0 -> 385 bytes resources/icons/ui/unlock@2x.png | Bin 0 -> 741 bytes resources/langs/nheko_de.ts | 15 ++++++++++----- resources/langs/nheko_el.ts | 15 ++++++++++----- resources/langs/nheko_en.ts | 15 ++++++++++----- resources/langs/nheko_fi.ts | 15 ++++++++++----- resources/langs/nheko_fr.ts | 15 ++++++++++----- resources/langs/nheko_ja.ts | 15 ++++++++++----- resources/langs/nheko_nl.ts | 15 ++++++++++----- resources/langs/nheko_pl.ts | 15 ++++++++++----- resources/langs/nheko_ru.ts | 15 ++++++++++----- resources/langs/nheko_zh_CN.ts | 15 ++++++++++----- resources/qml/EncryptionIndicator.qml | 19 +++++++++++++++++-- resources/qml/TimelineRow.qml | 3 ++- resources/res.qrc | 2 ++ src/timeline/TimelineModel.cpp | 5 +++++ src/timeline/TimelineModel.h | 1 + 17 files changed, 127 insertions(+), 53 deletions(-) create mode 100644 resources/icons/ui/unlock.png create mode 100644 resources/icons/ui/unlock@2x.png (limited to 'resources/langs/nheko_pl.ts') diff --git a/resources/icons/ui/unlock.png b/resources/icons/ui/unlock.png new file mode 100644 index 00000000..90e4602a Binary files /dev/null and b/resources/icons/ui/unlock.png differ diff --git a/resources/icons/ui/unlock@2x.png b/resources/icons/ui/unlock@2x.png new file mode 100644 index 00000000..8df18143 Binary files /dev/null and b/resources/icons/ui/unlock@2x.png differ diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index fcbf8b31..2b5a5393 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted Verschlüsselt + + + This message is not encrypted! + + InviteeItem @@ -310,7 +315,7 @@ Beispiel: https://mein.server:8787 MessageDelegate - + redacted gelöscht @@ -548,7 +553,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) -- @@ -746,7 +751,7 @@ Beispiel: https://mein.server:8787 TimelineRow - + Reply Antworten @@ -799,7 +804,7 @@ Beispiel: https://mein.server:8787 Kein Raum geöffnet - + Close Schließen diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 39ed1442..a6e4ff7d 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -742,7 +747,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -795,7 +800,7 @@ Example: https://server.my:8787 - + Close diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index e7631462..1fd9b86c 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted Encrypted + + + This message is not encrypted! + + InviteeItem @@ -310,7 +315,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted redacted @@ -548,7 +553,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) -- @@ -746,7 +751,7 @@ Example: https://server.my:8787 TimelineRow - + Reply Reply @@ -799,7 +804,7 @@ Example: https://server.my:8787 No room open - + Close Close diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index 01b9d75d..069fb6b2 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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) -- @@ -742,7 +747,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -795,7 +800,7 @@ Example: https://server.my:8787 - + Close Sulje diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 9e47702b..d50b5fb8 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -742,7 +747,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -795,7 +800,7 @@ Example: https://server.my:8787 - + Close diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index 049c4189..63522065 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted 暗号化されています + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted 編集済み @@ -544,7 +549,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. -- 復号エラー (データベースと通信できませんでした) -- @@ -741,7 +746,7 @@ Example: https://server.my:8787 TimelineRow - + Reply 返信 @@ -794,7 +799,7 @@ Example: https://server.my:8787 部屋が開いていません - + Close 閉じる diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 205de986..2c3eeee3 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -742,7 +747,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -795,7 +800,7 @@ Example: https://server.my:8787 - + Close diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index c089a5b4..f68ca8b3 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -743,7 +748,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -796,7 +801,7 @@ Example: https://server.my:8787 - + Close diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 761110f0..95f75081 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -743,7 +748,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -796,7 +801,7 @@ Example: https://server.my:8787 - + Close Закрыть diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 5b080b74..6b6c0646 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -189,10 +189,15 @@ EncryptionIndicator - + Encrypted + + + This message is not encrypted! + + InviteeItem @@ -306,7 +311,7 @@ Example: https://server.my:8787 MessageDelegate - + redacted @@ -544,7 +549,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. @@ -741,7 +746,7 @@ Example: https://server.my:8787 TimelineRow - + Reply @@ -794,7 +799,7 @@ Example: https://server.my:8787 - + Close diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml index 00fe2ee4..428c2fae 100644 --- a/resources/qml/EncryptionIndicator.qml +++ b/resources/qml/EncryptionIndicator.qml @@ -3,13 +3,14 @@ import QtQuick.Controls 2.1 import im.nheko 1.0 Rectangle { + property bool encrypted: false id: indicator color: "transparent" width: 16 height: 16 ToolTip.visible: ma.containsMouse && indicator.visible - ToolTip.text: qsTr("Encrypted") + ToolTip.text: getEncryptionTooltip() MouseArea{ id: ma @@ -20,7 +21,21 @@ Rectangle { Image { id: stateImg anchors.fill: parent - source: "image://colorimage/:/icons/icons/ui/lock.png?"+colors.buttonText + source: getEncryptionImage() + } + + function getEncryptionImage() { + if (encrypted) + return "image://colorimage/:/icons/icons/ui/lock.png?"+colors.buttonText + else + return "image://colorimage/:/icons/icons/ui/unlock.png?#dd3d3d" + } + + function getEncryptionTooltip() { + if (encrypted) + return qsTr("Encrypted") + else + return qsTr("This message is not encrypted!") } } diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index 22222ef3..8dcd0056 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -66,7 +66,8 @@ MouseArea { } EncryptionIndicator { - visible: model.isEncrypted + visible: model.isRoomEncrypted + encrypted: model.isEncrypted Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16 diff --git a/resources/res.qrc b/resources/res.qrc index 64a5b3cb..a57d0416 100644 --- a/resources/res.qrc +++ b/resources/res.qrc @@ -14,6 +14,8 @@ icons/ui/double-tick-indicator@2x.png icons/ui/lock.png icons/ui/lock@2x.png + icons/ui/unlock.png + icons/ui/unlock@2x.png icons/ui/clock.png icons/ui/clock@2x.png icons/ui/checkmark.png diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index b7e90034..6e653f10 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -224,6 +224,7 @@ TimelineModel::roleNames() const {Id, "id"}, {State, "state"}, {IsEncrypted, "isEncrypted"}, + {IsRoomEncrypted, "isRoomEncrypted"}, {ReplyTo, "replyTo"}, {Reactions, "reactions"}, {RoomId, "roomId"}, @@ -350,6 +351,9 @@ TimelineModel::data(const QString &id, int role) const return std::holds_alternative< mtx::events::EncryptedEvent>(events[id]); } + case IsRoomEncrypted: { + return cache::isRoomEncrypted(room_id_.toStdString()); + } case ReplyTo: return QVariant(QString::fromStdString(in_reply_to_event(event))); case Reactions: @@ -387,6 +391,7 @@ TimelineModel::data(const QString &id, int role) const m.insert(names[Id], data(id, static_cast(Id))); m.insert(names[State], data(id, static_cast(State))); m.insert(names[IsEncrypted], data(id, static_cast(IsEncrypted))); + m.insert(names[IsRoomEncrypted], data(id, static_cast(IsRoomEncrypted))); m.insert(names[ReplyTo], data(id, static_cast(ReplyTo))); m.insert(names[RoomName], data(id, static_cast(RoomName))); m.insert(names[RoomTopic], data(id, static_cast(RoomTopic))); diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h index a737aac7..0e9ddb72 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h @@ -157,6 +157,7 @@ public: Id, State, IsEncrypted, + IsRoomEncrypted, ReplyTo, Reactions, RoomId, -- cgit 1.4.1