Simple check for negative process.exitCode when active download is cancelled re #41 (#42)

* slight improvements to italian

* some corrections thanks to Alessandro Volturno

* consistently dithering is better than inconsistency

* Simple check for negative process.exitCode when active download is cancelled re #41

* added cancel download to pot

* Suggested translations added to existing lanquages

* First addition missed the italian evolution

Co-authored-by: Phil Clifford <philip.clifford@gmail.com>
Co-authored-by: Yannick Mauray <yannick.mauray@gmail.com>
This commit is contained in:
Ben Hall 2021-12-09 20:42:42 +00:00 committed by GitHub
parent 847b12108d
commit 35f11fbf67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 7 deletions

View File

@ -3,14 +3,14 @@ msgid ""
msgstr ""
"Project-Id-Version: quickgui\n"
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
"PO-Revision-Date: 2021-11-14 23:05+0100\n"
"PO-Revision-Date: 2021-12-02 20:24+0000\n"
"Last-Translator: Philipp Kiemle <philipp.kiemle@gmail.com>\n"
"Language-Team: German <philipp.kiemle@gmail.com>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 21.08.3\n"
"X-Generator: Poedit 3.0\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@ -56,6 +56,9 @@ msgstr "Herunterladen …{0}%"
msgid "Downloading {0}"
msgstr "{0} wird herunterladen"
msgid "Download cancelled"
msgstr "Download abgebrochen"
msgid "Download complete"
msgstr "Download abgeschlossen"

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: quickgui\n"
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
"PO-Revision-Date: 2021-11-11 16:44+0100\n"
"PO-Revision-Date: 2021-12-02 20:23+0000\n"
"Last-Translator: Yannick Mauray\n"
"Language-Team: Yannick Mauray\n"
"Language: fr\n"
@ -69,6 +69,9 @@ msgstr "Téléchargement...{0}%"
msgid "Downloading {0}"
msgstr "Téléchargement de {0}"
msgid "Download cancelled"
msgstr "Téléchargement annulé"
#, fuzzy
msgid "Download complete"
msgstr "Téléchargement terminé"

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: quickgui\n"
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
"PO-Revision-Date: 2021-11-22 20:13+0000\n"
"Last-Translator: \n"
"PO-Revision-Date: 2021-12-02 20:24+0000\n"
"Last-Translator: Phil Clifford <philip.clifford@gmail.com>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -60,6 +60,9 @@ msgstr "Scaricando...{0}%"
msgid "Downloading {0}"
msgstr "Scaricamento di {0}"
msgid "Download cancelled"
msgstr "Scaricamento interrotto"
msgid "Download complete"
msgstr "Scaricamento completato"

View File

@ -55,6 +55,9 @@ msgstr ""
msgid "Downloading {0}"
msgstr ""
msgid "Download cancelled"
msgstr ""
msgid "Download complete"
msgstr ""

View File

@ -81,12 +81,18 @@ class _DownloaderState extends State<Downloader> {
}
process.exitCode.then((value) {
bool _cancelled = value.isNegative;
controller.close();
setState(() {
_downloadFinished = true;
notificationsClient.notify(
context.t('Download complete'),
body: context.t('Download of {0} has completed.', args: [widget.operatingSystem.name]),
_cancelled ? context.t('Download cancelled') : context.t('Download complete'),
body: _cancelled
? context.t(
'Download of {0} has completed.',
args: [widget.operatingSystem.name],
)
: context.t('Download cancelled.'),
appName: 'Quickgui',
expireTimeoutMs: 10000, /* 10 seconds */
);