Skip to content

Commit a7c300b

Browse files
committed
.
1 parent 96cae92 commit a7c300b

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

src/main.qml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ import org.kde.kirigami as Kirigami
77
Kirigami.ApplicationWindow {
88
id: root
99

10+
function install_button() {
11+
switch (installer.action) {
12+
case DebInstaller.Install:
13+
return installer.i18n("Install");
14+
case DebInstaller.Upgrade:
15+
return installer.i18n("Upgrade");
16+
case DebInstaller.ReInstall:
17+
return installer.i18n("Reinstall");
18+
case DebInstaller.Downgrade:
19+
return installer.i18n("Downgrade");
20+
default:
21+
return installer.i18n("Install");
22+
}
23+
}
24+
1025
visible: true
1126
width: 620
1227
height: 420
@@ -30,20 +45,7 @@ Kirigami.ApplicationWindow {
3045
title: installer.package
3146
actions: [
3247
Kirigami.Action {
33-
text: {
34-
switch (installer.action) {
35-
case DebInstaller.Install:
36-
return installer.i18n("Install");
37-
case DebInstaller.Upgrade:
38-
return installer.i18n("Upgrade");
39-
case DebInstaller.ReInstall:
40-
return installer.i18n("Reinstall");
41-
case DebInstaller.Downgrade:
42-
return installer.i18n("Downgrade");
43-
default:
44-
return installer.i18n("Install");
45-
}
46-
}
48+
text: root.install_button()
4749
icon.name: "document-save"
4850
visible: !installer.is_installing && !installer.finished
4951
enabled: !installer.isInstalling
@@ -67,7 +69,7 @@ Kirigami.ApplicationWindow {
6769
spacing: Kirigami.Units.smallSpacing
6870

6971
Controls.Label {
70-
text: installer.i18n_with_arg("Welcome to the software package installation wizard.\n\nPlease note that many 3rd-party software packages are not tested nor verified by your distribution maintainers (they may not function as expected, or may contain malicious content).\n\nTo install the package, press \"{}\" below and you will be prompted for administrative password.", installer.i18n("Install"))
72+
text: installer.i18n_with_arg("Welcome to the software package installation wizard.\n\nPlease note that many 3rd-party software packages are not tested nor verified by your distribution maintainers (they may not function as expected, or may contain malicious content).\n\nTo install the package, press \"{}\" below and you will be prompted for administrative password.", root.install_button())
7173
wrapMode: Text.WordWrap
7274
Layout.fillWidth: true
7375
}

0 commit comments

Comments
 (0)