fix: cleanup a bit

fix: localize some strings
This commit is contained in:
ZavaruKitsu 2023-09-29 13:34:31 +03:00
parent 2dcc822e48
commit 163252b890
35 changed files with 62 additions and 84 deletions

View file

@ -4278,6 +4278,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_ContextCopyCallbackData" = "Copy Callback Data";
"ayu_LocalPremiumNotice" = "You're using **local** Telegram Premium.\nIt **won't** give you any benefits, except translator.\n**Enjoy the star near your nickname!**";
"ayu_SettingsWatermark" = "AyuGram developed and maintained by Radolyn Labs.";
"ayu_ConfirmationSticker" = "Do you want to send this sticker?";
"ayu_ConfirmationGIF" = "Do you want to send this GIF?";
"ayu_ConfirmationVoice" = "Do you want to send this voice message?";
"ayu_IntroAbout" = "Welcome to the AyuGram Desktop.\nIt's cool and looks less ugly.";
"ayu_AboutText1" = "Just a cool Telegram client based on {api_link}.";
"ayu_UpdateAyuGram" = "Update AyuGram";

View file

@ -3980,6 +3980,7 @@ void ApiWrap::sendMediaWithRandomId(
auto current = base::unixtime::now();
options.scheduled = current + 12;
}
const auto history = item->history();
const auto replyTo = item->replyTo();

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_settings.h"
#include "rpl/lifetime.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_state.h"
namespace AyuState

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_database.h"
#include "entities.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_messages_controller.h"
#include "ayu/ayu_constants.h"
@ -59,7 +58,8 @@ void map(HistoryMessageEdition &edition, not_null<HistoryItem *> item, EditedMes
if (auto edited = item->Get<HistoryMessageEdited>()) {
message.editDate = edited->date;
} else {
}
else {
message.editDate = base::unixtime::now();
}

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_sync_controller.h"
#include "ayu/libs/process.hpp"
#include "ayu/sync/models.h"

View file

@ -4,10 +4,9 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_pipe_wrapper.h"
#include <sstream>
#include "ayu/libs/bit_converter.hpp"
#include <sstream>
using stringbuf = std::basic_stringbuf<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char>>;

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include <codecvt>
#include <iostream>
#include <locale>

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_assets.h"
#include "ayu/ayu_settings.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_lottie.h"
namespace AyuUi

View file

@ -12,7 +12,8 @@
namespace AyuUi
{
class AyuLottieImpl : public AyuLottie {
class AyuLottieImpl : public AyuLottie
{
std::unique_ptr<Lottie::Icon> getLottie(const QString &text) override;
};

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "confirmation_box.h"
#include "lang_auto.h"
#include "ayu/ayu_settings.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "edit_deleted_mark.h"
#include "base/random.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "edit_edited_mark.h"
#include "base/random.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "message_history_box.h"
#include "ayu/ayu_settings.h"
#include "ayu/database/ayu_database.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ui/boxes/confirm_box.h"
#include "voice_confirmation_box.h"

View file

@ -83,10 +83,10 @@
namespace AyuUi
{
void AddHistoryAction(not_null<Ui::PopupMenu *>menu, HistoryItem *item);
void AddHistoryAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item);
void AddHideMessageAction(not_null<Ui::PopupMenu *>menu, HistoryItem *item);
void AddHideMessageAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item);
void AddReadUntilAction(not_null<Ui::PopupMenu *>menu, HistoryItem *item);
void AddReadUntilAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item);
}

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu/ui/sections/edited/edited_log_inner.h"
#include "history/history.h"

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#pragma once
#include "history/view/history_view_element.h"

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include <ayu/database/entities.h>
#include "ayu/ui/sections/edited/edited_log_item.h"

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#pragma once
#include "ayu/database/entities.h"

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu/ui/sections/edited/edited_log_section.h"
#include "ayu/ui/sections/edited/edited_log_inner.h"

View file

@ -1,10 +1,9 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#pragma once
#include "window/section_widget.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "settings_ayu.h"
#include "ayu/ayu_settings.h"
#include "ayu/sync/ayu_sync_controller.h"

View file

@ -24,7 +24,7 @@ extern base::options::toggle StreamerMode;
namespace Settings
{
class Ayu: public Section<Ayu>
class Ayu : public Section<Ayu>
{
public:
Ayu(QWidget *parent, not_null<Window::SessionController *> controller);

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_profile_values.h"
#include "ayu/ayu_settings.h"
#include "data/data_peer.h"

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "ayu_mapper.h"
#include "history/history_item.h"
@ -15,11 +14,12 @@
namespace AyuMapper
{
int mapItemFlagsToMTPFlags(not_null<HistoryItem *> item) {
int mapItemFlagsToMTPFlags(not_null<HistoryItem *> item)
{
int flags = 0;
const auto thread = item->topic()
? (Data::Thread*)item->topic()
? (Data::Thread *)item->topic()
: item->history();
const auto unseen = item->unread(thread);
if (unseen) {
@ -80,7 +80,6 @@ int mapItemFlagsToMTPFlags(not_null<HistoryItem *> item) {
}
return flags;
}
}

View file

@ -4,7 +4,6 @@
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2023
#include "telegram_helpers.h"
#include <functional>
#include <QTimer>

View file

@ -22,4 +22,4 @@ ID getDialogIdFromPeer(not_null<PeerData *> peer);
std::pair<std::string, std::string> serializeTextWithEntities(not_null<HistoryItem *> item);
void MarkAsReadChatList(not_null<Dialogs::MainList *> list);
void MarkAsReadThread(not_null<Data::Thread*> thread);
void MarkAsReadThread(not_null<Data::Thread *> thread);

View file

@ -480,11 +480,9 @@ void GifsListWidget::selectInlineResult(
if (forceSend
|| (media && media->image(PhotoSize::Thumbnail))
|| (media && media->image(PhotoSize::Large))) {
// why photo type in GIF sender?
_photoChosen.fire({
.photo = photo,
.options = options });
} else if (!photo->loading(PhotoSize::Thumbnail)) {
photo->load(PhotoSize::Thumbnail, Data::FileOrigin());
}
@ -505,9 +503,9 @@ void GifsListWidget::selectInlineResult(
if (settings->gifConfirmation)
{
Ui::show(Ui::MakeConfirmBox({
.text = rpl::single(QString("Do you want to send this GIF?")),
.text = tr::ayu_ConfirmationGIF(),
.confirmed = sendGIFCallback,
.confirmText = rpl::single(QString("Send")),
.confirmText = tr::lng_send_button()
}));
}
else

View file

@ -1769,9 +1769,9 @@ void StickersListWidget::mouseReleaseEvent(QMouseEvent *e) {
};
Ui::show(Ui::MakeConfirmBox({
.text = rpl::single(QString("Do you want to send this sticker?")),
.text = tr::ayu_ConfirmationSticker(),
.confirmed = sendStickerCallback,
.confirmText = rpl::single(QString("Send")),
.confirmText = tr::lng_send_button()
}));
}
else

View file

@ -1314,6 +1314,7 @@ void Stories::sendMarkAsReadRequest(
}
checkQuitPreventFinished();
};
const auto api = &_owner->session().api();
api->request(MTPstories_ReadStories(
peer->input,

View file

@ -1509,9 +1509,9 @@ void VoiceRecordBar::stopRecording(StopType type) {
if (settings->voiceConfirmation)
{
Ui::show(AyuUi::MakeConfirmBox({
.text = rpl::single(QString("Do you want to send voice message?")),
.text = tr::ayu_ConfirmationVoice(),
.confirmed = sendVoiceCallback,
.confirmText = rpl::single(QString("Send"))
.confirmText = tr::lng_send_button()
}));
}
else
@ -1602,9 +1602,9 @@ void VoiceRecordBar::requestToSendWithOptions(Api::SendOptions options) {
if (settings->voiceConfirmation)
{
Ui::show(AyuUi::MakeConfirmBox({
.text = rpl::single(QString("Do you want to send voice message?")),
.text = tr::ayu_ConfirmationVoice(),
.confirmed = sendVoiceCallback,
.confirmText = rpl::single(QString("Send"))
.confirmText = tr::lng_send_button()
}));
}
else

View file

@ -1,3 +0,0 @@
files:
- source: /ayu-scripts/desktop-specific.json
translation: /ayu-scripts/translations/%two_letters_code%.json