Translate desktop avatar editor and gallery controls
This commit is contained in:
1 parent
27fd9ee62d
commit
cbe6da09ee
2 files changed
+10
-2
No files matched your search
@@ -2,6 +2,7 @@
|
||||
#include "avatarmanager.h"
|
||||
#include "../imageviewer_window.h"
|
||||
#include <QDialog>
|
||||
#include <QCoreApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPointer>
|
||||
@@ -10,10 +11,11 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace {
|
||||
QString text(const char* source) { return QCoreApplication::translate("ChatGui",source); }
|
||||
class Gallery : public QDialog {
|
||||
public:
|
||||
explicit Gallery(AvatarManager* source) : manager(source) {
|
||||
setAttribute(Qt::WA_DeleteOnClose); resize(850,720); setWindowTitle(tr("Avatars"));
|
||||
setAttribute(Qt::WA_DeleteOnClose); resize(850,720); setWindowTitle(text("Avatars"));
|
||||
auto* layout = new QVBoxLayout(this); viewer = new ImageViewerWindow(this); layout->addWidget(viewer,1);
|
||||
status = new QLabel(this); status->setAlignment(Qt::AlignCenter); layout->addWidget(status);
|
||||
auto* strip = new QHBoxLayout; strip->addStretch(); previous = new QPushButton("←",this); strip->addWidget(previous);
|
||||
@@ -49,7 +51,7 @@ public:
|
||||
const bool full=!image.isNull(); if (!full) image=manager->galleryImage(selected);
|
||||
if (image.cacheKey()!=displayed) { viewer->loadImage(image); displayed=image.cacheKey(); }
|
||||
if (full) status->setText(QString("%1 / %2").arg(index+1).arg(files.size()));
|
||||
else if (!image.isNull()) status->setText(tr("Loading original…"));
|
||||
else if (!image.isNull()) status->setText(text("Loading original…"));
|
||||
for (int i=0;i<5;i++) {
|
||||
const int item=index+i-2; const bool valid=item>=0 && item<files.size(); previews[i]->setEnabled(valid);
|
||||
previews[i]->setIcon(valid ? QIcon(QPixmap::fromImage(manager->galleryImage(files[item]))) : QIcon());
|
||||
|
||||
@@ -2099,6 +2099,12 @@ Directories: %5</source>
|
||||
<message><source>Avatar:</source><translation>Аватарка:</translation></message>
|
||||
<message><source>No avatar</source><translation>Нет аватарки</translation></message>
|
||||
<message><source>Choose avatar</source><translation>Выбор аватарки</translation></message>
|
||||
<message><source>Crop avatar</source><translation>Выбор области аватарки</translation></message>
|
||||
<message><source>Drag photo and use the wheel to select a square</source><translation>Перемещайте фото мышью и масштабируйте колесом, чтобы выбрать квадрат</translation></message>
|
||||
<message><source>Cannot load avatar image</source><translation>Не удалось открыть изображение аватарки</translation></message>
|
||||
<message><source>Avatars</source><translation>Аватарки</translation></message>
|
||||
<message><source>Loading original…</source><translation>Загрузка оригинала…</translation></message>
|
||||
<message><source>Cannot load avatars</source><translation>Не удалось загрузить аватарки</translation></message>
|
||||
<message><source>Images (*.png *.jpg *.jpeg *.webp)</source><translation>Изображения (*.png *.jpg *.jpeg *.webp)</translation></message>
|
||||
<message><source>Avatar changes apply immediately in channels with the selected storage server.</source><translation>Аватарка изменяется сразу в каналах с выбранным сервером хранения.</translation></message>
|
||||
<message><source>Cannot open avatar cache</source><translation>Не удалось открыть кеш аватарок</translation></message>
|
||||
|
||||
Reference in new issue
Block a user