From 7385dd0838eefcfa789f60cb31f76c2e0968db55 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Mon, 23 Nov 2020 19:23:20 +0100 Subject: [PATCH] Add update notification support --- i18n/rpi-imager_de.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_en.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_fr.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_it.ts | 76 +++++++++++++++++++++++----------------- i18n/rpi-imager_nl.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_sk.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_tr.ts | 74 +++++++++++++++++++++----------------- i18n/rpi-imager_zh_cn.ts | 74 +++++++++++++++++++++----------------- imagewriter.cpp | 7 ++++ imagewriter.h | 3 ++ main.qml | 23 ++++++++++++ 11 files changed, 370 insertions(+), 257 deletions(-) diff --git a/i18n/rpi-imager_de.ts b/i18n/rpi-imager_de.ts index fb29ac3..4fcd585 100644 --- a/i18n/rpi-imager_de.ts +++ b/i18n/rpi-imager_de.ts @@ -91,22 +91,22 @@ Bitte stellen Sie sicher, dass 'Raspberry Pi Imager' Zugriff auf &apos Fehler beim Löschen des letzten Teiles der Speicherkarte.<br>Die Speicherkarte könnte mit einer falschen Größe beworben sein (möglicherweise Betrug). - + starting download - + Error reading from storage.<br>SD card may be broken. Fehler beim Lesen vom Speicher.<br>Die SD-Karte könnte kaputt sein. - + Access denied error while writing file to disk. Zugriff verweigert-Fehler beim Schreiben auf den Datenträger. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. I don't use Windows either. What is "Controlled Folder Access" in the German version? @@ -114,37 +114,37 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i - + Error writing file to disk Fehler beim Schreiben der Datei auf den Speicher - + Error downloading: %1 - + Download corrupt. Hash does not match Download beschädigt. Prüfsumme stimmt nicht überein - + Error writing to storage (while flushing) Fehler beim Schreiben auf den Speicher (während flushing) - + Error writing to storage (while fsync) Fehler beim Schreiben auf den Speicher (während fsync) - + Error writing first block (partition table) Fehler beim Schreiben auf des ersten Blocks (Partitionstabelle) - + Verifying write failed. Contents of SD card is different from what was written to it. Verifizierung fehlgeschlagen. Der Inhalt der SD-Karte weicht von dem Inhalt ab, der geschrieben werden sollte. @@ -207,22 +207,22 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. Die Speicherkapazität ist nicht groß genug.<br>Sie muss mindestens %1 GB betragen. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Die Eingabedatei ist kein gültiges Disk-Image.<br>Die Dateigröße%1 Bytes ist kein Vielfaches von 512 Bytes. - + Downloading and writing image Image herunterladen und schreiben - + Select image Image wählen @@ -297,7 +297,7 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i - + CHOOSE SD CARD SD-KARTE WÄHLEN @@ -323,7 +323,7 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i - + Cancelling... Abbrechen... @@ -334,14 +334,14 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i - - + + Finalizing... Finalisieren... - + Erase Löschen @@ -423,7 +423,17 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Writing... %1% Schreiben... %1% @@ -433,53 +443,53 @@ Controlled Folder Access sheint aktiviert zu sein. Bitte fügen Sie sowohl rpi-i Alle vorhandenen Daten auf '%1' werden gelöscht.<br>Möchten sie wirklich fortfahren? - + Error downloading OS list from Internet Fehler beim Herunterladen der Betriebssystemsliste aus dem Internet - + Verifying... %1% Verifizierung... %1% - + Preparing to write... (%1) - + Error Fehler - + Write Successful Schreiben erfolgreich - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1</b> wurde geleert<br><br>Sie können die SD-Karte nun aus dem Lesegerät entfernen - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> wurde auf<b>%2</b> geschrieben<br><br>Sie können die SD-Karte nun aus dem Lesegerät entfernen - - + + Error parsing os_list.json Fehler beim Parsen von os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Verbinden Sie zuerst einen USB-Stick mit Images.<br>Die Images müssen sich im Wurzelverzeichnes des USB-Sticks befinden. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. Die Speicherkarte ist schreibgeschützt.<br>Drücken Sie den Schutzschalter auf der linken Seite nach oben, und versuchen Sie es erneut. diff --git a/i18n/rpi-imager_en.ts b/i18n/rpi-imager_en.ts index 49df9cc..49311cd 100644 --- a/i18n/rpi-imager_en.ts +++ b/i18n/rpi-imager_en.ts @@ -78,42 +78,42 @@ - + Error reading from storage.<br>SD card may be broken. - + Access denied error while writing file to disk. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. - + Error writing file to disk - + Error downloading: %1 - + Error writing to storage (while flushing) - + Error writing to storage (while fsync) - + Download corrupt. Hash does not match @@ -128,17 +128,17 @@ - + starting download - + Error writing first block (partition table) - + Verifying write failed. Contents of SD card is different from what was written to it. @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. - + Downloading and writing image - + Select image @@ -291,7 +291,7 @@ - + CHOOSE SD CARD @@ -317,7 +317,7 @@ - + Cancelling... @@ -328,14 +328,14 @@ - - + + Finalizing... - + Erase @@ -417,7 +417,17 @@ - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Writing... %1% @@ -427,53 +437,53 @@ - + Error downloading OS list from Internet - + Verifying... %1% - + Preparing to write... (%1) - + Error - + Write Successful - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader - - + + Error parsing os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. diff --git a/i18n/rpi-imager_fr.ts b/i18n/rpi-imager_fr.ts index 7346660..c4896b8 100644 --- a/i18n/rpi-imager_fr.ts +++ b/i18n/rpi-imager_fr.ts @@ -78,42 +78,42 @@ Erreur d'écriture lors du formatage du MBR - + Error reading from storage.<br>SD card may be broken. Erreur de lecture du stockage.<br>La carte SD pourrait être défectueuse. - + Access denied error while writing file to disk. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. - + Error writing file to disk - + Error downloading: %1 - + Error writing to storage (while flushing) Erreur d'écriture dans le stockage (lors du formatage) - + Error writing to storage (while fsync) Erreur d'écriture dans le stockage (pendant l'exécution de fsync) - + Download corrupt. Hash does not match Téléchargement corrompu. La signature ne correspond pas @@ -128,17 +128,17 @@ Erreur d'écriture lors de la tentative de formatage de la dernière partie de la carte.<br>Le stockage pourrait annoncer une mauvaise capacité (contrefaçon possible). - + starting download - + Error writing first block (partition table) Erreur lors de l'écriture du premier bloc (table de partion) - + Verifying write failed. Contents of SD card is different from what was written to it. La vérification de l'écriture à échoué. Le contenu de la carte SD est différent de ce qui y a été écrit. @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. La capacité de stockage n'est pas assez grande.<br>Elle nécessite d'être d'au moins %1 GO. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Le fichier source n'est pas une image disque valide.<br>La taille du fichier (d'%1 octets) n'est pas un multiple de 512 octets. - + Downloading and writing image Téléchargement et écriture de l'image - + Select image Sélectionnez l'image @@ -291,7 +291,7 @@ - + CHOOSE SD CARD CHOISISSEZ LA CARTE SD @@ -317,7 +317,7 @@ - + Cancelling... Annulation... @@ -328,14 +328,14 @@ - - + + Finalizing... Finalisation... - + Erase Formatter @@ -412,12 +412,22 @@ - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Preparing to write... (%1) - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. @@ -427,7 +437,7 @@ Attention - + Writing... %1% Écriture... %1% @@ -437,43 +447,43 @@ Toutes les données sur le stockage '%1' vont être supprimées.<br>Êtes-vous sûr de vouloir continuer ? - + Error downloading OS list from Internet Erreur lors du téléchargement de la liste des systèmes d'exploitation à partir d'Internet - + Verifying... %1% Vérification... %1% - + Error Erreur - + Write Successful Écriture réussie - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1</b> a bien été formaté<br><br>Vous pouvez retirer la carte SD du lecteur. - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> a bien été écrit sur <b>%2</b><br><br>Vous pouvez retirer la carte SD du lecteur. - - + + Error parsing os_list.json Erreur de lecture du fichier os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Connectez en premier une clé USB contenant les images.<br>Les images doivent se trouver dans le dossier racine de la clé USB. diff --git a/i18n/rpi-imager_it.ts b/i18n/rpi-imager_it.ts index 38b2fee..8211180 100644 --- a/i18n/rpi-imager_it.ts +++ b/i18n/rpi-imager_it.ts @@ -70,7 +70,7 @@ zeroing out first and last MB of drive - azzera il primo e l'ultimo MB dell'unità + azzera il primo e l'ultimo MB dell'unità @@ -78,43 +78,43 @@ Errore scrittura durante azzeramento MBR - + Error reading from storage.<br>SD card may be broken. Errore lettura dallo storage.<br>La scheda SD potrebbe essere danneggiata. - + Access denied error while writing file to disk. Errore accesso negato durante la scrittura del file su disco. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. Sembra sia abilitato l'accesso controllato alle cartelle. Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all'elenco delle app consentite e riprova. - + Error writing file to disk Errore scrittura file su disco - + Error downloading: %1 Errore download: %1 - + Error writing to storage (while flushing) Errore scrittura nello storage (durante fluhisng) - + Error writing to storage (while fsync) Errore scrittura nello storage (durante fsync) - + Download corrupt. Hash does not match Downlaod corrotto.<br>L'hash non corrisponde @@ -129,17 +129,17 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos Errore di scrittura durante il tentativo di azzerare l'ultima parte della scheda.<br>La scheda potrebbe riportare una capacità maggiore di quella reale (possibile contraffazione). - + starting download avvio download - + Error writing first block (partition table) Errore scrittura primo blocco (tabella partizione) - + Verifying write failed. Contents of SD card is different from what was written to it. Verifica scrittura fallita.<br>Il contenuto della SD è differente da quello che vi è stato scritto. @@ -202,22 +202,22 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. La capacità dello storage non è sufficiente.<br>Sono necessari almeno %1 GB. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Il file sorgente non è un'immagine disco valida.<br>La dimensione file %1 non è un multiplo di 512 byte. - + Downloading and writing image Download e scrittura file immagine - + Select image Seleziona file immagine @@ -292,7 +292,7 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos - + CHOOSE SD CARD SCEGLI SCHEDA SD @@ -318,7 +318,7 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos - + Cancelling... Annullamento... @@ -329,14 +329,14 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos - - + + Finalizing... Finalizzazione... - + Erase Cancella @@ -418,7 +418,17 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos Preparazione scrittura... - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Writing... %1% Scrittura...%1 @@ -428,53 +438,53 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos Tutti i dati esistenti in '%1' verranno eliminati.<br>Sei sicuro di voler continuare? - + Error downloading OS list from Internet Errore durante download elenco SO da internet - + Verifying... %1% Verifica...%1 - + Preparing to write... (%1) Preparazione scrittura... (%1) - + Error Errore - + Write Successful Scrittura completata senza errori - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader Azzeramento di <b>%1</b> completato<br><br>Ora puoi rimuovere la scheda SD dal lettore - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader Scrittura di <b>%1</b> in <b>%2</b>completata<br><br>Ora puoi rimuovere la scheda SD dal lettore - - + + Error parsing os_list.json Errore durante analisi file os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Prima collega una chiavetta USB contenente il file immagine.<br>Il file immagine deve essere presente nella cartella principale della chiavetta USB. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. La scheda SD è protetta da scrittura.<br>Sposta verso l'alto l'interruttore LOCK sul lato sinistro della scheda SD e riprova. diff --git a/i18n/rpi-imager_nl.ts b/i18n/rpi-imager_nl.ts index 82c409a..f17839a 100644 --- a/i18n/rpi-imager_nl.ts +++ b/i18n/rpi-imager_nl.ts @@ -78,42 +78,42 @@ Fout bij wissen MBR - + Error reading from storage.<br>SD card may be broken. Fout bij lezen van SD kaart.<br>Kaart is mogelijk defect. - + Access denied error while writing file to disk. Toegang geweigerd bij het schrijven naar opslag. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. Controller Folder Access lijkt aan te staan. Gelieve zowel rpi-imager.exe als fat32format.exe toe te voegen aan de lijst met uitsluitingen en het nogmaals te proberen. - + Error writing file to disk Fout bij schrijven naar opslag - + Error downloading: %1 Fout bij downloaden: %1 - + Error writing to storage (while flushing) Fout bij schrijven naar opslag (tijdens flushen) - + Error writing to storage (while fsync) Fout bij schrijven naar opslag (tijdens fsync) - + Download corrupt. Hash does not match Download corrupt. Hash komt niet overeen @@ -128,17 +128,17 @@ Fout bij wissen laatste deel van de SD kaart.<br>Kaart geeft mogelijk onjuiste capaciteit aan (mogelijk counterfeit). - + starting download beginnen met downloaden - + Error writing first block (partition table) Fout bij schrijven naar eerste deel van kaart (partitie tabel) - + Verifying write failed. Contents of SD card is different from what was written to it. Verificatie mislukt. De gegevens die op de SD kaart staan wijken af van wat er naar geschreven is. @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. Opslagcapaciteit niet groot genoeg.<br>Deze dient minimaal %1 GB te zijn. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Invoerbestand is geen disk image.<br>Bestandsgrootte %1 bytes is geen veelvoud van 512 bytes. - + Downloading and writing image Downloaden en schrijven van image - + Select image Selecteer image @@ -296,7 +296,7 @@ - + CHOOSE SD CARD SELECTEER SD KAART @@ -306,7 +306,7 @@ SCHRIJF - + Writing... %1% Schrijven... %1% @@ -332,7 +332,7 @@ - + Cancelling... Annuleren... @@ -343,14 +343,14 @@ - - + + Finalizing... Afronden... - + Erase Wissen @@ -395,28 +395,38 @@ Alle bestaande gegevens op '%1' zullen verwijderd worden.<br>Weet u zeker dat u door wilt gaan? - + + Update available + Update beschikbaar + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + Er is een nieuwere versie van Imager beschikbaar.<br>Wilt u de website bezoeken om deze te downloaden? + + + Preparing to write... (%1) Voorbereiden... (%1) - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1</b> is gewist<br><br>U kunt nu de SD kaart uit de lezer halen - - + + Error parsing os_list.json Fout bij parsen os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Sluit eerst een USB stick met images aan.<br>De images moeten in de hoofdmap van de USB stick staan. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. SD kaart is tegen schrijven beveiligd.<br>Druk het schuifje aan de linkerkant van de SD kaart omhoog, en probeer nogmaals. @@ -453,27 +463,27 @@ Mounted op %1 - + Error downloading OS list from Internet Fout bij downloaden van lijst met besturingssystemen - + Verifying... %1% Verifiëren... %1% - + Error Fout - + Write Successful Klaar met schrijven - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> is geschreven naar <b>%2</b><br><br>U kunt nu de SD kaart uit de lezer halen diff --git a/i18n/rpi-imager_sk.ts b/i18n/rpi-imager_sk.ts index 83a2c22..172f723 100644 --- a/i18n/rpi-imager_sk.ts +++ b/i18n/rpi-imager_sk.ts @@ -78,42 +78,42 @@ Chyba zápisu pri prepisovaní MBR nulami - + Error reading from storage.<br>SD card may be broken. Chyba pri čítaní z úložiska.<br>Karta SD môže byť poškodená. - + Access denied error while writing file to disk. Odopretý prístup pri zápise súboru na disk. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. Vyzerá, že máte zapnutý Controlled Folder Access. Pridajte, prosím, rpi-imager.exe a fat32format.exe do zoznamu povolených aplikácií a skúste to znovu. - + Error writing file to disk Chyba pri zápise na disk - + Error downloading: %1 - + Error writing to storage (while flushing) Chyba pri zápise na úložisko (počas volania flush) - + Error writing to storage (while fsync) Chyba pri zápise na úložisko (počas volania fsync) - + Download corrupt. Hash does not match Stiahnutý súbor je poškodený. Kontrolný súčet nesedí @@ -128,17 +128,17 @@ Chyba zápisu pri prepisovaní poslednej časti karty nulami.<br>Karta pravdepodobne udáva nesprávnu kapacitu (a môže byť falošná). - + starting download - + Error writing first block (partition table) Chyba pri zápise prvého bloku (tabuľky partícií) - + Verifying write failed. Contents of SD card is different from what was written to it. Overovanie zápisu skončilo s chybou. Obsah karty SD sa nezhoduje s tým, čo na ňu bolo zapísané. @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. Kapacita úložiska je nedostatočná<br>Musí byť aspoň %1 GB. - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Vstupný súbor nie je platným obrazom disku.<br>Veľkosť súboru %1 bajtov nie je násobkom 512 bajtov. - + Downloading and writing image Sťahujem a zapisujem obraz - + Select image Vyberte obraz @@ -296,7 +296,7 @@ - + CHOOSE SD CARD VYBERTE SD KARTU @@ -306,7 +306,7 @@ ZÁPIS - + Writing... %1% Zapisujem... %1% @@ -332,7 +332,7 @@ - + Cancelling... Ruším operáciu... @@ -343,14 +343,14 @@ - - + + Finalizing... Ukončujem... - + Erase Vymazať @@ -395,28 +395,38 @@ Všetky existujúce dáta na '%1' budú odstránené.<br>Naozaj chcete pokračovať? - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Preparing to write... (%1) - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1</b> bola vymazaná<br><br>Teraz môžete odstrániť SD kartu z čítačky - - + + Error parsing os_list.json Chyba pri spracovaní os_list.json - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Najprv pripojte USB kľúč, ktorý obsahuje diskové obrazy.<br>Obrazy sa musia nachádzať v koreňovom priečinku USB kľúča. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. SD karta je chránená proti zápisu.<br>Presuňte prepínač zámku na ľavej strane karty smerom hore a skúste to znova. @@ -453,27 +463,27 @@ Pripojená ako %1 - + Error downloading OS list from Internet Chyba pri sťahovaní zoznamu OS z Internetu - + Verifying... %1% Overujem... %1% - + Error Chyba - + Write Successful Zápis úspešne skončil - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> bol zapísaný na <b>%2</b><br><br>Teraz môžete odstrániť SD kartu z čítačky diff --git a/i18n/rpi-imager_tr.ts b/i18n/rpi-imager_tr.ts index 1c67974..70a2ff7 100644 --- a/i18n/rpi-imager_tr.ts +++ b/i18n/rpi-imager_tr.ts @@ -78,42 +78,42 @@ MBR sıfırlanırken yazma hatası - + Error reading from storage.<br>SD card may be broken. Depolamadan okuma hatası.<br>SD kart arızalı olabilir. - + Access denied error while writing file to disk. - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. - + Error writing file to disk - + Error downloading: %1 - + Error writing to storage (while flushing) Depolama alanına yazma hatası (flushing sırasında) - + Error writing to storage (while fsync) Depoya yazma hatası (fsync sırasında) - + Download corrupt. Hash does not match İndirme bozuk. Hash eşleşmiyor @@ -128,17 +128,17 @@ Kartın son kısmını sıfırlamaya çalışırken yazma hatası. Kart yanlış kapasitenin tanımını yapıyor olabilir (olası sahte bölüm boyutu tanımı) - + starting download - + Error writing first block (partition table) İlk bloğu yazma hatası (bölüm tablosu) - + Verifying write failed. Contents of SD card is different from what was written to it. Yazma doğrulanamadı. SD kartın içeriği, üzerine yazılandan farklı. @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. Depolama kapasitesi yeterince büyük değil.<br>En az %1 GB olması gerekiyor - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. Giriş dosyası geçerli bir disk görüntüsü değil.<br>%1 bayt dosya boyutu 512 baytın katı değil. - + Downloading and writing image Görüntü indirme ve yazma - + Select image Imaj seç @@ -291,7 +291,7 @@ - + CHOOSE SD CARD SD KART SEÇİN @@ -317,7 +317,7 @@ - + Cancelling... İptal ediliyor... @@ -328,14 +328,14 @@ - - + + Finalizing... Bitiriliyor... - + Erase Sil @@ -418,7 +418,17 @@ - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Writing... %1% Yazılıyor... %1% @@ -428,53 +438,53 @@ '%1' üzerindeki mevcut tüm veriler silinecek.<br>Devam etmek istediğinizden emin misiniz? - + Error downloading OS list from Internet İnternetten işletim sistemi listesi indirilirken hata oluştu - + Verifying... %1% Doğrulanıyor... %1% - + Preparing to write... (%1) - + Error Hata - + Write Successful Başarılı Yazıldı - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1</b> silindi <br><br> Artık SD kartı okuyucudan çıkarabilirsiniz - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> <b>%2</b><br><br> üzerine yazıldı. Artık SD kartı okuyucudan çıkarabilirsiniz - - + + Error parsing os_list.json os_list.json ayrıştırma hatası - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. Önce görüntüler içeren bir USB bellek bağlayın.<br> Görüntüler USB belleğin kök klasöründe bulunmalıdır. - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. diff --git a/i18n/rpi-imager_zh_cn.ts b/i18n/rpi-imager_zh_cn.ts index 02c3676..59beaae 100644 --- a/i18n/rpi-imager_zh_cn.ts +++ b/i18n/rpi-imager_zh_cn.ts @@ -78,42 +78,42 @@ 将MBR清零时写入错误 - + Error reading from storage.<br>SD card may be broken. 从存储读取数据时错误。<br>SD卡可能已损坏。 - + Access denied error while writing file to disk. 将文件写入磁盘时访问被拒绝错误。 - + Controlled Folder Access seems to be enabled. Please add both rpi-imager.exe and fat32format.exe to the list of allowed apps and try again. 受控文件夹访问似乎已启用。 请将rpi-imager.exe和fat32format.exe都添加到允许的应用程序列表中,然后重试。 - + Error writing file to disk 将文件写入磁盘时出错 - + Error downloading: %1 - + Error writing to storage (while flushing) 刷新时写入存储时出错 - + Error writing to storage (while fsync) 在fsync时写入存储时出错 - + Download corrupt. Hash does not match 下载的文件损坏。 哈希值不匹配 @@ -128,17 +128,17 @@ 尝试将卡的最后一部分清零时写入错误。<br>卡的容量可能不正确(可能是扩容假卡) - + starting download - + Error writing first block (partition table) 写入第一个块(分区表)时出错 - + Verifying write failed. Contents of SD card is different from what was written to it. 验证写入失败。 SD卡的内容与写入的内容不同。 @@ -201,22 +201,22 @@ ImageWriter - + Storage capacity is not large enough.<br>Needs to be at least %1 GB. 存储容量不足。<br>至少需要%1 GB的空白空间 - + Input file is not a valid disk image.<br>File size %1 bytes is not a multiple of 512 bytes. 输入文件不是有效的磁盘映像。<br>文件大小%1字节不是512字节的倍数。 - + Downloading and writing image 下载和写入镜像 - + Select image 选择镜像 @@ -296,7 +296,7 @@ - + CHOOSE SD CARD 选择SD卡 @@ -306,7 +306,7 @@ 烧录 - + Writing... %1% 写入中...%1% @@ -332,7 +332,7 @@ - + Cancelling... 取消中... @@ -343,14 +343,14 @@ - - + + Finalizing... 完成中... - + Erase 擦除 @@ -395,28 +395,38 @@ '%1'上的所有现有数据将被删除。<br>确定要继续吗? - + + Update available + + + + + There is a newer version of Imager available.<br>Would you like to visit the website to download it? + + + + Preparing to write... (%1) - + <b>%1</b> has been erased<br><br>You can now remove the SD card from the reader <b>%1 </ b>已被删除<br> <br>您现在可以从读取器中取出SD卡 - - + + Error parsing os_list.json 解析 os_list.json 错误 - + Connect an USB stick containing images first.<br>The images must be located in the root folder of the USB stick. 连接包含镜像的U盘。<br>镜像必须位于U盘的根文件夹中。 - + SD card is write protected.<br>Push the lock switch on the left side of the card upwards, and try again. SD卡具有写保护。<br>尝试向上推SD卡的左侧的锁定开关,然后重试。 @@ -461,27 +471,27 @@ 继续 - + Error downloading OS list from Internet 下载镜像列表错误 - + Verifying... %1% 验证文件中...%1% - + Error 错误 - + Write Successful 烧录成功 - + <b>%1</b> has been written to <b>%2</b><br><br>You can now remove the SD card from the reader <b>%1</b> 已经成功烧录到 <b>%2</b><br><br>上了,你可以卸载SD卡了 diff --git a/imagewriter.cpp b/imagewriter.cpp index 5b3bd84..942c647 100644 --- a/imagewriter.cpp +++ b/imagewriter.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #ifndef QT_NO_WIDGETS #include #endif @@ -321,6 +322,12 @@ QString ImageWriter::constantVersion() const return IMAGER_VERSION_STR; } +/* Returns true if version argument is newer than current program */ +bool ImageWriter::isVersionNewer(const QString &version) +{ + return QVersionNumber::fromString(version) > QVersionNumber::fromString(IMAGER_VERSION_STR); +} + void ImageWriter::setCustomOsListUrl(const QUrl &url) { _repo = url; diff --git a/imagewriter.h b/imagewriter.h index 10fb143..3d17203 100644 --- a/imagewriter.h +++ b/imagewriter.h @@ -66,6 +66,9 @@ public: /* Function to return version */ Q_INVOKABLE QString constantVersion() const; + /* Returns true if version argument is newer than current program */ + Q_INVOKABLE bool isVersionNewer(const QString &version); + /* Set custom repository */ Q_INVOKABLE void setCustomOsListUrl(const QUrl &url); diff --git a/main.qml b/main.qml index 5a54368..b042877 100644 --- a/main.qml +++ b/main.qml @@ -767,6 +767,19 @@ ApplicationWindow { } } + MsgPopup { + id: updatepopup + continueButton: false + yesButton: true + noButton: true + property url url + title: qsTr("Update available") + text: qsTr("There is a newer version of Imager available.
Would you like to visit the website to download it?") + onYes: { + Qt.openUrlExternally(url) + } + } + /* Utility functions */ function httpRequest(url, callback) { var xhr = new XMLHttpRequest(); @@ -893,6 +906,16 @@ ApplicationWindow { for (var i in oslist) { osmodel.insert(osmodel.count-2, oslist[i]) } + + if ("imager" in o) { + var imager = o["imager"] + if ("latest_version" in imager && "url" in imager) { + if (imageWriter.isVersionNewer(imager["latest_version"])) { + updatepopup.url = imager["url"] + updatepopup.openPopup() + } + } + } }) }