Handle empty printer name in more places

This commit is contained in:
Anton Thomasson 2022-01-04 19:29:03 +01:00
parent 47fb9c8555
commit a78e2c4449
12 changed files with 6 additions and 33 deletions

View file

@ -1,5 +1,6 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
import "utils.js" as Utils
Page {
@ -17,7 +18,7 @@ Page {
PageHeader {
id: header
title: printer.attrs["printer-name"].value
title: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
}
TextArea {

View file

@ -19,7 +19,7 @@ Page {
width: Math.min(Screen.width, detailsFlickable.width)-2*Theme.paddingLarge
PageHeader {
title: qsTr("Details")
description: printer.attrs["printer-name"].value
description: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
}
// TODO:

View file

@ -146,7 +146,7 @@ Page {
visible: Object.keys(printer.attrs).length !== 0
property string name: printer.attrs["printer-name"].value != "" ? printer.attrs["printer-name"].value : qsTr("Unknown")
property string name: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
property var supported_formats: Utils.supported_formats(printer, considerAdditionalFormatsSetting.value)
property bool canPrint: supported_formats.mimetypes.indexOf(selectedFileType) != -1

View file

@ -51,7 +51,7 @@ Page {
header: PageHeader {
id: pageHeader
title: printer.attrs["printer-name"].value
title: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
description: printer.jobs.length==1 ? printer.jobs.length+" "+qsTr("job") : printer.jobs.length+" "+qsTr("jobs")
}

View file

@ -85,7 +85,7 @@ Page {
PageHeader {
id: pageHeader
title: printer.attrs["printer-name"].value
title: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
description: Utils.basename(selectedFile)
}

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation>Über SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation>Unbekannt</translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation>Keine kompatiblen Formate unterstützt</translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation>Acerca de SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation>Desconocido</translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation>No admite formatos compatibles</translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation>À propos de SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation>Inconnu</translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation>Aucun format compatible supporté</translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation>Over SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation>Onbekend</translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation>Geen ondersteunde formaten beschikbaar</translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation>O SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nieznany</translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation>Brak obsługiwanych kompatybilnych formatów</translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation> SeaPrint</translation>
</message>
<message>
<source>Unknown</source>
<translation></translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation></translation>

View file

@ -283,10 +283,6 @@
<source>About SeaPrint</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No compatible formats supported</source>
<translation type="unfinished"></translation>