Simplify IppPrinter->PrinterWorker interface

This commit is contained in:
Anton Thomasson 2022-07-10 10:29:56 +02:00
parent 95ef563230
commit 04830863ab
11 changed files with 148 additions and 211 deletions

@ -1 +1 @@
Subproject commit 1190d25aebe2c4fc3f04936479ace613f1482400 Subproject commit ba8d015e911991d20dc1433292d7188e5e7ab8f9

View file

@ -7,6 +7,7 @@
#include <fstream> #include <fstream>
Q_DECLARE_METATYPE(QMargins) Q_DECLARE_METATYPE(QMargins)
Q_DECLARE_METATYPE(IppMsg)
IppPrinter::IppPrinter() : _worker(this) IppPrinter::IppPrinter() : _worker(this)
{ {
@ -19,14 +20,7 @@ IppPrinter::IppPrinter() : _worker(this)
connect(this, &IppPrinter::doGetJobs, &_worker, &PrinterWorker::getJobs); connect(this, &IppPrinter::doGetJobs, &_worker, &PrinterWorker::getJobs);
connect(this, &IppPrinter::doCancelJob, &_worker, &PrinterWorker::cancelJob); connect(this, &IppPrinter::doCancelJob, &_worker, &PrinterWorker::cancelJob);
connect(this, &IppPrinter::doIdentify, &_worker, &PrinterWorker::identify); connect(this, &IppPrinter::doIdentify, &_worker, &PrinterWorker::identify);
connect(this, &IppPrinter::doJustUpload, &_worker, &PrinterWorker::justUpload); connect(this, &IppPrinter::doPrint, &_worker, &PrinterWorker::print);
connect(this, &IppPrinter::doFixupPlaintext, &_worker, &PrinterWorker::fixupPlaintext);
connect(this, &IppPrinter::doPrintImageAsImage, &_worker, &PrinterWorker::printImageAsImage);
connect(this, &IppPrinter::doConvertPdf, &_worker, &PrinterWorker::convertPdf);
connect(this, &IppPrinter::doConvertImage, &_worker, &PrinterWorker::convertImage);
connect(this, &IppPrinter::doConvertOfficeDocument, &_worker, &PrinterWorker::convertOfficeDocument);
connect(this, &IppPrinter::doConvertPlaintext, &_worker, &PrinterWorker::convertPlaintext);
connect(this, &IppPrinter::doGetStrings, &_worker, &PrinterWorker::getStrings); connect(this, &IppPrinter::doGetStrings, &_worker, &PrinterWorker::getStrings);
connect(this, &IppPrinter::doGetImage, &_worker, &PrinterWorker::getImage); connect(this, &IppPrinter::doGetImage, &_worker, &PrinterWorker::getImage);
@ -36,6 +30,7 @@ IppPrinter::IppPrinter() : _worker(this)
connect(&_worker, &PrinterWorker::failed, this, &IppPrinter::convertFailed); connect(&_worker, &PrinterWorker::failed, this, &IppPrinter::convertFailed);
qRegisterMetaType<QMargins>(); qRegisterMetaType<QMargins>();
qRegisterMetaType<IppMsg>();
_workerThread.start(); _workerThread.start();
} }
@ -656,8 +651,6 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
return; return;
} }
bool knownTargetFormat = true;
if(targetFormat == Mimer::PDF) if(targetFormat == Mimer::PDF)
{ {
Params.format = PrintParameters::PDF; Params.format = PrintParameters::PDF;
@ -676,7 +669,7 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
} }
else else
{ {
knownTargetFormat = false; Params.format = PrintParameters::Invalid;
} }
QSizeF size = PaperSizes[Params.paperSizeName.c_str()]; QSizeF size = PaperSizes[Params.paperSizeName.c_str()];
@ -713,24 +706,7 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
qDebug() << "Final job attributes:" << jobAttrs; qDebug() << "Final job attributes:" << jobAttrs;
IppMsg job = mk_msg(o, jobAttrs); IppMsg job = mk_msg(o, jobAttrs);
Bytestream contents = job.encode(IppMsg::PrintJob);
setBusyMessage(tr("Preparing"));
if((mimeType == targetFormat) && (targetFormat == Mimer::Postscript))
{ // Can't process Postscript
emit doJustUpload(filename, contents);
}
else if((mimeType == targetFormat) && (targetFormat == Mimer::Plaintext))
{
emit doFixupPlaintext(filename, contents);
}
else if((mimeType != Mimer::SVG) && mimer->isImage(mimeType) && mimer->isImage(targetFormat))
{ // Just make sure the image is in the desired format (and jpeg baseline-encoded), don't resize locally
emit doPrintImageAsImage(filename, contents, targetFormat);
}
else if(knownTargetFormat) // Params.format can be trusted
{
QString Sides = getAttrOrDefault(jobAttrs, "sides").toString(); QString Sides = getAttrOrDefault(jobAttrs, "sides").toString();
if(Sides=="two-sided-long-edge") if(Sides=="two-sided-long-edge")
@ -743,33 +719,7 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
Params.tumble = true; Params.tumble = true;
} }
if(mimeType == Mimer::PDF) emit doPrint(filename, mimeType, targetFormat, job, Params, margins);
{
emit doConvertPdf(filename, contents, Params);
}
else if(mimeType == Mimer::Plaintext)
{
emit doConvertPlaintext(filename, contents, Params);
}
else if (Mimer::isImage(mimeType))
{
emit doConvertImage(filename, contents, Params, margins);
}
else if(Mimer::isOffice(mimeType))
{
emit doConvertOfficeDocument(filename, contents, Params);
}
else
{
emit convertFailed(tr("Cannot convert this file format"));
}
}
else
{
emit convertFailed(tr("Cannot convert this file format"));
}
return;
} }
bool IppPrinter::getJobs() { bool IppPrinter::getJobs() {

View file

@ -72,6 +72,8 @@ signals:
void doConvertPlaintext(QString filename, Bytestream header, PrintParameters Params); void doConvertPlaintext(QString filename, Bytestream header, PrintParameters Params);
void doPrint(QString filename, QString mimeType, QString targetFormat, IppMsg job, PrintParameters Params, QMargins margins);
void doGetStrings(QUrl url); void doGetStrings(QUrl url);
void doGetImage(QUrl url); void doGetImage(QUrl url);

View file

@ -64,9 +64,66 @@ void PrinterWorker::identify(Bytestream msg)
cr.write((char*)msg.raw(), msg.size()); cr.write((char*)msg.raw(), msg.size());
} }
void PrinterWorker::print(QString filename, QString mimeType, QString targetFormat, IppMsg job, PrintParameters Params, QMargins margins)
{
try {
Mimer* mimer = Mimer::instance();
Bytestream contents = job.encode(IppMsg::PrintJob);
emit busyMessage(tr("Preparing"));
if((mimeType == targetFormat) && (targetFormat == Mimer::Postscript))
{ // Can't process Postscript
justUpload(filename, contents);
}
else if((mimeType == targetFormat) && (targetFormat == Mimer::Plaintext))
{
fixupPlaintext(filename, contents);
}
else if((mimeType != Mimer::SVG) && mimer->isImage(mimeType) && mimer->isImage(targetFormat))
{ // Just make sure the image is in the desired format (and jpeg baseline-encoded), don't resize locally
printImageAsImage(filename, contents, targetFormat);
}
else if(Params.format != PrintParameters::Invalid) // Params.format can be trusted
{
if(mimeType == Mimer::PDF)
{
convertPdf(filename, contents, Params);
}
else if(mimeType == Mimer::Plaintext)
{
convertPlaintext(filename, contents, Params);
}
else if(Mimer::isImage(mimeType))
{
convertImage(filename, contents, Params, margins);
}
else if(Mimer::isOffice(mimeType))
{
convertOfficeDocument(filename, contents, Params);
}
else
{
emit failed(tr("Cannot convert this file format"));
}
}
else
{
emit failed(tr("Cannot convert this file format"));
}
return;
}
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Print error") : e.what());
}
}
void PrinterWorker::justUpload(QString filename, Bytestream header) void PrinterWorker::justUpload(QString filename, Bytestream header)
{ {
try {
emit busyMessage(tr("Printing")); emit busyMessage(tr("Printing"));
CurlRequester cr(_printer->httpUrl()); CurlRequester cr(_printer->httpUrl());
@ -80,18 +137,15 @@ try {
OK(cr.write(tmp.data(), tmp.length())); OK(cr.write(tmp.data(), tmp.length()));
file.close(); file.close();
} }
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Upload error") : e.what());
}
}
void PrinterWorker::printImageAsImage(QString filename, Bytestream header, QString targetFormat) void PrinterWorker::printImageAsImage(QString filename, Bytestream header, QString targetFormat)
{ {
try {
QString imageFormat = ""; QString imageFormat = "";
QStringList supportedImageFormats = {Mimer::JPEG, Mimer::PNG}; QStringList supportedImageFormats = {Mimer::JPEG, Mimer::PNG};
qDebug() << ((IppPrinter*)parent())->_attrs;
if(targetFormat == Mimer::RBMP) if(targetFormat == Mimer::RBMP)
{ {
// ok // ok
@ -174,15 +228,9 @@ try {
OK(cr.write((char*)header.raw(), header.size())); OK(cr.write((char*)header.raw(), header.size()));
OK(cr.write((char*)OutBts.raw(), OutBts.size())); OK(cr.write((char*)OutBts.raw(), OutBts.size()));
} }
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Upload error") : e.what());
}
}
void PrinterWorker::fixupPlaintext(QString filename, Bytestream header) void PrinterWorker::fixupPlaintext(QString filename, Bytestream header)
{ {
try {
CurlRequester cr(_printer->httpUrl()); CurlRequester cr(_printer->httpUrl());
connect(&cr, &CurlRequester::done, _printer, &IppPrinter::printRequestFinished); connect(&cr, &CurlRequester::done, _printer, &IppPrinter::printRequestFinished);
@ -219,15 +267,9 @@ try {
OK(cr.write((char*)header.raw(), header.size())); OK(cr.write((char*)header.raw(), header.size()));
OK(cr.write(outData.data(), outData.length())); OK(cr.write(outData.data(), outData.length()));
} }
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Upload error") : e.what());
}
}
void PrinterWorker::convertPdf(QString filename, Bytestream header, PrintParameters Params) void PrinterWorker::convertPdf(QString filename, Bytestream header, PrintParameters Params)
{ {
try {
emit busyMessage(tr("Printing")); emit busyMessage(tr("Printing"));
CurlRequester cr(_printer->httpUrl()); CurlRequester cr(_printer->httpUrl());
@ -258,15 +300,9 @@ try {
qDebug() << "Finished"; qDebug() << "Finished";
} }
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Conversion error") : e.what());
}
}
void PrinterWorker::convertImage(QString filename, Bytestream header, PrintParameters Params, QMargins margins) void PrinterWorker::convertImage(QString filename, Bytestream header, PrintParameters Params, QMargins margins)
{ {
try {
QString mimeType = Mimer::instance()->get_type(filename); QString mimeType = Mimer::instance()->get_type(filename);
if(Params.format == PrintParameters::URF && (Params.hwResW != Params.hwResH)) if(Params.format == PrintParameters::URF && (Params.hwResW != Params.hwResH))
@ -412,18 +448,10 @@ try {
} }
qDebug() << "posted"; qDebug() << "posted";
}
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Conversion error") : e.what());
}
} }
void PrinterWorker::convertOfficeDocument(QString filename, Bytestream header, PrintParameters Params) void PrinterWorker::convertOfficeDocument(QString filename, Bytestream header, PrintParameters Params)
{ {
try {
if(Params.format == PrintParameters::URF && (Params.hwResW != Params.hwResH)) if(Params.format == PrintParameters::URF && (Params.hwResW != Params.hwResH))
{ // URF only supports symmetric resolutions { // URF only supports symmetric resolutions
qDebug() << "Unsupported URF resolution"; qDebug() << "Unsupported URF resolution";
@ -477,18 +505,10 @@ try {
convertPdf(tmpPdfFile.fileName(), header, Params); convertPdf(tmpPdfFile.fileName(), header, Params);
qDebug() << "posted"; qDebug() << "posted";
}
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Conversion error") : e.what());
}
} }
void PrinterWorker::convertPlaintext(QString filename, Bytestream header, PrintParameters Params) void PrinterWorker::convertPlaintext(QString filename, Bytestream header, PrintParameters Params)
{ {
try {
if(!PaperSizes.contains(Params.paperSizeName.c_str())) if(!PaperSizes.contains(Params.paperSizeName.c_str()))
{ {
qDebug() << "Unsupported paper size" << Params.paperSizeName.c_str(); qDebug() << "Unsupported paper size" << Params.paperSizeName.c_str();
@ -629,10 +649,4 @@ try {
qDebug() << "Finished"; qDebug() << "Finished";
qDebug() << "posted"; qDebug() << "posted";
}
catch(const ConvertFailedException& e)
{
emit failed(e.what() == QString("") ? tr("Conversion error") : e.what());
}
} }

View file

@ -2,6 +2,7 @@
#define PRINTERWORKER_H #define PRINTERWORKER_H
#include <QObject> #include <QObject>
#include "curlrequester.h" #include "curlrequester.h"
#include "ippmsg.h"
#include "ppm2pwg/printparameters.h" #include "ppm2pwg/printparameters.h"
class IppPrinter; class IppPrinter;
@ -37,20 +38,7 @@ public slots:
void getJobs(Bytestream msg); void getJobs(Bytestream msg);
void cancelJob(Bytestream msg); void cancelJob(Bytestream msg);
void identify(Bytestream msg); void identify(Bytestream msg);
void print(QString filename, QString mimeType, QString targetFormat, IppMsg job, PrintParameters Params, QMargins margins);
void justUpload(QString filename, Bytestream header);
void printImageAsImage(QString filename, Bytestream header, QString targetFormat);
void fixupPlaintext(QString filename, Bytestream header);
void convertPdf(QString filename, Bytestream header, PrintParameters Params);
void convertImage(QString filename, Bytestream header, PrintParameters Params, QMargins margins);
void convertOfficeDocument(QString filename, Bytestream header, PrintParameters Params);
void convertPlaintext(QString filename, Bytestream header, PrintParameters Params);
signals: signals:
void progress(qint64 done, qint64 pages); void progress(qint64 done, qint64 pages);
@ -58,6 +46,13 @@ signals:
void failed(QString message); void failed(QString message);
private: private:
void justUpload(QString filename, Bytestream header);
void printImageAsImage(QString filename, Bytestream header, QString targetFormat);
void fixupPlaintext(QString filename, Bytestream header);
void convertPdf(QString filename, Bytestream header, PrintParameters Params);
void convertImage(QString filename, Bytestream header, PrintParameters Params, QMargins margins);
void convertOfficeDocument(QString filename, Bytestream header, PrintParameters Params);
void convertPlaintext(QString filename, Bytestream header, PrintParameters Params);
IppPrinter* _printer; IppPrinter* _printer;

View file

@ -291,18 +291,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation>Öffnen der Datei fehlgeschlagen</translation> <translation>Öffnen der Datei fehlgeschlagen</translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation>Dateiformat konnte nicht konvertiert werden</translation>
</message>
<message> <message>
<source>Unknown document format</source> <source>Unknown document format</source>
<translation>Unbekanntes Dokumentenformat</translation> <translation>Unbekanntes Dokumentenformat</translation>
</message> </message>
<message>
<source>Preparing</source>
<translation>Vorbereiten</translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation>Nicht unterstütztes Papierformat</translation> <translation>Nicht unterstütztes Papierformat</translation>
@ -484,10 +476,6 @@ auf diesem Drucker</translation>
</context> </context>
<context> <context>
<name>PrinterWorker</name> <name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Konvertierungsfehler</translation>
</message>
<message> <message>
<source>Failed to load image</source> <source>Failed to load image</source>
<translation>Bild konnte nicht geladen werden</translation> <translation>Bild konnte nicht geladen werden</translation>
@ -517,11 +505,19 @@ auf diesem Drucker</translation>
<translation>Konvertierung fehlgeschlagen</translation> <translation>Konvertierung fehlgeschlagen</translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation>Übertragungsfehler</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation>Vorbereiten</translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation>Dateiformat konnte nicht konvertiert werden</translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -291,18 +291,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation>Error al abrir archivo</translation> <translation>Error al abrir archivo</translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation>No se puede convertir este formato de archivo</translation>
</message>
<message> <message>
<source>Unknown document format</source> <source>Unknown document format</source>
<translation>Formato de documento desconocido</translation> <translation>Formato de documento desconocido</translation>
</message> </message>
<message>
<source>Preparing</source>
<translation>Preparando</translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation>Tamaño de papel no soportado</translation> <translation>Tamaño de papel no soportado</translation>
@ -483,10 +475,6 @@
</context> </context>
<context> <context>
<name>PrinterWorker</name> <name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Error de conversión</translation>
</message>
<message> <message>
<source>Failed to load image</source> <source>Failed to load image</source>
<translation>Error al cargar imagen</translation> <translation>Error al cargar imagen</translation>
@ -516,11 +504,19 @@
<translation>Fallo en la conversión</translation> <translation>Fallo en la conversión</translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation>Error de carga</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation>Preparando</translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation>No se puede convertir este formato de archivo</translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -291,18 +291,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation>Échec de l&apos;ouverture du fichier</translation> <translation>Échec de l&apos;ouverture du fichier</translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation>Impossible de convertir ce format de fichier</translation>
</message>
<message> <message>
<source>Unknown document format</source> <source>Unknown document format</source>
<translation>Format de document inconnu</translation> <translation>Format de document inconnu</translation>
</message> </message>
<message>
<source>Preparing</source>
<translation>En cours de préparation</translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation>Taille de papier non prise en charge</translation> <translation>Taille de papier non prise en charge</translation>
@ -484,10 +476,6 @@ sur cette imprimante</translation>
</context> </context>
<context> <context>
<name>PrinterWorker</name> <name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Erreur de conversion</translation>
</message>
<message> <message>
<source>Failed to load image</source> <source>Failed to load image</source>
<translation>Chargement impossible de l&apos;image</translation> <translation>Chargement impossible de l&apos;image</translation>
@ -517,11 +505,19 @@ sur cette imprimante</translation>
<translation>Échec de la conversion</translation> <translation>Échec de la conversion</translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation>Erreur de chargement</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation>En cours de préparation</translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation>Impossible de convertir ce format de fichier</translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -291,18 +291,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation>Bestand openen mislukt</translation> <translation>Bestand openen mislukt</translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation>Kan dit bestandsformaat niet converteren</translation>
</message>
<message> <message>
<source>Unknown document format</source> <source>Unknown document format</source>
<translation>Onbekend documentformaat</translation> <translation>Onbekend documentformaat</translation>
</message> </message>
<message>
<source>Preparing</source>
<translation>Voorbereiden</translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation>Niet-ondersteund papierformaat</translation> <translation>Niet-ondersteund papierformaat</translation>
@ -483,10 +475,6 @@
</context> </context>
<context> <context>
<name>PrinterWorker</name> <name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Conversiefout</translation>
</message>
<message> <message>
<source>Failed to load image</source> <source>Failed to load image</source>
<translation>Afbeelding laden mislukt</translation> <translation>Afbeelding laden mislukt</translation>
@ -516,11 +504,19 @@
<translation>Conversie mislukt</translation> <translation>Conversie mislukt</translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation>Uploadfout</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation>Voorbereiden</translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation>Kan dit bestandsformaat niet converteren</translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -295,14 +295,6 @@
<source>Unknown document format</source> <source>Unknown document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preparing</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -491,10 +483,6 @@
<source>Unsupported PDF paper size</source> <source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Conversion error</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -516,11 +504,19 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -291,18 +291,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Cannot convert this file format</source>
<translation></translation>
</message>
<message> <message>
<source>Unknown document format</source> <source>Unknown document format</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Preparing</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Unsupported paper size</source> <source>Unsupported paper size</source>
<translation></translation> <translation></translation>
@ -483,10 +475,6 @@
</context> </context>
<context> <context>
<name>PrinterWorker</name> <name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation></translation>
</message>
<message> <message>
<source>Failed to load image</source> <source>Failed to load image</source>
<translation></translation> <translation></translation>
@ -516,11 +504,19 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Upload error</source> <source>Unknown target format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Unknown target format</source> <source>Preparing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot convert this file format</source>
<translation></translation>
</message>
<message>
<source>Print error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>