diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 6c57dcbbcf3fb098c77a0f72e8c3ae76545af266..84c712baf8aae6c3c5a453889c4bcc86aa752f53 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>In Datei speichern</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>Hochladen der Bilddatei fehlgeschlagen. Bitte versuche es erneut.</translation> </message> @@ -32,7 +32,7 @@ <translation>Hochladen der Videodatei fehlgeschlagen. Bitte versuche es erneut.</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Wiederherstellung des OLM Accounts fehlgeschlagen. Bitte logge dich erneut ein.</translation> </message> @@ -42,7 +42,7 @@ <translation>Nachrichten konnten nicht aus dem Cache geladen werden. Bitte melde dich erneut an.</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation>Erstellung des Schlüsselmaterials fehlgeschlagen. Antwort des Servers: %1 %2. Bitte versuche es später erneut.</translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Datei speichern</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Bild speichern</translation> </message> @@ -205,8 +205,8 @@ <translation>Teilnehmerliste</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation>keine Version gespeichert</translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Raum verlassen</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Akzeptieren</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>Verschlüsselt</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>Versende Datei</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Schreibe eine Nachricht…</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>Verschlüsselung aktiv</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>Raumoptionen</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Benutzer einladen</translation> </message> @@ -459,15 +494,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> tippt</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> tippen</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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> + <numerusform>%1%2 tippt</numerusform> + <numerusform>%1 und %2 tippen</numerusform> + </translation> </message> </context> <context> @@ -481,7 +515,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Ins Benachrichtigungsfeld minimieren</translation> </message> @@ -521,12 +555,17 @@ <translation>Schriftgröße</translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation>Schriftart</translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Erscheinungsbild</translation> </message> @@ -566,7 +605,7 @@ <translation>ALLGEMEINES</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> @@ -635,6 +674,14 @@ <translation>ANMELDEN</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +825,7 @@ Medien-Größe: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Lesebestätigungen</translation> </message> @@ -787,9 +834,17 @@ Medien-Größe: %2 <source>Close</source> <translation>Schließen</translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -891,12 +946,7 @@ Medien-Größe: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>Aktivierung der Verschlüsselung fehlgeschlagen: %1</translation> </message> @@ -954,11 +1004,6 @@ Medien-Größe: %2 <source>Devices</source> <translation>Geräte</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1003,4 +1048,32 @@ Medien-Größe: %2 <translation>Flaggen</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 5a6be4cb88ff4bb81e79116327b421b14c060b40..ead1ed690bcb967331d216d1f43001b184380e25 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Αποθήκευση</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation type="unfinished"></translation> </message> @@ -32,7 +32,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -42,7 +42,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation type="unfinished"></translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Αποθήκευση</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Αποθήκευση Εικόνας</translation> </message> @@ -205,8 +205,8 @@ <translation>ÎœÎλη</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>ΒγÎÏ‚</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Αποδοχή</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation type="unfinished"></translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation type="unfinished"></translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>ΓÏάψε Îνα μήνυμα...</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation type="unfinished"></translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Î Ïοσκάλεσε χÏήστες</translation> </message> @@ -459,15 +494,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> πληκτÏολογεί</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> πληκτÏολογοÏν</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +515,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Ελαχιστοποίηση</translation> </message> @@ -521,12 +555,17 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Φόντο</translation> </message> @@ -566,7 +605,7 @@ <translation>ΓΕÎΙΚΑ</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> @@ -635,6 +674,14 @@ <translation>ΕΙΣΟΔΟΣ</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -776,7 +823,7 @@ Media size: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation type="unfinished"></translation> </message> @@ -785,9 +832,17 @@ Media size: %2 <source>Close</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -889,12 +944,7 @@ Media size: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation type="unfinished"></translation> </message> @@ -910,12 +960,12 @@ Media size: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> + <source>The selected file is not an image</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> + <source>Error while reading file: %1</source> <translation type="unfinished"></translation> </message> <message> @@ -952,11 +1002,6 @@ Media size: %2 <source>Devices</source> <translation type="unfinished"></translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1001,4 +1046,32 @@ Media size: %2 <translation>Σημαίες</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index 93e006b1760771473df1c3aa2fc44e8672c53f83..298abfc756f963cfdd7ea58db814c18b7fecd632 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Save File</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>Failed to upload image. Please try again.</translation> </message> @@ -32,7 +32,7 @@ <translation>Failed to upload video. Please try again.</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Failed to restore OLM account. Please login again.</translation> </message> @@ -42,7 +42,7 @@ <translation>Failed to restore save data. Please login again.</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Save File</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Save image</translation> </message> @@ -205,8 +205,8 @@ <translation>Room members</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation>no version stored</translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Leave room</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Accept</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>Encrypted</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>Send a file</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Write a message…</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>Encryption is enabled</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>Room options</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Invite users</translation> </message> @@ -459,15 +494,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> is typing</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> are typing</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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> + <numerusform>%1%2 is typing</numerusform> + <numerusform>%1 and %2 are typing</numerusform> + </translation> </message> </context> <context> @@ -481,7 +515,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Minimize to tray</translation> </message> @@ -521,12 +555,17 @@ <translation>Font size</translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation>Font Family</translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Theme</translation> </message> @@ -566,7 +605,7 @@ <translation>GENERAL</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation>Open Sessions File</translation> </message> @@ -635,6 +674,14 @@ <translation>LOGIN</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +825,7 @@ Media size: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Read receipts</translation> </message> @@ -787,9 +834,17 @@ Media size: %2 <source>Close</source> <translation>Close</translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -891,12 +946,7 @@ Media size: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>Failed to enable encryption: %1</translation> </message> @@ -954,11 +1004,6 @@ Media size: %2 <source>Devices</source> <translation>Devices</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1003,4 +1048,32 @@ Media size: %2 <translation>Flags</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index cb7185e205375b65bce7c0c74fba38b50e2311df..718f1084e1d7aab7b4ddf3f986bbd605da6fc562 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Tallenna tiedosto</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>Kuvan lähettäminen epäonnistui. Ole hyvä ja yritä uudelleen.</translation> </message> @@ -32,7 +32,7 @@ <translation>Videon lähettäminen epäonnistui. Ole hyvä ja yritä uudelleen.</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>OLM-tilin palauttaminen epäonnistui. Ole hyvä ja kirjaudu sisään uudelleen.</translation> </message> @@ -42,7 +42,7 @@ <translation>Tallennettujen tietojen palauttaminen epäonnistui. Ole hyvä ja kirjaudu sisään uudelleen.</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation>Salausavainten lähetys epäonnistui. Palvelimen vastaus: %1 %2. Ole hyvä ja yritä uudelleen myöhemmin.</translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Tallenna tiedosto</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Tallenna kuva</translation> </message> @@ -205,8 +205,8 @@ <translation>Huoneen jäsenet</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation>ei tallennettua versiota</translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Poistu huoneesta</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Hyväksy</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>Salattu</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>Lähetä tiedosto</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Kirjoita viesti…</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>Salaus on käytössä</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>Huonevaihtoehdot</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Kutsu käyttäjiä</translation> </message> @@ -459,15 +494,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> kirjoittaa</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> kirjoittavat</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +515,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Pienennä ilmoitusalueelle</translation> </message> @@ -521,12 +555,17 @@ <translation>Fonttikoko</translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation>Fontti</translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Teema</translation> </message> @@ -566,7 +605,7 @@ <translation>YLEISET ASETUKSET</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation>Avaa Istuntoavaintiedosto</translation> </message> @@ -635,6 +674,14 @@ <translation>KIRJAUDU</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +825,7 @@ Median koko: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Lukukuittaukset</translation> </message> @@ -787,9 +834,17 @@ Median koko: %2 <source>Close</source> <translation>Sulje</translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -891,12 +946,7 @@ Median koko: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>Salauksen aktivointi epäonnistui: %1</translation> </message> @@ -954,11 +1004,6 @@ Median koko: %2 <source>Devices</source> <translation>Laitteet</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1003,4 +1048,32 @@ Median koko: %2 <translation>Liput</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index beab87521dd26c10129275c24a7fff75f2fa5e64..9c7f25c6a8f61b636ac731c319301fcc234bca9d 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Enregistrer le fichier</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation type="unfinished"></translation> </message> @@ -32,7 +32,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -42,7 +42,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation type="unfinished"></translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Enregistrer le fichier</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Enregistrer l'image</translation> </message> @@ -205,8 +205,8 @@ <translation>Membres du salon</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -278,7 +278,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -286,12 +286,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Quitter le salon</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Accepter</translation> </message> @@ -332,7 +332,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation type="unfinished"></translation> </message> @@ -355,13 +355,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation type="unfinished"></translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Écrivez un message...</translation> </message> @@ -416,6 +416,36 @@ <source>Encryption is enabled</source> <translation type="unfinished"></translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -425,7 +455,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Inviter des utilisateurs</translation> </message> @@ -460,15 +495,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> est en train d'écrire</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> sont en train d'écrire</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -482,7 +516,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Réduire à la barre des tâches</translation> </message> @@ -522,12 +556,17 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Thème</translation> </message> @@ -567,7 +606,7 @@ <translation>GÉNÉRAL</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> @@ -636,6 +675,14 @@ <translation>CONNEXION</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -779,7 +826,7 @@ Taille du média : %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Accusés de lecture</translation> </message> @@ -788,9 +835,17 @@ Taille du média : %2 <source>Close</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -892,12 +947,7 @@ Taille du média : %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation type="unfinished"></translation> </message> @@ -913,12 +963,12 @@ Taille du média : %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> + <source>The selected file is not an image</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> + <source>Error while reading file: %1</source> <translation type="unfinished"></translation> </message> <message> @@ -955,11 +1005,6 @@ Taille du média : %2 <source>Devices</source> <translation type="unfinished"></translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1004,4 +1049,32 @@ Taille du média : %2 <translation>Drapeaux</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 4c81ec7619fda0ea202b553f6f2dc3edd0628954..dbf81401a4c5e7c426344004a20386e231e843fe 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Bestand opslaan</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation type="unfinished"></translation> </message> @@ -32,7 +32,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -42,7 +42,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation type="unfinished"></translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Bestand opslaan</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Afbeelding opslaan</translation> </message> @@ -205,8 +205,8 @@ <translation>Kamerleden</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Kamer verlaten</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Accepteren</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation type="unfinished"></translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation type="unfinished"></translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Typ een bericht...</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation type="unfinished"></translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>Gebruikers uitnodigen</translation> </message> @@ -459,15 +494,14 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> is aan het typen</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> zijn aan het typen</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +515,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Minimaliseren naar systeemvak</translation> </message> @@ -521,12 +555,17 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Thema</translation> </message> @@ -566,7 +605,7 @@ <translation>ALGEMEEN</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> @@ -635,6 +674,14 @@ <translation>INLOGGEN</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +825,7 @@ Mediagrootte: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Leesbevestigingen</translation> </message> @@ -787,9 +834,17 @@ Mediagrootte: %2 <source>Close</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> <message> - <location line="+11"/> - <source>ESC</source> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -891,12 +946,7 @@ Mediagrootte: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation type="unfinished"></translation> </message> @@ -912,12 +962,12 @@ Mediagrootte: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> + <source>The selected file is not an image</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> + <source>Error while reading file: %1</source> <translation type="unfinished"></translation> </message> <message> @@ -954,11 +1004,6 @@ Mediagrootte: %2 <source>Devices</source> <translation type="unfinished"></translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1003,4 +1048,32 @@ Mediagrootte: %2 <translation>Vlaggen</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index edea85b925a7d7ba9d7eb5380a7b1f3ddf483e60..f4cbfd56e8bde233643510968d9c1e25d25d469c 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Zapisz plik</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>Nie udaÅ‚o siÄ™ wysÅ‚ać obrazu. Spróbuj ponownie.</translation> </message> @@ -32,7 +32,7 @@ <translation>Nie udaÅ‚o siÄ™ wysÅ‚ać filmu. Spróbuj ponownie.</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Nie udaÅ‚o siÄ™ przywrócić konta OLM. Spróbuj zalogować siÄ™ ponownie.</translation> </message> @@ -42,7 +42,7 @@ <translation>Nie udaÅ‚o siÄ™ przywrócić zapisanych danych. Spróbuj zalogować siÄ™ ponownie.</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation type="unfinished"></translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Zapisz plik</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Zapisz obraz</translation> </message> @@ -205,8 +205,8 @@ <translation>CzÅ‚onkowie pokoju</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Opuść pokój</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>Akceptuj</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>Szyfrowana</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>WyÅ›lij plik</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>Napisz wiadomość…</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>Szyfrowanie jest wÅ‚Ä…czone</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>Ustawienia pokoju</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>ZaproÅ› użytkowników</translation> </message> @@ -459,15 +494,15 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> pisze</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> piszÄ…</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +516,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Zminimalizuj do paska zadaÅ„</translation> </message> @@ -521,12 +556,17 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Motyw</translation> </message> @@ -566,7 +606,7 @@ <translation>OGÓLNE</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> @@ -635,6 +675,14 @@ <translation>ZALOGUJ SIĘ</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +826,7 @@ Rozmiar multimediów: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Potwierdzenia przeczytania</translation> </message> @@ -787,9 +835,17 @@ Rozmiar multimediów: %2 <source>Close</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> + <message> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> <message> - <location line="+11"/> - <source>ESC</source> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -894,12 +950,7 @@ Rozmiar multimediów: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>Nie udaÅ‚o siÄ™ wÅ‚Ä…czyć szyfrowania: %1</translation> </message> @@ -915,13 +966,13 @@ Rozmiar multimediów: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>Wybrany plik multimedialny nie jest obrazem</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>BÅ‚Ä…d odczytywania pliku: %1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -957,11 +1008,6 @@ Rozmiar multimediów: %2 <source>Devices</source> <translation>UrzÄ…dzenia</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1006,4 +1052,32 @@ Rozmiar multimediów: %2 <translation>Flagi</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 4c1578848a0f87cc99237421567ec5985cde7105..f31b23cf0680ba20002ccdf0c20e4f1d22efdc75 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>Сохранить файл</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>Ðе удалоÑÑŒ загрузить изображение. ПожалуйÑта, попробуйте еще раз.</translation> </message> @@ -32,7 +32,7 @@ <translation>Ðе удалоÑÑŒ загрузить видео. ПожалуйÑта, попробуйте еще раз.</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Ðе удалоÑÑŒ воÑÑтановить учетную запиÑÑŒ OLM. ПожалуйÑта, войдите Ñнова.</translation> </message> @@ -42,7 +42,7 @@ <translation>Ðе удалоÑÑŒ воÑÑтановить Ñохраненные данные. ПожалуйÑта, войдите Ñнова.</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation>Ðе удалоÑÑŒ наÑтроить ключи шифрованиÑ. Ответ Ñервера:%1 %2. ПожалуйÑта, попробуйте позже.</translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>Сохранить файл</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>Сохранить изображение</translation> </message> @@ -205,9 +205,9 @@ <translation>УчаÑтники комнаты</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> - <translation></translation> + <location line="+4"/> + <source>OK</source> + <translation type="unfinished"></translation> </message> </context> <context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>Покинуть комнату</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>ПринÑÑ‚ÑŒ</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>Зашифровано</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>Отправить файл</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>ÐапиÑать Ñообщение...</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>Шифрование включено</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>ÐаÑтройки комнаты</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>ПриглаÑить пользователей</translation> </message> @@ -459,15 +494,15 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> печатает</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> печатают</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +516,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>Сворачивать в ÑиÑтемную панель</translation> </message> @@ -521,12 +556,17 @@ <translation>Размер шрифта</translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>Тема</translation> </message> @@ -566,7 +606,7 @@ <translation>ГЛÐÐ’ÐОЕ</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation>Открыть файл ÑеанÑов</translation> </message> @@ -636,6 +676,14 @@ <translation>ВХОД</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -779,7 +827,7 @@ Media size: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>Подтверждать прочтение</translation> </message> @@ -788,10 +836,18 @@ Media size: %2 <source>Close</source> <translation>Закрыть</translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> + <message> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> <message> - <location line="+11"/> - <source>ESC</source> - <translation></translation> + <location line="+2"/> + <source>Yesterday %1</source> + <translation type="unfinished"></translation> </message> </context> <context> @@ -893,12 +949,7 @@ Media size: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>Ðе удалоÑÑŒ включить шифрование: %1</translation> </message> @@ -914,13 +965,13 @@ Media size: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>Выбранное Ð¼ÐµÐ´Ð¸Ñ Ð½Ðµ ÑвлÑетÑÑ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸ÐµÐ¼</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>Ошибка при чтении медиÑ: %1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -956,11 +1007,6 @@ Media size: %2 <source>Devices</source> <translation>УÑтройÑтва</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1005,4 +1051,32 @@ Media size: %2 <translation type="unfinished"></translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index ca7c6e2209107a70d267c3f3ea47f4faaa8b1ec4..8da7c475f9c80e0b78949fe60fbf6e8b0ae5ee20 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -4,7 +4,7 @@ <context> <name>AudioItem</name> <message> - <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+117"/> + <location filename="../../src/timeline/widgets/AudioItem.cpp" line="+118"/> <source>Save File</source> <translation>ä¿å˜æ–‡ä»¶</translation> </message> @@ -12,7 +12,7 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+309"/> + <location filename="../../src/ChatPage.cpp" line="+331"/> <source>Failed to upload image. Please try again.</source> <translation>ä¸Šä¼ å›¾åƒå¤±è´¥ã€‚请é‡è¯•ã€‚</translation> </message> @@ -32,7 +32,7 @@ <translation>ä¸Šä¼ è§†é¢‘å¤±è´¥ã€‚è¯·é‡è¯•ã€‚</translation> </message> <message> - <location line="+376"/> + <location line="+380"/> <source>Failed to restore OLM account. Please login again.</source> <translation>æ¢å¤ OLM 账户失败。请é‡æ–°ç™»å½•ã€‚</translation> </message> @@ -42,7 +42,7 @@ <translation>æ¢å¤ä¿å˜çš„æ•°æ®å¤±è´¥ã€‚请é‡æ–°ç™»å½•ã€‚</translation> </message> <message> - <location line="+169"/> + <location line="+198"/> <source>Failed to setup encryption keys. Server response: %1 %2. Please try again later.</source> <translation type="unfinished"></translation> </message> @@ -118,7 +118,7 @@ <context> <name>FileItem</name> <message> - <location filename="../../src/timeline/widgets/FileItem.cpp" line="+106"/> + <location filename="../../src/timeline/widgets/FileItem.cpp" line="+107"/> <source>Save File</source> <translation>ä¿å˜æ–‡ä»¶</translation> </message> @@ -126,7 +126,7 @@ <context> <name>ImageItem</name> <message> - <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+238"/> + <location filename="../../src/timeline/widgets/ImageItem.cpp" line="+241"/> <source>Save image</source> <translation>ä¿å˜å›¾åƒ</translation> </message> @@ -205,8 +205,8 @@ <translation>èŠå¤©å®¤æˆå‘˜</translation> </message> <message> - <location line="+33"/> - <source>ESC</source> + <location line="+4"/> + <source>OK</source> <translation type="unfinished"></translation> </message> </context> @@ -277,7 +277,7 @@ <context> <name>RoomInfo</name> <message> - <location filename="../../src/Cache.cpp" line="+2204"/> + <location filename="../../src/Cache.cpp" line="+2205"/> <source>no version stored</source> <translation type="unfinished"></translation> </message> @@ -285,12 +285,12 @@ <context> <name>RoomInfoListItem</name> <message> - <location filename="../../src/RoomInfoListItem.cpp" line="+92"/> + <location filename="../../src/RoomInfoListItem.cpp" line="+93"/> <source>Leave room</source> <translation>离开èŠå¤©å®¤</translation> </message> <message> - <location line="+174"/> + <location line="+181"/> <source>Accept</source> <translation>接å—</translation> </message> @@ -331,7 +331,7 @@ <context> <name>StatusIndicator</name> <message> - <location filename="../../src/timeline/TimelineItem.cpp" line="+106"/> + <location filename="../../src/timeline/TimelineItem.cpp" line="+107"/> <source>Encrypted</source> <translation>åŠ å¯†çš„</translation> </message> @@ -354,13 +354,13 @@ <context> <name>TextInputWidget</name> <message> - <location filename="../../src/TextInputWidget.cpp" line="+506"/> + <location filename="../../src/TextInputWidget.cpp" line="+507"/> <source>Send a file</source> <translation>å‘é€ä¸€ä¸ªæ–‡ä»¶</translation> </message> <message> <location line="+13"/> - <location filename="../../src/TextInputWidget.h" line="+168"/> + <location filename="../../src/TextInputWidget.h" line="+164"/> <source>Write a message...</source> <translation>写一æ¡æ¶ˆæ¯...</translation> </message> @@ -415,6 +415,36 @@ <source>Encryption is enabled</source> <translation>åŠ å¯†å·²å¯ç”¨</translation> </message> + <message> + <location line="+65"/> + <source>-- Encrypted Event (No keys found for decryption) --</source> + <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>-- Decryption Error (failed to communicate with DB) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>-- Decryption Error (failed to retrieve megolm keys from db) --</source> + <comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>-- Decryption Error (%1) --</source> + <comment>Placeholder, when the message can'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="+27"/> + <source>-- Encrypted Event (Unknown event type) --</source> + <comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet</comment> + <translation type="unfinished"></translation> + </message> </context> <context> <name>TopRoomBar</name> @@ -424,7 +454,12 @@ <translation>èŠå¤©å®¤é€‰é¡¹</translation> </message> <message> - <location line="+28"/> + <location line="+5"/> + <source>Mentions</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> <source>Invite users</source> <translation>邀请用户</translation> </message> @@ -459,15 +494,13 @@ </context> <context> <name>TypingDisplay</name> - <message> - <location filename="../../src/TypingDisplay.cpp" line="+45"/> - <source> is typing</source> - <translation> æ£åœ¨æ‰“å—</translation> - </message> - <message> - <location line="+2"/> - <source> are typing</source> - <translation> æ£åœ¨æ‰“å—</translation> + <message numerus="yes"> + <location filename="../../src/TypingDisplay.cpp" line="+37"/> + <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"> + <numerusform></numerusform> + </translation> </message> </context> <context> @@ -481,7 +514,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+156"/> + <location filename="../../src/UserSettingsPage.cpp" line="+166"/> <source>Minimize to tray</source> <translation>最å°åŒ–至托盘</translation> </message> @@ -521,12 +554,17 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+11"/> + <location line="+13"/> <source>Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+17"/> + <location line="+1"/> + <source>Emoji Font Famly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+33"/> <source>Theme</source> <translation>主题</translation> </message> @@ -566,7 +604,7 @@ <translation>通用</translation> </message> <message> - <location line="+150"/> + <location line="+156"/> <source>Open Sessions File</source> <translation>打开会è¯æ–‡ä»¶</translation> </message> @@ -635,6 +673,14 @@ <translation>登录</translation> </message> </context> +<context> + <name>descriptiveTime</name> + <message> + <location filename="../../src/Utils.cpp" line="+104"/> + <source>Yesterday</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>dialogs::CreateRoom</name> <message> @@ -778,7 +824,7 @@ Media size: %2 <context> <name>dialogs::ReadReceipts</name> <message> - <location filename="../../src/dialogs/ReadReceipts.cpp" line="+119"/> + <location filename="../../src/dialogs/ReadReceipts.cpp" line="+121"/> <source>Read receipts</source> <translation>阅读回执</translation> </message> @@ -787,9 +833,17 @@ Media size: %2 <source>Close</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>dialogs::ReceiptItem</name> + <message> + <location line="-44"/> + <source>Today %1</source> + <translation type="unfinished"></translation> + </message> <message> - <location line="+11"/> - <source>ESC</source> + <location line="+2"/> + <source>Yesterday %1</source> <translation type="unfinished"></translation> </message> </context> @@ -892,12 +946,7 @@ Media size: %2 </translation> </message> <message> - <location line="+71"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+69"/> + <location line="+140"/> <source>Failed to enable encryption: %1</source> <translation>å¯ç”¨åŠ 密失败:%1</translation> </message> @@ -913,13 +962,13 @@ Media size: %2 </message> <message> <location line="+12"/> - <source>The selected media is not an image</source> - <translation>选择的媒体ä¸æ˜¯ä¸€ä¸ªå›¾åƒ</translation> + <source>The selected file is not an image</source> + <translation type="unfinished"></translation> </message> <message> <location line="+5"/> - <source>Error while reading media: %1</source> - <translation>读å–媒体时失败:%1</translation> + <source>Error while reading file: %1</source> + <translation type="unfinished"></translation> </message> <message> <location line="+35"/> @@ -955,11 +1004,6 @@ Media size: %2 <source>Devices</source> <translation>设备</translation> </message> - <message> - <location line="+39"/> - <source>ESC</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>emoji::Panel</name> @@ -1012,4 +1056,32 @@ Media size: %2 <translation>Flags</translation> </message> </context> +<context> + <name>utils</name> + <message> + <location filename="../../src/Utils.cpp" line="+46"/> + <source>You</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+219"/> + <source>sent a file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an image.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent an audio file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>sent a video</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/src/TypingDisplay.cpp b/src/TypingDisplay.cpp index 6059601d0aa315010d68f3ce582c12bb1be707f2..43fabcd891e05fcfcb52df5b4d768b076f8b026e 100644 --- a/src/TypingDisplay.cpp +++ b/src/TypingDisplay.cpp @@ -33,6 +33,14 @@ TypingDisplay::setUsers(const QStringList &uid) text_.clear(); + QString temp = text_ += + tr("%1 and %2 are typing", + "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.)", + uid.size()); + if (uid.isEmpty()) { hide(); update(); @@ -40,12 +48,9 @@ TypingDisplay::setUsers(const QStringList &uid) return; } - text_ = uid.join(", "); - - if (uid.size() == 1) - text_ += tr(" is typing"); - else if (uid.size() > 1) - text_ += tr(" are typing"); + QStringList uidWithoutLast = uid; + uidWithoutLast.pop_back(); + text_ = temp.arg(uidWithoutLast.join(", ")).arg(uid.back()); show(); update(); diff --git a/src/Utils.cpp b/src/Utils.cpp index d6b092b17b03afb3984fd2ae906f4dbd59459741..a3c15c961188759e55ba73870d60eccdcbb467ac 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -99,13 +99,13 @@ utils::descriptiveTime(const QDateTime &then) const auto days = then.daysTo(now); if (days == 0) - return then.toString("HH:mm"); + return then.time().toString(Qt::DefaultLocaleShortDate); else if (days < 2) - return QString("Yesterday"); - else if (days < 365) - return then.toString("dd/MM"); + return QString(QCoreApplication::translate("descriptiveTime", "Yesterday")); + else if (days < 7) + return then.toString("dddd"); - return then.toString("dd/MM/yy"); + return then.date().toString(Qt::DefaultLocaleShortDate); } DescInfo @@ -147,7 +147,7 @@ utils::getMessageDescription(const TimelineEvent &event, DescInfo info; if (sender == localUser) - info.username = "You"; + info.username = QCoreApplication::translate("utils", "You"); else info.username = username; @@ -366,16 +366,16 @@ utils::getQuoteBody(const RelatedInfo &related) return markdownToHtml(related.quoted_body); } case MsgType::File: { - return QString("sent a file."); + return QString(QCoreApplication::translate("utils", "sent a file.")); } case MsgType::Image: { - return QString("sent an image."); + return QString(QCoreApplication::translate("utils", "sent an image.")); } case MsgType::Audio: { - return QString("sent an audio file."); + return QString(QCoreApplication::translate("utils", "sent an audio file.")); } case MsgType::Video: { - return QString("sent a video"); + return QString(QCoreApplication::translate("utils", "sent a video")); } default: { return related.quoted_body; diff --git a/src/dialogs/MemberList.cpp b/src/dialogs/MemberList.cpp index f4167143c20eef02eb8c380c888af5e81991f66d..88a95403802ce2abd10b1bbeb12bbe51629b1d57 100644 --- a/src/dialogs/MemberList.cpp +++ b/src/dialogs/MemberList.cpp @@ -97,7 +97,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent) topLabel_->setAlignment(Qt::AlignCenter); topLabel_->setFont(font); - auto okBtn = new QPushButton("OK", this); + auto okBtn = new QPushButton(tr("OK"), this); auto buttonLayout = new QHBoxLayout(); buttonLayout->setSpacing(15); @@ -126,7 +126,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent) qCritical() << e.what(); } - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &MemberList::close); connect(okBtn, &QPushButton::clicked, this, &MemberList::close); } diff --git a/src/dialogs/ReadReceipts.cpp b/src/dialogs/ReadReceipts.cpp index dc4145db5161b2e2b745ad2a72601b3f6efb778d..5a0d98c7843fc159ed4e75a938ae20c6d6fea34b 100644 --- a/src/dialogs/ReadReceipts.cpp +++ b/src/dialogs/ReadReceipts.cpp @@ -78,13 +78,15 @@ ReceiptItem::dateFormat(const QDateTime &then) const auto days = then.daysTo(now); if (days == 0) - return QString("Today %1").arg(then.toString("HH:mm")); + return tr("Today %1").arg(then.time().toString(Qt::DefaultLocaleShortDate)); else if (days < 2) - return QString("Yesterday %1").arg(then.toString("HH:mm")); - else if (days < 365) - return then.toString("dd/MM HH:mm"); + return tr("Yesterday %1").arg(then.time().toString(Qt::DefaultLocaleShortDate)); + else if (days < 7) + return QString("%1 %2") + .arg(then.toString("dddd")) + .arg(then.time().toString(Qt::DefaultLocaleShortDate)); - return then.toString("dd/MM/yy"); + return then.toString(Qt::DefaultLocaleShortDate); } ReadReceipts::ReadReceipts(QWidget *parent) @@ -131,7 +133,7 @@ ReadReceipts::ReadReceipts(QWidget *parent) layout->addWidget(userList_); layout->addLayout(buttonLayout); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &ReadReceipts::close); connect(okBtn, &QPushButton::clicked, this, &ReadReceipts::close); } diff --git a/src/dialogs/RoomSettings.cpp b/src/dialogs/RoomSettings.cpp index b2344f239b573bb8d024b8bacc7c62e0796b0351..1fe5904bf4be7b9ae3a3c21b301033f972fdab7a 100644 --- a/src/dialogs/RoomSettings.cpp +++ b/src/dialogs/RoomSettings.cpp @@ -438,7 +438,7 @@ RoomSettings::RoomSettings(const QString &room_id, QWidget *parent) resetErrorLabel(); }); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &RoomSettings::close); connect(okBtn, &QPushButton::clicked, this, &RoomSettings::close); } @@ -668,12 +668,12 @@ RoomSettings::updateAvatar() QFile file{fileName, this}; if (format != "image") { - displayErrorMessage(tr("The selected media is not an image")); + displayErrorMessage(tr("The selected file is not an image")); return; } if (!file.open(QIODevice::ReadOnly)) { - displayErrorMessage(tr("Error while reading media: %1").arg(file.errorString())); + displayErrorMessage(tr("Error while reading file: %1").arg(file.errorString())); return; } diff --git a/src/dialogs/UserProfile.cpp b/src/dialogs/UserProfile.cpp index b8040f9f3445ab32d54288e389b9caf8d411467e..6aea96a8cbd0a0b850baf313e2bd9df196a039cc 100644 --- a/src/dialogs/UserProfile.cpp +++ b/src/dialogs/UserProfile.cpp @@ -183,7 +183,7 @@ UserProfile::UserProfile(QWidget *parent) qRegisterMetaType<std::vector<DeviceInfo>>(); - auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this); + auto closeShortcut = new QShortcut(QKeySequence(QKeySequence::Cancel), this); connect(closeShortcut, &QShortcut::activated, this, &UserProfile::close); connect(okBtn, &QPushButton::clicked, this, &UserProfile::close); } diff --git a/src/timeline/TimelineItem.cpp b/src/timeline/TimelineItem.cpp index e52dce7b2135564061190cf56d12edc5b162a025..dd3b48c3b2642031109320a4e9a1db7d632eaa77 100644 --- a/src/timeline/TimelineItem.cpp +++ b/src/timeline/TimelineItem.cpp @@ -282,6 +282,7 @@ TimelineItem::TimelineItem(mtx::events::MessageType ty, const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(ty) , room_id_{room_id} { init(); @@ -341,6 +342,7 @@ TimelineItem::TimelineItem(ImageItem *image, const QString &room_id, QWidget *parent) : QWidget{parent} + , message_type_(mtx::events::MessageType::Image) , room_id_{room_id} { init(); @@ -356,6 +358,7 @@ TimelineItem::TimelineItem(FileItem *file, const QString &room_id, QWidget *parent) : QWidget{parent} + , message_type_(mtx::events::MessageType::File) , room_id_{room_id} { init(); @@ -369,6 +372,7 @@ TimelineItem::TimelineItem(AudioItem *audio, const QString &room_id, QWidget *parent) : QWidget{parent} + , message_type_(mtx::events::MessageType::Audio) , room_id_{room_id} { init(); @@ -382,6 +386,7 @@ TimelineItem::TimelineItem(VideoItem *video, const QString &room_id, QWidget *parent) : QWidget{parent} + , message_type_(mtx::events::MessageType::Video) , room_id_{room_id} { init(); @@ -395,6 +400,7 @@ TimelineItem::TimelineItem(ImageItem *image, const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Image) , room_id_{room_id} { setupWidgetLayout<mtx::events::RoomEvent<mtx::events::msg::Image>, ImageItem>( @@ -426,6 +432,7 @@ TimelineItem::TimelineItem(FileItem *file, const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::File) , room_id_{room_id} { setupWidgetLayout<mtx::events::RoomEvent<mtx::events::msg::File>, FileItem>( @@ -440,6 +447,7 @@ TimelineItem::TimelineItem(AudioItem *audio, const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Audio) , room_id_{room_id} { setupWidgetLayout<mtx::events::RoomEvent<mtx::events::msg::Audio>, AudioItem>( @@ -454,6 +462,7 @@ TimelineItem::TimelineItem(VideoItem *video, const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Video) , room_id_{room_id} { setupWidgetLayout<mtx::events::RoomEvent<mtx::events::msg::Video>, VideoItem>( @@ -470,6 +479,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Notice const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Notice) , room_id_{room_id} { init(); @@ -517,6 +527,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Emote> const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Emote) , room_id_{room_id} { init(); @@ -565,6 +576,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Text> const QString &room_id, QWidget *parent) : QWidget(parent) + , message_type_(mtx::events::MessageType::Text) , room_id_{room_id} { init(); @@ -951,4 +963,4 @@ TimelineItem::openRawMessageViewer() const "failed to serialize event ({}, {})", room_id, event_id); } }); -} \ No newline at end of file +} diff --git a/src/timeline/TimelineItem.h b/src/timeline/TimelineItem.h index c0dab6b81f2313d34e973dc9d630d2ac93154d31..fe354000e23669a4f2d7a50efcfaab132b49ff15 100644 --- a/src/timeline/TimelineItem.h +++ b/src/timeline/TimelineItem.h @@ -277,7 +277,7 @@ private: QFutureWatcher<QString> *colorGenerating_; QString event_id_; - mtx::events::MessageType message_type_; + mtx::events::MessageType message_type_ = mtx::events::MessageType::Unknown; QString room_id_; DescInfo descriptionMsg_; diff --git a/src/timeline/TimelineView.cpp b/src/timeline/TimelineView.cpp index 18b73eb0cec6fe2b07419b36e585154b2ff6588f..ed783e9013e392bb6d75b1ea252d78d4d1daa3e2 100644 --- a/src/timeline/TimelineView.cpp +++ b/src/timeline/TimelineView.cpp @@ -306,7 +306,10 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events: dummy.origin_server_ts = e.origin_server_ts; dummy.event_id = e.event_id; dummy.sender = e.sender; - dummy.content.body = "-- Encrypted Event (No keys found for decryption) --"; + dummy.content.body = + tr("-- Encrypted Event (No keys found for decryption) --", + "Placeholder, when the message was not decrypted yet or can't be decrypted") + .toStdString(); try { if (!cache::client()->inboundMegolmSessionExists(index)) { @@ -319,7 +322,10 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events: } } catch (const lmdb::error &e) { nhlog::db()->critical("failed to check megolm session's existence: {}", e.what()); - dummy.content.body = "-- Decryption Error (failed to communicate with DB) --"; + dummy.content.body = tr("-- 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.") + .toStdString(); return {dummy, false}; } @@ -335,7 +341,10 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events: index.sender_key, e.what()); dummy.content.body = - "-- Decryption Error (failed to retrieve megolm keys from db) --"; + tr("-- Decryption Error (failed to retrieve megolm keys from db) --", + "Placeholder, when the message can't be decrypted, because the DB access " + "failed.") + .toStdString(); return {dummy, false}; } catch (const mtx::crypto::olm_exception &e) { nhlog::crypto()->critical("failed to decrypt message with index ({}, {}, {}): {}", @@ -343,7 +352,12 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events: index.session_id, index.sender_key, e.what()); - dummy.content.body = "-- Decryption Error (" + std::string(e.what()) + ") --"; + dummy.content.body = + tr("-- Decryption Error (%1) --", + "Placeholder, when the message can't be decrypted. In this case, the Olm " + "decrytion returned an error, which is passed ad %1") + .arg(e.what()) + .toStdString(); return {dummy, false}; } @@ -365,7 +379,11 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events: if (events.size() == 1) return {events.at(0), true}; - dummy.content.body = "-- Encrypted Event (Unknown event type) --"; + dummy.content.body = + tr("-- Encrypted Event (Unknown event type) --", + "Placeholder, when the message was decrypted, but we couldn't parse it, because " + "Nheko/mtxclient don't support that event type yet") + .toStdString(); return {dummy, false}; } diff --git a/src/ui/InfoMessage.cpp b/src/ui/InfoMessage.cpp index fa575d76787e259ff6176f3b84ffc1b69bf2911c..27bc0a5fd0472269357cd313e41c4c224106e871 100644 --- a/src/ui/InfoMessage.cpp +++ b/src/ui/InfoMessage.cpp @@ -2,6 +2,7 @@ #include "Config.h" #include <QDateTime> +#include <QLocale> #include <QPainter> #include <QPen> #include <QtGlobal> @@ -61,14 +62,14 @@ DateSeparator::DateSeparator(QDateTime datetime, QWidget *parent) { auto now = QDateTime::currentDateTime(); - QString fmt; + QString fmt = QLocale::system().dateFormat(QLocale::LongFormat); - if (now.date().year() != datetime.date().year()) - fmt = QString("ddd d MMMM yy"); - else - fmt = QString("ddd d MMMM"); + if (now.date().year() == datetime.date().year()) { + QRegularExpression rx("[^a-zA-Z]*y+[^a-zA-Z]*"); + fmt = fmt.remove(rx); + } - msg_ = datetime.toString(fmt); + msg_ = datetime.date().toString(fmt); QFontMetrics fm{font()}; #if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)