2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Changed "Members" to "Subscribers" for channel

This commit is contained in:
RadRussianRus
2019-10-08 00:17:32 +03:00
parent 29b8495d6d
commit 3d614801b8
6 changed files with 31 additions and 7 deletions

View File

@@ -2248,4 +2248,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ktg_settings_show_json_settings" = "Show custom settings";
"ktg_settings_restart" = "Restart Kotatogram";
"ktg_chat_status_subscribers#one" = "{count} subscriber";
"ktg_chat_status_subscribers#other" = "{count} subscribers";
"ktg_profile_subscribers_section" = "Subscribers";
// Keys finished

View File

@@ -19,5 +19,12 @@
"ktg_pinned_message_show": "Показать закреплённое сообщение",
"ktg_pinned_message_hide": "Скрыть закреплённое сообщение",
"ktg_settings_show_json_settings": "Показать файл настроек",
"ktg_settings_restart": "Перезапустить Kotatogram"
"ktg_settings_restart": "Перезапустить Kotatogram",
"ktg_chat_status_subscribers": {
"one": "{count} подписчик",
"few": "{count} подписчика",
"many": "{count} подписчиков",
"other": "{count} подписчиков"
},
"ktg_profile_subscribers_section": "Подписчики"
}

View File

@@ -872,7 +872,9 @@ void TopBarWidget::updateOnlineDisplay() {
text = tr::lng_group_status(tr::now);
}
} else if (channel->membersCount() > 0) {
text = tr::lng_chat_status_members(tr::now, lt_count_decimal, channel->membersCount());
text = channel->isMegagroup()
? tr::lng_chat_status_members(tr::now, lt_count_decimal, channel->membersCount())
: tr::ktg_chat_status_subscribers(tr::now, lt_count_decimal, channel->membersCount());
} else {
text = channel->isMegagroup() ? tr::lng_group_status(tr::now) : tr::lng_channel_status(tr::now);

View File

@@ -605,6 +605,11 @@ rpl::producer<QString> TitleValue(
return tr::lng_profile_common_groups_section();
case Section::Type::Members:
if (const auto channel = peer->asChannel()) {
return channel->isMegagroup()
? tr::lng_profile_participants_section()
: tr::ktg_profile_subscribers_section();
}
return tr::lng_profile_participants_section();
//case Section::Type::Channels: // #feed

View File

@@ -882,7 +882,7 @@ object_ptr<Ui::RpWidget> SetupChannelMembers(
channel,
MTPDchannelFull::Flag::f_can_view_participants),
(_1 > 0) && _2);
auto membersText = tr::lng_chat_status_members(
auto membersText = tr::ktg_chat_status_subscribers(
lt_count_decimal,
MembersCountValue(channel) | tr::to_count());
auto membersCallback = [=] {

View File

@@ -145,10 +145,15 @@ auto ChatStatusText(int fullCount, int onlineCount, bool isGroup) {
lt_online_count,
OnlineStatusText(onlineCount));
} else if (fullCount > 0) {
return tr::lng_chat_status_members(
tr::now,
lt_count_decimal,
fullCount);
return isGroup
? tr::lng_chat_status_members(
tr::now,
lt_count_decimal,
fullCount)
: tr::ktg_chat_status_subscribers(
tr::now,
lt_count_decimal,
fullCount);
}
return isGroup
? tr::lng_group_status(tr::now)