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

View file

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

View file

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

View file

@ -449,14 +449,6 @@
</context>
<context>
<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>
<source>in</source>
<translation>en</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Actualizando contenido...</translation>
</message>
<message>
<source>chat</source>
<translation>charla</translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>lukematon viesti</translation>
</message>
<message>
<source>unread messages</source>
<translation>lukematonta viestiä</translation>
</message>
<message>
<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>
@ -482,13 +474,19 @@
<source>Updating content...</source>
<translation>Päivitetään sisältöä...</translation>
</message>
<message>
<source>chat</source>
<translation>keskustelussa</translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

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

View file

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

View file

@ -459,14 +459,6 @@
</context>
<context>
<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>
<source>in</source>
<translation>w</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source>
<translation>Aktualizacja treści...</translation>
</message>
<message>
<source>chat</source>
<translation>czat</translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

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

View file

@ -459,14 +459,6 @@
</context>
<context>
<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>
<source>in</source>
<translation>v</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source>
<translation>Aktualizácia obsahu...</translation>
</message>
<message>
<source>chat</source>
<translation>čet</translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<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>
<source>in</source>
<translation>i</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Uppdaterar innehåll...</translation>
</message>
<message>
<source>chat</source>
<translation>chatt</translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

@ -439,16 +439,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>
</translation>
</message>
<message>
<source>unread messages</source>
<translation>
</translation>
</message>
<message>
<source>in</source>
<translation></translation>
@ -473,13 +463,17 @@
<source>Updating content...</source>
<translation></translation>
</message>
<message>
<source>chat</source>
<translation></translation>
</message>
<message>
<message numerus="yes">
<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>
</context>
<context>

View file

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