Cover: Smaller font sizes, enable numerus forms, fixes #350

This commit is contained in:
Sebastian Wolf 2021-01-31 20:23:59 +01:00
parent f65a62d61f
commit 3bc97f2739
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A
13 changed files with 151 additions and 183 deletions

View file

@ -32,17 +32,9 @@ CoverBackground {
property int connectionState: TelegramAPI.WaitingForNetwork property int connectionState: TelegramAPI.WaitingForNetwork
function setUnreadInfoText() { function setUnreadInfoText() {
if (unreadMessages === 1) {
unreadMessagesText.text = qsTr("unread message");
} else {
unreadMessagesText.text = qsTr("unread messages");
}
if (unreadChats === 1) { unreadMessagesText.text = qsTr("unread messages", "", coverPage.unreadMessages);
unreadChatsText.text = qsTr("chat"); unreadChatsText.text = qsTr("chats", "", coverPage.unreadChats)
} else {
unreadChatsText.text = qsTr("chats");
}
switch (coverPage.connectionState) { switch (coverPage.connectionState) {
case TelegramAPI.WaitingForNetwork: case TelegramAPI.WaitingForNetwork:
@ -131,7 +123,7 @@ CoverBackground {
} }
Label { Label {
id: unreadMessagesText id: unreadMessagesText
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeExtraSmall
width: parent.width - unreadMessagesCountText.width - Theme.paddingMedium width: parent.width - unreadMessagesCountText.width - Theme.paddingMedium
wrapMode: Text.Wrap wrapMode: Text.Wrap
anchors.verticalCenter: unreadMessagesCountText.verticalCenter anchors.verticalCenter: unreadMessagesCountText.verticalCenter
@ -146,7 +138,7 @@ CoverBackground {
visible: coverPage.authenticated && coverPage.unreadMessages > 1 visible: coverPage.authenticated && coverPage.unreadMessages > 1
Text { Text {
id: inText id: inText
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.primaryColor color: Theme.primaryColor
text: qsTr("in") text: qsTr("in")
anchors.verticalCenter: unreadChatsCountText.verticalCenter anchors.verticalCenter: unreadChatsCountText.verticalCenter
@ -159,7 +151,7 @@ CoverBackground {
} }
Text { Text {
id: unreadChatsText id: unreadChatsText
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.primaryColor color: Theme.primaryColor
width: parent.width - unreadChatsCountText.width - inText.width - ( 2 * Theme.paddingMedium ) width: parent.width - unreadChatsCountText.width - inText.width - ( 2 * Theme.paddingMedium )
wrapMode: Text.Wrap wrapMode: Text.Wrap

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>ungelesene Nachricht</translation>
</message>
<message>
<source>unread messages</source>
<translation>ungelesene Nachrichten</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>in</translation> <translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Aktualisiere Inhalte...</translation> <translation>Aktualisiere Inhalte...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>Chat</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>Chats</translation> <translation>
<numerusform>Chat</numerusform>
<numerusform>Chats</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation>
<numerusform>ungelesene Nachricht</numerusform>
<numerusform>ungelesene Nachrichten</numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>unread message</translation>
</message>
<message>
<source>unread messages</source>
<translation>unread messages</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>in</translation> <translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Updating content...</translation> <translation>Updating content...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>chats</translation> <translation>
<numerusform>chat</numerusform>
<numerusform>chats</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation>
<numerusform>unread message</numerusform>
<numerusform>unread messages</numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>mensaje no leído</translation>
</message>
<message>
<source>unread messages</source>
<translation>mensajes no leído</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>en</translation> <translation>en</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Actualizando contenido...</translation> <translation>Actualizando contenido...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>charla</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>charlas</translation> <translation type="unfinished">
<numerusform>charlas</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>lukematon viesti</translation>
</message>
<message>
<source>unread messages</source>
<translation>lukematonta viestiä</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translatorcomment>The preposition &apos;in&apos; is translated to Finnish using the inessive case (suffix ssa/ssä), so this string should be left empty in the translation. Unfortunately Qt will ignore empty translations, so let&apos;s use the character U+200B (zero width space) instead.</translatorcomment> <translatorcomment>The preposition &apos;in&apos; is translated to Finnish using the inessive case (suffix ssa/ssä), so this string should be left empty in the translation. Unfortunately Qt will ignore empty translations, so let&apos;s use the character U+200B (zero width space) instead.</translatorcomment>
@ -482,13 +474,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Päivitetään sisältöä...</translation> <translation>Päivitetään sisältöä...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>keskustelussa</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>keskustelussa</translation> <translation type="unfinished">
<numerusform>keskustelussa</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -439,14 +439,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>olvasatlan üzenet</translation>
</message>
<message>
<source>unread messages</source>
<translation>olvasatlan üzenetek</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>ban</translation> <translation>ban</translation>
@ -471,13 +463,17 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Tartalom frissítése...</translation> <translation>Tartalom frissítése...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>csevegés</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>csevegések</translation> <translation type="unfinished">
<numerusform>csevegések</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>messaggio non letto</translation>
</message>
<message>
<source>unread messages</source>
<translation>messaggi non letti</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>in</translation> <translation>in</translation>
@ -465,13 +457,12 @@
<source>Connected</source> <source>Connected</source>
<translation>Connesso</translation> <translation>Connesso</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>chat</translation> <translation type="unfinished">
<numerusform>chat</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Waiting for network...</source> <source>Waiting for network...</source>
@ -489,6 +480,13 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Aggiorna contenuti...</translation> <translation>Aggiorna contenuti...</translation>
</message> </message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context> </context>
<context> <context>
<name>EditGroupChatPermissionsColumn</name> <name>EditGroupChatPermissionsColumn</name>

View file

@ -459,14 +459,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>nieprzeczytana wiadomość</translation>
</message>
<message>
<source>unread messages</source>
<translation>nieprzeczytane wiadomości</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>w</translation> <translation>w</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Aktualizacja treści...</translation> <translation>Aktualizacja treści...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>czat</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>czaty</translation> <translation type="unfinished">
<numerusform>czaty</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -459,14 +459,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>сообщение</translation>
</message>
<message>
<source>unread messages</source>
<translation>сообщений</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>в</translation> <translation>в</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Обновление контента...</translation> <translation>Обновление контента...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>чате</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>чатах</translation> <translation type="unfinished">
<numerusform>чатах</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -459,14 +459,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>neprečítaná správa</translation>
</message>
<message>
<source>unread messages</source>
<translation>neprečítané správy</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>v</translation> <translation>v</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Aktualizácia obsahu...</translation> <translation>Aktualizácia obsahu...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>čet</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>čety</translation> <translation type="unfinished">
<numerusform>čety</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>oläst meddelande</translation>
</message>
<message>
<source>unread messages</source>
<translation>olästa meddelanden</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>i</translation> <translation>i</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Uppdaterar innehåll...</translation> <translation>Uppdaterar innehåll...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>chatt</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>chattar</translation> <translation type="unfinished">
<numerusform>chattar</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -439,16 +439,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>
</translation>
</message>
<message>
<source>unread messages</source>
<translation>
</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation></translation> <translation></translation>
@ -473,13 +463,17 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation></translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation></translation> <translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -449,14 +449,6 @@
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message>
<source>unread message</source>
<translation>unread message</translation>
</message>
<message>
<source>unread messages</source>
<translation>unread messages</translation>
</message>
<message> <message>
<source>in</source> <source>in</source>
<translation>in</translation> <translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source> <source>Updating content...</source>
<translation>Updating content...</translation> <translation>Updating content...</translation>
</message> </message>
<message> <message numerus="yes">
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<source>chats</source> <source>chats</source>
<translation>chats</translation> <translation type="unfinished">
<numerusform>chats</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>