Handle empty printer name in more places
This commit is contained in:
parent
47fb9c8555
commit
a78e2c4449
12 changed files with 6 additions and 33 deletions
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import Sailfish.Silica 1.0
|
import Sailfish.Silica 1.0
|
||||||
|
import "utils.js" as Utils
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@ Page {
|
||||||
|
|
||||||
PageHeader {
|
PageHeader {
|
||||||
id: header
|
id: header
|
||||||
title: printer.attrs["printer-name"].value
|
title: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
|
||||||
}
|
}
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
|
|
|
@ -19,7 +19,7 @@ Page {
|
||||||
width: Math.min(Screen.width, detailsFlickable.width)-2*Theme.paddingLarge
|
width: Math.min(Screen.width, detailsFlickable.width)-2*Theme.paddingLarge
|
||||||
PageHeader {
|
PageHeader {
|
||||||
title: qsTr("Details")
|
title: qsTr("Details")
|
||||||
description: printer.attrs["printer-name"].value
|
description: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
|
@ -146,7 +146,7 @@ Page {
|
||||||
|
|
||||||
visible: Object.keys(printer.attrs).length !== 0
|
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 var supported_formats: Utils.supported_formats(printer, considerAdditionalFormatsSetting.value)
|
||||||
property bool canPrint: supported_formats.mimetypes.indexOf(selectedFileType) != -1
|
property bool canPrint: supported_formats.mimetypes.indexOf(selectedFileType) != -1
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ Page {
|
||||||
|
|
||||||
header: PageHeader {
|
header: PageHeader {
|
||||||
id: 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")
|
description: printer.jobs.length==1 ? printer.jobs.length+" "+qsTr("job") : printer.jobs.length+" "+qsTr("jobs")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ Page {
|
||||||
|
|
||||||
PageHeader {
|
PageHeader {
|
||||||
id: pageHeader
|
id: pageHeader
|
||||||
title: printer.attrs["printer-name"].value
|
title: Utils.unknownForEmptyString(printer.attrs["printer-name"].value)
|
||||||
description: Utils.basename(selectedFile)
|
description: Utils.basename(selectedFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>Über SeaPrint</translation>
|
<translation>Über SeaPrint</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>Unbekannt</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>Keine kompatiblen Formate unterstützt</translation>
|
<translation>Keine kompatiblen Formate unterstützt</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>Acerca de SeaPrint</translation>
|
<translation>Acerca de SeaPrint</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>Desconocido</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>No admite formatos compatibles</translation>
|
<translation>No admite formatos compatibles</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>À propos de SeaPrint</translation>
|
<translation>À propos de SeaPrint</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>Inconnu</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>Aucun format compatible supporté</translation>
|
<translation>Aucun format compatible supporté</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>Over SeaPrint</translation>
|
<translation>Over SeaPrint</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>Onbekend</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>Geen ondersteunde formaten beschikbaar</translation>
|
<translation>Geen ondersteunde formaten beschikbaar</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>O SeaPrint</translation>
|
<translation>O SeaPrint</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>Nieznany</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>Brak obsługiwanych kompatybilnych formatów</translation>
|
<translation>Brak obsługiwanych kompatybilnych formatów</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation>关于 SeaPrint(海印)</translation>
|
<translation>关于 SeaPrint(海印)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation>未知</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation>不支持相关格式</translation>
|
<translation>不支持相关格式</translation>
|
||||||
|
|
|
@ -283,10 +283,6 @@
|
||||||
<source>About SeaPrint</source>
|
<source>About SeaPrint</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Unknown</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>No compatible formats supported</source>
|
<source>No compatible formats supported</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
|
Loading…
Reference in a new issue