Add singular/plural forms to search chats page

This commit is contained in:
Sebastian Wolf 2021-01-01 14:39:22 +01:00
parent 53e0400e0c
commit 2c078307dc
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A
12 changed files with 114 additions and 50 deletions

View file

@ -175,13 +175,13 @@ Page {
onBasicGroupFullInfoUpdated: { onBasicGroupFullInfoUpdated: {
if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) { if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) {
foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.members.length).arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/"); foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
} }
} }
onBasicGroupFullInfoReceived: { onBasicGroupFullInfoReceived: {
if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) { if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) {
foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.members.length).arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/"); foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
} }
} }
@ -189,9 +189,9 @@ Page {
onSupergroupFullInfoUpdated: { onSupergroupFullInfoUpdated: {
if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) { if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) {
if (foundChatListDelegate.relatedInformation.is_channel) { if (foundChatListDelegate.relatedInformation.is_channel) {
foundChatListItem.secondaryText.text = qsTr("%1 subscribers").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 subscribers", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} else { } else {
foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} }
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/"); foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
} }
@ -199,9 +199,9 @@ Page {
onSupergroupFullInfoReceived: { onSupergroupFullInfoReceived: {
if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) { if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) {
if (foundChatListDelegate.relatedInformation.is_channel) { if (foundChatListDelegate.relatedInformation.is_channel) {
foundChatListItem.secondaryText.text = qsTr("%1 subscribers").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 subscribers", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} else { } else {
foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0)); foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} }
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/"); foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
} }

View file

@ -1296,13 +1296,19 @@
<source>Channel</source> <source>Channel</source>
<translation>Kanal</translation> <translation>Kanal</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 Mitglied</translation> <translation>
<numerusform>%1 Mitglied</numerusform>
<numerusform>%1 Mitglieder</numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 Abonnent</translation> <translation>
<numerusform>%1 Abonnent</numerusform>
<numerusform>%1 Abonnenten</numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1296,13 +1296,19 @@
<source>Channel</source> <source>Channel</source>
<translation>Channel</translation> <translation>Channel</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 member</translation> <translation>
<numerusform>%1 member</numerusform>
<numerusform>%1 members</numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 subscriber</translation> <translation>
<numerusform>%1 subscriber</numerusform>
<numerusform>%1 subscribers</numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1277,13 +1277,17 @@
<source>Channel</source> <source>Channel</source>
<translation>Canal</translation> <translation>Canal</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation>%1 miembros</translation> <translation type="unfinished">
<numerusform>%1 miembros</numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation>%1 suscriptores</translation> <translation type="unfinished">
<numerusform>%1 suscriptores</numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1297,13 +1297,19 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 jäsen</translation> <translation type="unfinished">
<numerusform>%1 jäsen</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 tilaaja</translation> <translation type="unfinished">
<numerusform>%1 tilaaja</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1277,13 +1277,17 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 tag</translation> <translation type="unfinished">
<numerusform>%1 tag</numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 feliratkozott</translation> <translation type="unfinished">
<numerusform>%1 feliratkozott</numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1296,13 +1296,19 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 membro</translation> <translation type="unfinished">
<numerusform>%1 membro</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 abbonato</translation> <translation type="unfinished">
<numerusform>%1 abbonato</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1315,13 +1315,21 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 członek</translation> <translation type="unfinished">
<numerusform>%1 członek</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 subskrybent</translation> <translation type="unfinished">
<numerusform>%1 subskrybent</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1315,13 +1315,21 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 участников</translation> <translation type="unfinished">
<numerusform>%1 участников</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 подписчиков</translation> <translation type="unfinished">
<numerusform>%1 подписчиков</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1296,13 +1296,19 @@
<source>Channel</source> <source>Channel</source>
<translation>Kanal</translation> <translation>Kanal</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation>%1 medlemmar</translation> <translation type="unfinished">
<numerusform>%1 medlemmar</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation>%1 prenumeranter</translation> <translation type="unfinished">
<numerusform>%1 prenumeranter</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1277,13 +1277,17 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 </translation> <translation type="unfinished">
<numerusform>%1 </numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 </translation> <translation type="unfinished">
<numerusform>%1 </numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>

View file

@ -1296,13 +1296,19 @@
<source>Channel</source> <source>Channel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 members</source> <source>%1 members</source>
<translation type="unfinished">%1 member</translation> <translation type="unfinished">
<numerusform>%1 member</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 subscribers</source> <source>%1 subscribers</source>
<translation type="unfinished">%1 subscriber</translation> <translation type="unfinished">
<numerusform>%1 subscriber</numerusform>
<numerusform></numerusform>
</translation>
</message> </message>
<message> <message>
<source>Search Chats</source> <source>Search Chats</source>