mirror of https://github.com/procxx/kepka.git
Remove some unused / rare phrases.
This commit is contained in:
parent
d1687ab963
commit
0c4bda71fd
|
@ -122,7 +122,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_channel_admins_link#one" = "{count} administrator";
|
||||
"lng_channel_admins_link#other" = "{count} administrators";
|
||||
|
||||
"lng_server_error" = "Internal server error.";
|
||||
"lng_flood_error" = "Too many tries. Please try again later.";
|
||||
"lng_gif_error" = "An error has occurred while reading GIF animation :(";
|
||||
"lng_edit_error" = "You cannot edit this message";
|
||||
|
@ -343,7 +342,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_download_finish_failed" = "File download could not be finished.\n\nWould you like to try again?";
|
||||
"lng_download_path_clearing" = "Clearing...";
|
||||
"lng_download_path_cleared" = "Cleared!";
|
||||
"lng_download_path_clear_failed" = "Clear failed :(";
|
||||
|
||||
"lng_settings_section_privacy" = "Privacy and Security";
|
||||
|
||||
|
@ -356,7 +354,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_local_storage_clear" = "Clear all";
|
||||
"lng_local_storage_clearing" = "Clearing...";
|
||||
"lng_local_storage_cleared" = "Cleared!";
|
||||
"lng_local_storage_clear_failed" = "Clear failed :(";
|
||||
|
||||
"lng_settings_section_advanced_settings" = "Advanced Settings";
|
||||
"lng_settings_enable_night_theme" = "Enable night mode";
|
||||
|
@ -444,7 +441,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_settings_reset_sure" = "Are you sure you want to terminate\nall other sessions?";
|
||||
"lng_settings_reset_one_sure" = "Do you want to terminate this session?";
|
||||
"lng_settings_reset_button" = "Terminate";
|
||||
"lng_settings_reset_done" = "Other sessions terminated";
|
||||
"lng_settings_manage_local_storage" = "Manage local storage";
|
||||
"lng_settings_ask_question" = "Ask a Question";
|
||||
"lng_settings_ask_sure" = "Please note that Telegram Support is done by volunteers. We try to respond as quickly as possible, but it may take a while.\n\nPlease take a look at the Telegram FAQ: it has important troubleshooting tips and answers to most questions.";
|
||||
|
@ -459,7 +455,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
|
||||
"lng_sessions_header" = "Current session";
|
||||
"lng_sessions_other_header" = "Active sessions";
|
||||
"lng_sessions_no_other" = "No other sessions";
|
||||
"lng_sessions_other_desc" = "You can log in to Telegram from other mobile, tablet and desktop devices, using the same phone number. All your data will be instantly synchronized.";
|
||||
"lng_sessions_terminate_all" = "Terminate all other sessions";
|
||||
|
||||
|
@ -724,7 +719,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_action_add_you" = "{from} added you to this channel";
|
||||
"lng_action_you_joined" = "You joined this channel";
|
||||
"lng_action_add_you_group" = "{from} added you to this group";
|
||||
"lng_action_you_joined_group" = "You joined this group";
|
||||
"lng_action_kick_user" = "{from} removed {user}";
|
||||
"lng_action_user_left" = "{from} left the group";
|
||||
"lng_action_user_joined" = "{from} joined the group";
|
||||
|
@ -825,7 +819,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_cancel_edit_post_no" = "No";
|
||||
|
||||
"lng_bot_share_location_unavailable" = "Sorry, the location sharing is currently unavailable in Telegram Desktop.";
|
||||
"lng_bot_inline_geo_unavailable" = "Sorry, this bot requires location sharing.\nIt is not available in Telegram Desktop.";
|
||||
"lng_bot_share_phone" = "Share Phone Number?";
|
||||
"lng_bot_share_phone_confirm" = "Share";
|
||||
|
||||
|
@ -860,7 +853,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_emoji_hide_panel" = "Click here to hide the emoji sidebar";
|
||||
|
||||
"lng_recent_stickers" = "Frequently used";
|
||||
"lng_faved_stickers" = "Favorite stickers";
|
||||
"lng_faved_stickers_add" = "Add to Favorites";
|
||||
"lng_faved_stickers_remove" = "Remove from Favorites";
|
||||
"lng_group_stickers" = "Group stickers";
|
||||
|
@ -923,10 +915,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_cant_invite_banned" = "Sorry, only admin can add this user.";
|
||||
"lng_cant_invite_privacy" = "Sorry, you cannot add this user to groups because of their privacy settings.";
|
||||
"lng_cant_invite_privacy_channel" = "Sorry, you cannot add this user to channels because of their privacy settings.";
|
||||
"lng_cant_delete_group#one" = "Sorry, it is currently not possible to manually delete communities that have more than {count} member. Please contact Telegram support if you would like to delete this group.";
|
||||
"lng_cant_delete_group#other" = "Sorry, it is currently not possible to manually delete communities that have more than {count} members. Please contact Telegram support if you would like to delete this group.";
|
||||
"lng_cant_delete_channel#one" = "Sorry, it is currently not possible to manually delete communities that have more than {count} member. Please contact Telegram support if you would like to delete this channel.";
|
||||
"lng_cant_delete_channel#other" = "Sorry, it is currently not possible to manually delete communities that have more than {count} members. Please contact Telegram support if you would like to delete this channel.";
|
||||
"lng_cant_do_this" = "Sorry, this action is unavailable.";
|
||||
|
||||
"lng_send_button" = "Send";
|
||||
|
@ -995,10 +983,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_user_action_upload_photo" = "{user} is sending a photo";
|
||||
"lng_send_action_upload_file" = "sending a file";
|
||||
"lng_user_action_upload_file" = "{user} is sending a file";
|
||||
"lng_send_action_geo_location" = "picking a location";
|
||||
"lng_user_action_geo_location" = "{user} is picking a location";
|
||||
"lng_send_action_choose_contact" = "choosing a contact";
|
||||
"lng_user_action_choose_contact" = "{user} is choosing a contact";
|
||||
"lng_unread_bar#one" = "{count} unread message";
|
||||
"lng_unread_bar#other" = "{count} unread messages";
|
||||
|
||||
|
@ -1064,7 +1048,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_send_images_compress#other" = "Compress images";
|
||||
"lng_send_image_empty" = "Could not send an empty file: {name}";
|
||||
"lng_send_image_too_large" = "Could not send a file, because it is larger than 1500 MB: {name}";
|
||||
"lng_send_folder" = "Could not send «{name}» because it is a directory :(";
|
||||
"lng_send_images_selected#one" = "{count} image selected";
|
||||
"lng_send_images_selected#other" = "{count} images selected";
|
||||
"lng_send_photos#one" = "Send {count} photo";
|
||||
|
@ -1239,7 +1222,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
"lng_call_fingerprint_tooltip" = "If emoji on {user}'s screen are the same, this call is 100% secure";
|
||||
|
||||
"lng_call_error_not_available" = "Sorry, {user} doesn't accept calls.";
|
||||
"lng_call_error_incompatible" = "{user}'s app is using an incompatible protocol. They need to update their app before you can call them.";
|
||||
"lng_call_error_outdated" = "{user}'s app does not support calls. They need to update their app before you can call them.";
|
||||
"lng_call_error_audio_io" = "There seems to be a problem with audio playback on your computer. Please make sure that your computer's speakers and microphone are working and try again.";
|
||||
|
||||
|
|
|
@ -1552,7 +1552,7 @@ void ApiWrap::requestFavedStickers(TimeId now) {
|
|||
case mtpc_messages_favedStickersNotModified: return;
|
||||
case mtpc_messages_favedStickers: {
|
||||
auto &d = result.c_messages_favedStickers();
|
||||
Stickers::SpecialSetReceived(Stickers::FavedSetId, lang(lng_faved_stickers), d.vstickers.v, d.vhash.v, d.vpacks.v);
|
||||
Stickers::SpecialSetReceived(Stickers::FavedSetId, Lang::Hard::FavedSetTitle(), d.vstickers.v, d.vhash.v, d.vpacks.v);
|
||||
} return;
|
||||
default: Unexpected("Type in ApiWrap::favedStickersDone()");
|
||||
}
|
||||
|
|
|
@ -167,13 +167,13 @@ void ChangePhoneBox::EnterPhone::sendPhoneDone(const QString &phoneNumber, const
|
|||
switch (data.vtype.type()) {
|
||||
case mtpc_auth_sentCodeTypeApp:
|
||||
LOG(("Error: should not be in-app code!"));
|
||||
showError(lang(lng_server_error));
|
||||
showError(Lang::Hard::ServerError());
|
||||
return;
|
||||
case mtpc_auth_sentCodeTypeSms: codeLength = data.vtype.c_auth_sentCodeTypeSms().vlength.v; break;
|
||||
case mtpc_auth_sentCodeTypeCall: codeLength = data.vtype.c_auth_sentCodeTypeCall().vlength.v; break;
|
||||
case mtpc_auth_sentCodeTypeFlashCall:
|
||||
LOG(("Error: should not be flashcall!"));
|
||||
showError(lang(lng_server_error));
|
||||
showError(Lang::Hard::ServerError());
|
||||
return;
|
||||
}
|
||||
auto phoneCodeHash = qs(data.vphone_code_hash);
|
||||
|
@ -191,7 +191,7 @@ void ChangePhoneBox::EnterPhone::sendPhoneDone(const QString &phoneNumber, const
|
|||
}
|
||||
|
||||
bool ChangePhoneBox::EnterPhone::sendPhoneFail(const QString &phoneNumber, const RPCError &error) {
|
||||
auto errorText = lang(lng_server_error);
|
||||
auto errorText = Lang::Hard::ServerError();
|
||||
if (MTP::isFloodError(error)) {
|
||||
errorText = lang(lng_flood_error);
|
||||
} else if (MTP::isDefaultHandledError(error)) {
|
||||
|
@ -300,7 +300,7 @@ void ChangePhoneBox::EnterCode::showError(const QString &text) {
|
|||
}
|
||||
|
||||
bool ChangePhoneBox::EnterCode::sendCodeFail(const RPCError &error) {
|
||||
auto errorText = lang(lng_server_error);
|
||||
auto errorText = Lang::Hard::ServerError();
|
||||
if (MTP::isFloodError(error)) {
|
||||
errorText = lang(lng_flood_error);
|
||||
} else if (MTP::isDefaultHandledError(error)) {
|
||||
|
|
|
@ -176,7 +176,7 @@ void ConfirmPhoneBox::sendCodeDone(const MTPauth_SentCode &result) {
|
|||
}
|
||||
|
||||
bool ConfirmPhoneBox::sendCodeFail(const RPCError &error) {
|
||||
auto errorText = lang(lng_server_error);
|
||||
auto errorText = Lang::Hard::ServerError();
|
||||
if (MTP::isFloodError(error)) {
|
||||
errorText = lang(lng_flood_error);
|
||||
} else if (MTP::isDefaultHandledError(error)) {
|
||||
|
@ -254,7 +254,7 @@ void ConfirmPhoneBox::confirmDone(const MTPBool &result) {
|
|||
}
|
||||
|
||||
bool ConfirmPhoneBox::confirmFail(const RPCError &error) {
|
||||
auto errorText = lang(lng_server_error);
|
||||
auto errorText = Lang::Hard::ServerError();
|
||||
if (MTP::isFloodError(error)) {
|
||||
errorText = lang(lng_flood_error);
|
||||
} else if (MTP::isDefaultHandledError(error)) {
|
||||
|
|
|
@ -100,7 +100,7 @@ void LocalStorageBox::paintEvent(QPaintEvent *e) {
|
|||
switch (_state) {
|
||||
case State::Clearing: return lang(lng_local_storage_clearing);
|
||||
case State::Cleared: return lang(lng_local_storage_cleared);
|
||||
case State::ClearFailed: return lang(lng_local_storage_clear_failed);
|
||||
case State::ClearFailed: return Lang::Hard::ClearPathFailed();
|
||||
}
|
||||
return QString();
|
||||
})();
|
||||
|
|
|
@ -525,7 +525,7 @@ bool RecoverBox::codeSubmitFail(const RPCError &error) {
|
|||
if (cDebug()) { // internal server error
|
||||
_error = err + ": " + error.description();
|
||||
} else {
|
||||
_error = lang(lng_server_error);
|
||||
_error = Lang::Hard::ServerError();
|
||||
}
|
||||
update();
|
||||
_recoverCode->setFocus();
|
||||
|
|
|
@ -661,14 +661,14 @@ void Call::handleRequestError(const RPCError &error) {
|
|||
} else if (error.type() == qstr("PARTICIPANT_VERSION_OUTDATED")) {
|
||||
Ui::show(Box<InformBox>(lng_call_error_outdated(lt_user, App::peerName(_user))));
|
||||
} else if (error.type() == qstr("CALL_PROTOCOL_LAYER_INVALID")) {
|
||||
Ui::show(Box<InformBox>(lng_call_error_incompatible(lt_user, App::peerName(_user))));
|
||||
Ui::show(Box<InformBox>(Lang::Hard::CallErrorIncompatible().replace("{user}", App::peerName(_user))));
|
||||
}
|
||||
finish(FinishType::Failed);
|
||||
}
|
||||
|
||||
void Call::handleControllerError(int error) {
|
||||
if (error == TGVOIP_ERROR_INCOMPATIBLE) {
|
||||
Ui::show(Box<InformBox>(lng_call_error_incompatible(lt_user, App::peerName(_user))));
|
||||
Ui::show(Box<InformBox>(Lang::Hard::CallErrorIncompatible().replace("{user}", App::peerName(_user))));
|
||||
} else if (error == TGVOIP_ERROR_AUDIO_IO) {
|
||||
Ui::show(Box<InformBox>(lang(lng_call_error_audio_io)));
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ void SetIsFaved(not_null<DocumentData*> document, base::optional<std::vector<not
|
|||
auto &sets = Global::RefStickerSets();
|
||||
auto it = sets.find(FavedSetId);
|
||||
if (it == sets.end()) {
|
||||
it = sets.insert(FavedSetId, Set(FavedSetId, 0, lang(lng_faved_stickers), QString(), 0, 0, MTPDstickerSet_ClientFlag::f_special | 0));
|
||||
it = sets.insert(FavedSetId, Set(FavedSetId, 0, Lang::Hard::FavedSetTitle(), QString(), 0, 0, MTPDstickerSet_ClientFlag::f_special | 0));
|
||||
}
|
||||
auto index = it->stickers.indexOf(document);
|
||||
if (index == 0) {
|
||||
|
|
|
@ -1290,7 +1290,7 @@ void StickersListWidget::refreshFavedStickers() {
|
|||
if (it == sets.cend() || it->stickers.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
_mySets.push_back(Set(Stickers::FavedSetId, MTPDstickerSet::Flag::f_official | MTPDstickerSet_ClientFlag::f_special, lang(lng_faved_stickers), it->stickers.size() * 2, it->stickers));
|
||||
_mySets.push_back(Set(Stickers::FavedSetId, MTPDstickerSet::Flag::f_official | MTPDstickerSet_ClientFlag::f_special, Lang::Hard::FavedSetTitle(), it->stickers.size() * 2, it->stickers));
|
||||
_favedStickersMap = base::flat_set<not_null<DocumentData*>> { it->stickers.begin(), it->stickers.end() };
|
||||
}
|
||||
|
||||
|
|
|
@ -281,6 +281,7 @@ constexpr auto CloudRecentSetId = 0xFFFFFFFFFFFFFFFCULL; // for cloud-stored rec
|
|||
constexpr auto FeaturedSetId = 0xFFFFFFFFFFFFFFFBULL; // for emoji/stickers panel, should not appear in Sets
|
||||
constexpr auto FavedSetId = 0xFFFFFFFFFFFFFFFAULL; // for cloud-stored faved stickers
|
||||
constexpr auto MegagroupSetId = 0xFFFFFFFFFFFFFFEFULL; // for setting up megagroup sticker set
|
||||
|
||||
struct Set {
|
||||
Set(uint64 id, uint64 access, const QString &title, const QString &shortName, int32 count, int32 hash, MTPDstickerSet::Flags flags)
|
||||
: id(id)
|
||||
|
|
|
@ -343,8 +343,8 @@ bool History::updateSendActionNeedsAnimating(TimeMs ms, bool force) {
|
|||
case Type::UploadRound: return name.isEmpty() ? lang(lng_send_action_upload_round) : lng_user_action_upload_round(lt_user, name);
|
||||
case Type::UploadPhoto: return name.isEmpty() ? lang(lng_send_action_upload_photo) : lng_user_action_upload_photo(lt_user, name);
|
||||
case Type::UploadFile: return name.isEmpty() ? lang(lng_send_action_upload_file) : lng_user_action_upload_file(lt_user, name);
|
||||
case Type::ChooseLocation: return name.isEmpty() ? lang(lng_send_action_geo_location) : lng_user_action_geo_location(lt_user, name);
|
||||
case Type::ChooseContact: return name.isEmpty() ? lang(lng_send_action_choose_contact) : lng_user_action_choose_contact(lt_user, name);
|
||||
case Type::ChooseLocation:
|
||||
case Type::ChooseContact: return name.isEmpty() ? lang(lng_typing) : lng_user_typing(lt_user, name);
|
||||
default: break;
|
||||
};
|
||||
return QString();
|
||||
|
|
|
@ -786,7 +786,14 @@ HistoryJoined::HistoryJoined(not_null<History*> history, const QDateTime &invite
|
|||
|
||||
HistoryJoined::PreparedText HistoryJoined::GenerateText(not_null<History*> history, not_null<UserData*> inviter) {
|
||||
if (inviter->id == Auth().userPeerId()) {
|
||||
return { lang(history->isMegagroup() ? lng_action_you_joined_group : lng_action_you_joined) };
|
||||
if (history->isMegagroup()) {
|
||||
auto self = App::user(Auth().userPeerId());
|
||||
auto result = PreparedText {};
|
||||
result.links.push_back(self->createOpenLink());
|
||||
result.text = lng_action_user_joined(lt_from, textcmdLink(1, self->name));
|
||||
return result;
|
||||
}
|
||||
return { lang(lng_action_you_joined) };
|
||||
}
|
||||
auto result = PreparedText {};
|
||||
result.links.push_back(inviter->createOpenLink());
|
||||
|
|
|
@ -1066,13 +1066,7 @@ void Widget::queryInlineBot(UserData *bot, PeerData *peer, QString query) {
|
|||
inlineBotChanged();
|
||||
_inlineBot = bot;
|
||||
force = true;
|
||||
//if (_inlineBot->isBotInlineGeo()) {
|
||||
// Ui::show(Box<InformBox>(lang(lng_bot_inline_geo_unavailable)));
|
||||
//}
|
||||
}
|
||||
//if (_inlineBot && _inlineBot->isBotInlineGeo()) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (_inlineQuery != query || force) {
|
||||
if (_inlineRequestId) {
|
||||
|
|
|
@ -220,7 +220,7 @@ void CodeWidget::codeSubmitDone(const MTPauth_Authorization &result) {
|
|||
_sentRequest = 0;
|
||||
auto &d = result.c_auth_authorization();
|
||||
if (d.vuser.type() != mtpc_user || !d.vuser.c_user().is_self()) { // wtf?
|
||||
showCodeError(langFactory(lng_server_error));
|
||||
showCodeError(&Lang::Hard::ServerError);
|
||||
return;
|
||||
}
|
||||
cSetLoggedPhoneNumber(getData()->phone);
|
||||
|
@ -259,7 +259,7 @@ bool CodeWidget::codeSubmitFail(const RPCError &error) {
|
|||
auto text = err + ": " + error.description();
|
||||
showCodeError([text] { return text; });
|
||||
} else {
|
||||
showCodeError(langFactory(lng_server_error));
|
||||
showCodeError(&Lang::Hard::ServerError);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ void CodeWidget::onNoTelegramCode() {
|
|||
|
||||
void CodeWidget::noTelegramCodeDone(const MTPauth_SentCode &result) {
|
||||
if (result.type() != mtpc_auth_sentCode) {
|
||||
showCodeError(langFactory(lng_server_error));
|
||||
showCodeError(&Lang::Hard::ServerError);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ bool CodeWidget::noTelegramCodeFail(const RPCError &error) {
|
|||
auto text = error.type() + ": " + error.description();
|
||||
showCodeError([text] { return text; });
|
||||
} else {
|
||||
showCodeError(langFactory(lng_server_error));
|
||||
showCodeError(&Lang::Hard::ServerError);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ void PhoneWidget::phoneSubmitDone(const MTPauth_SentCode &result) {
|
|||
_sentRequest = 0;
|
||||
|
||||
if (result.type() != mtpc_auth_sentCode) {
|
||||
showPhoneError(langFactory(lng_server_error));
|
||||
showPhoneError(&Lang::Hard::ServerError);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ bool PhoneWidget::phoneSubmitFail(const RPCError &error) {
|
|||
auto text = err + ": " + error.description();
|
||||
showPhoneError([text] { return text; });
|
||||
} else {
|
||||
showPhoneError(langFactory(lng_server_error));
|
||||
showPhoneError(&Lang::Hard::ServerError);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ void PwdCheckWidget::pwdSubmitDone(bool recover, const MTPauth_Authorization &re
|
|||
}
|
||||
auto &d = result.c_auth_authorization();
|
||||
if (d.vuser.type() != mtpc_user || !d.vuser.c_user().is_self()) { // wtf?
|
||||
showError(langFactory(lng_server_error));
|
||||
showError(&Lang::Hard::ServerError);
|
||||
return;
|
||||
}
|
||||
finish(d.vuser);
|
||||
|
@ -167,7 +167,7 @@ bool PwdCheckWidget::pwdSubmitFail(const RPCError &error) {
|
|||
auto text = err + ": " + error.description();
|
||||
showError([text] { return text; });
|
||||
} else {
|
||||
showError(langFactory(lng_server_error));
|
||||
showError(&Lang::Hard::ServerError);
|
||||
}
|
||||
_pwdField->setFocus();
|
||||
return false;
|
||||
|
@ -204,7 +204,7 @@ bool PwdCheckWidget::codeSubmitFail(const RPCError &error) {
|
|||
auto text = err + ": " + error.description();
|
||||
showError([text] { return text; });
|
||||
} else {
|
||||
showError(langFactory(lng_server_error));
|
||||
showError(&Lang::Hard::ServerError);
|
||||
}
|
||||
_codeField->setFocus();
|
||||
return false;
|
||||
|
|
|
@ -161,7 +161,7 @@ void SignupWidget::nameSubmitDone(const MTPauth_Authorization &result) {
|
|||
stopCheck();
|
||||
auto &d = result.c_auth_authorization();
|
||||
if (d.vuser.type() != mtpc_user || !d.vuser.c_user().is_self()) { // wtf?
|
||||
showError(langFactory(lng_server_error));
|
||||
showError(&Lang::Hard::ServerError);
|
||||
return;
|
||||
}
|
||||
finish(d.vuser, _photoImage);
|
||||
|
@ -203,7 +203,7 @@ bool SignupWidget::nameSubmitFail(const RPCError &error) {
|
|||
auto text = err + ": " + error.description();
|
||||
showError([text] { return text; });
|
||||
} else {
|
||||
showError(langFactory(lng_server_error));
|
||||
showError(&Lang::Hard::ServerError);
|
||||
}
|
||||
if (_invertOrder) {
|
||||
_last->setFocus();
|
||||
|
|
|
@ -289,7 +289,7 @@ void Widget::resetAccount() {
|
|||
Ui::show(Box<InformBox>(lang(lng_signin_reset_cancelled)));
|
||||
} else {
|
||||
Ui::hideLayer();
|
||||
getStep()->showError(langFactory(lng_server_error));
|
||||
getStep()->showError(&Lang::Hard::ServerError);
|
||||
}
|
||||
}).send();
|
||||
})));
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop version of Telegram messaging app, see https://telegram.org
|
||||
|
||||
Telegram Desktop is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
In addition, as a special exception, the copyright holders give permission
|
||||
to link the code of portions of this program with the OpenSSL library.
|
||||
|
||||
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace Lang {
|
||||
namespace Hard {
|
||||
|
||||
inline QString FavedSetTitle() {
|
||||
return qsl("Favorite stickers");
|
||||
}
|
||||
|
||||
inline QString CallErrorIncompatible() {
|
||||
return qsl("{user}'s app is using an incompatible protocol. They need to update their app before you can call them.");
|
||||
}
|
||||
|
||||
inline QString ServerError() {
|
||||
return qsl("Internal server error.");
|
||||
}
|
||||
|
||||
inline QString ClearPathFailed() {
|
||||
return qsl("Clear failed :(");
|
||||
}
|
||||
|
||||
} // namespace Hard
|
||||
} // namespace Lang
|
|
@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
#pragma once
|
||||
|
||||
#include "lang/lang_instance.h"
|
||||
#include "lang/lang_hardcoded.h"
|
||||
|
||||
inline QString lang(LangKey key) {
|
||||
return Lang::Current().getValue(key);
|
||||
|
|
|
@ -337,13 +337,6 @@ void ActionsWidget::onUpgradeToSupergroup() {
|
|||
}
|
||||
|
||||
void ActionsWidget::onDeleteChannel() {
|
||||
if (auto channel = peer()->asChannel()) {
|
||||
if (channel->membersCount() > kMaxChannelMembersDeleteAllowed) {
|
||||
Ui::show(Box<InformBox>((channel->isMegagroup() ? lng_cant_delete_group : lng_cant_delete_channel)(lt_count, kMaxChannelMembersDeleteAllowed)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto text = lang(peer()->isMegagroup() ? lng_sure_delete_group : lng_sure_delete_channel);
|
||||
Ui::show(Box<ConfirmBox>(text, lang(lng_box_delete), st::attentionBoxButton, base::lambda_guarded(this, [this] {
|
||||
Ui::hideLayer();
|
||||
|
|
|
@ -90,7 +90,7 @@ void DownloadPathState::paintEvent(QPaintEvent *e) {
|
|||
switch (_state) {
|
||||
case State::Clearing: return lang(lng_download_path_clearing);
|
||||
case State::Cleared: return lang(lng_download_path_cleared);
|
||||
case State::ClearFailed: return lang(lng_download_path_clear_failed);
|
||||
case State::ClearFailed: return Lang::Hard::ClearPathFailed();
|
||||
}
|
||||
return QString();
|
||||
})();
|
||||
|
|
|
@ -574,17 +574,10 @@ void FileLoadTask::process() {
|
|||
}
|
||||
|
||||
void FileLoadTask::finish() {
|
||||
if (!_result || !_result->filesize) {
|
||||
if (!_result || !_result->filesize || _result->filesize < 0) {
|
||||
Ui::show(
|
||||
Box<InformBox>(lng_send_image_empty(lt_name, _filepath)),
|
||||
LayerOption::KeepOther);
|
||||
} else if (_result->filesize == -1) { // dir
|
||||
Ui::show(
|
||||
Box<InformBox>(
|
||||
lng_send_folder(
|
||||
lt_name,
|
||||
QFileInfo(_filepath).dir().dirName())),
|
||||
LayerOption::KeepOther);
|
||||
} else if (_result->filesize > App::kFileSizeLimit) {
|
||||
Ui::show(
|
||||
Box<InformBox>(
|
||||
|
|
|
@ -3358,7 +3358,7 @@ void _readStickerSets(FileKey &stickersKey, Stickers::Order *outOrder = nullptr,
|
|||
setTitle = lang(lng_recent_stickers);
|
||||
setFlags |= MTPDstickerSet_ClientFlag::f_special;
|
||||
} else if (setId == Stickers::FavedSetId) {
|
||||
setTitle = lang(lng_faved_stickers);
|
||||
setTitle = Lang::Hard::FavedSetTitle();
|
||||
setFlags |= MTPDstickerSet_ClientFlag::f_special;
|
||||
} else if (setId) {
|
||||
if (readingInstalled && outOrder && stickers.version < 9061) {
|
||||
|
|
|
@ -269,6 +269,7 @@
|
|||
<(src_loc)/lang/lang_cloud_manager.h
|
||||
<(src_loc)/lang/lang_file_parser.cpp
|
||||
<(src_loc)/lang/lang_file_parser.h
|
||||
<(src_loc)/lang/lang_hardcoded.h
|
||||
<(src_loc)/lang/lang_instance.cpp
|
||||
<(src_loc)/lang/lang_instance.h
|
||||
<(src_loc)/lang/lang_keys.cpp
|
||||
|
|
Loading…
Reference in New Issue