mirror of
https://github.com/ars3niy/tdlib-purple
synced 2025-08-22 01:49:29 +00:00
Add translator notes, fix wrong message
This commit is contained in:
parent
7be26c1822
commit
92e9ac8753
@ -16,6 +16,7 @@ void updateKnownSecretChat(SecretChatId secretChatId, TdTransceiver &transceiver
|
||||
int state = (secretChat && secretChat->state_) ? secretChat->state_->get_id() :
|
||||
td::td_api::secretChatStateClosed::ID;
|
||||
std::string purpleBuddyName = getSecretChatBuddyName(secretChatId);
|
||||
// TRANSLATOR: Default buddy-alias for a new secret chat. Argument is the Telegram nick, I think.
|
||||
std::string alias = formatMessage(_("Secret chat: {}"), chat->title_);
|
||||
|
||||
PurpleBuddy *buddy = purple_find_buddy(account.purpleAccount, purpleBuddyName.c_str());
|
||||
@ -45,10 +46,11 @@ void updateKnownSecretChat(SecretChatId secretChatId, TdTransceiver &transceiver
|
||||
|
||||
// This should be a newly created secret chat, so if we requested it, open the conversation
|
||||
if (secretChat && secretChat->is_outbound_) {
|
||||
if (state == td::td_api::secretChatStatePending::ID)
|
||||
if (state == td::td_api::secretChatStatePending::ID) {
|
||||
// TRANSLATOR: In-chat message to explain why the chat is not established yet.
|
||||
showChatNotification(account, *chat, _("The secret chat will be available when activated by the peer"),
|
||||
PURPLE_MESSAGE_NO_LOG);
|
||||
else
|
||||
} else
|
||||
// Shouldn't really be possible, but just in case
|
||||
getImConversation(account.purpleAccount, purpleBuddyName.c_str());
|
||||
}
|
||||
|
@ -2265,10 +2265,12 @@ void PurpleTdClient::createSecretChat(const char* buddyName)
|
||||
// Unlikely error messages not worth translating
|
||||
const char *reason = users.empty() ? "User not found" :
|
||||
"More than one user found with this name";
|
||||
std::string message = formatMessage(_("Cannot kick user: {}"), std::string(reason));
|
||||
std::string message = formatMessage("Cannot create secret chat: {}", std::string(reason));
|
||||
purple_notify_error(purple_account_get_connection(m_account),
|
||||
// TRANSLATOR: Failure notification, title
|
||||
_("Failed to create secret chat"),
|
||||
message.c_str(), NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -243,6 +243,7 @@ static GList* tgprpl_blist_node_menu (PurpleBlistNode *node)
|
||||
{
|
||||
fprintf(stderr, "Creating secret chat menu for %s\n", purple_buddy_get_name(PURPLE_BUDDY(node)));
|
||||
PurpleMenuAction *action;
|
||||
// TRANSLATOR: Buddy menu action item
|
||||
action = purple_menu_action_new(_("Start secret chat"),
|
||||
PURPLE_CALLBACK(createSecretChat),
|
||||
NULL, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user