Haiku: native Interface Kit user interface
CI / Linux arm64 (push) Waiting to run
CI / Linux x86_64 (push) Waiting to run
CI / ASan + UBSan (push) Waiting to run

Same workflow as the GTK interface: vehicle list, adding a vehicle by VIN,
available updates, download folder, resumable download with progress, USB
stick selection with an erase confirmation, writing, installation guide.
Also a Preferences window (folder, language, automatic new-version check),
an About window and the manual new-version check.

Worker threads post closures to the window through a non-blocking queue
(BMessenger with a zero timeout). Translations use gettext with the GTK
catalogs; the default language comes from the Locale preferences. The
executable gets its signature and version from a generated .rdef.

Validated in the Haiku R1/beta6 VM against a mock Majestic server: full
flow down to a FAT32 stick with license/, both archives and no
UpdateInfo.xml; French interface; GitHub new-version check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
yann64andClaude Opus 5.5 committed 2026-11-29 05:56:25 +01:00
1 parent e5af8ea27d
commit 155545660e
13 files changed
+2266 -372

No files matched your search

+4
View File
@@ -12,6 +12,10 @@ complete; every release is an annotated git tag `vX.Y.Z` (see `tools/release.sh`
- Haiku USB backend (Storage Kit disk device API): lists USB drives, writes an MBR with one FAT32
partition at 1 MiB, mounts, unmounts and ejects. Validated end to end in the VM.
- The core library and `openpu-cli` build and pass all unit tests on Haiku R1/beta6 x86_64.
- Haiku graphical interface (Interface Kit): the same screens as the GTK interface (vehicles,
adding a vehicle, updates, download folder, resumable download, USB stick, writing, installation
guide), Preferences window, About window and new-version check. It uses the gettext catalogs of
the GTK interface, and the language of the Locale preferences by default.
### Fixed
- Archive extraction failed when the destination path contained a symbolic link (e.g. `/tmp` on
+11 -5
View File
@@ -9,15 +9,16 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(OPENPU_BUILD_CLI "Build openpu-cli" ON)
option(OPENPU_BUILD_TESTS "Build unit tests" ON)
option(OPENPU_UI_GTK "Build the GTK4 user interface" OFF)
option(OPENPU_UI_HAIKU "Build the Haiku user interface" OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
set(OPENPU_UI_HAIKU_DEFAULT ON)
else()
set(OPENPU_UI_HAIKU_DEFAULT OFF)
endif()
option(OPENPU_UI_HAIKU "Build the Haiku user interface" ${OPENPU_UI_HAIKU_DEFAULT})
option(OPENPU_WERROR "Treat warnings as errors" OFF)
option(OPENPU_CLANG_TIDY "Run clang-tidy while compiling" OFF)
option(OPENPU_SANITIZE "Build with ASan + UBSan" OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
set(OPENPU_UI_HAIKU_DEFAULT ON)
endif()
add_library(openpu_warnings INTERFACE)
target_compile_options(openpu_warnings INTERFACE -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wno-sign-conversion)
if(OPENPU_WERROR)
@@ -42,6 +43,11 @@ endif()
if(OPENPU_UI_GTK)
add_subdirectory(src/ui-gtk)
endif()
if(OPENPU_UI_HAIKU)
add_subdirectory(src/ui-haiku)
endif()
if(OPENPU_UI_GTK OR OPENPU_UI_HAIKU)
add_subdirectory(po)
endif()
+18 -6
View File
@@ -21,7 +21,7 @@ It is an alternative to the official "Peugeot Update" application (Windows/macOS
- [x] Versioning (`--version`, About dialog, `vX.Y.Z` tags, GitHub releases)
- [x] gettext translations (English, French)
- [x] Haiku: core library, CLI and USB support (Storage Kit), validated in a Haiku R1/beta6 VM
- [ ] Haiku UI
- [x] Haiku UI (Interface Kit): complete workflow, preferences, new-version check
- [x] GitHub Actions continuous integration (Linux x86_64 + arm64)
- [ ] Linux packages: `.deb`, Flatpak and AppImage; Haiku: `.hpkg`
- [ ] x86_64 + arm64 binaries attached to every release (from 1.0.0 on)
@@ -52,6 +52,16 @@ tools/e2e-usb.sh ../build-openpu/debug/src/cli/openpu-cli --license X.key update
When running from the build tree, `OPENPU_LOCALEDIR=../build-openpu/debug/locale` lets the
interface find its translations.
## Building (Haiku)
```sh
pkgman install cmake ninja curl_devel libarchive_devel nlohmann_json gettext gettext_libintl_devel
cmake -S . -B build -G Ninja && cmake --build build && build/tests/openpu_tests
OPENPU_LOCALEDIR=build/locale build/src/ui-haiku/OpenPU # graphical interface
build/src/cli/openpu-cli usb-list
```
`tools/haiku-vm.sh` installs and runs a Haiku R1/beta6 VM under QEMU/KVM (from WSL or Linux), with
a virtual USB stick; `sync` copies the working tree into it and `ssh` runs commands there.
## Versioning
- The reference version is `project(openpu VERSION x.y.z)` in `CMakeLists.txt`. On every build,
`git describe` produces the displayed description (for example `0.2.0+3.g1a2b3c4.dirty`).
@@ -60,13 +70,15 @@ interface find its translations.
commits, tags, pushes to every remote and creates the release.
## Translations
Source strings are in English and translations use gettext (`po/<language>.po`). To add a
language:
Source strings are in English and translations use gettext (`po/<language>.po`), on Linux and on
Haiku: both interfaces share the same catalogs. On Haiku the default language is the first one of
the Locale preferences. To add a language:
1. update the template with `cmake --build <build> --target pot`, or with
`python3 tools/extract_strings.py po/openpu.pot src/ui-gtk/main_window.cpp` if gettext is not
installed;
`python3 tools/extract_strings.py po/openpu.pot src/ui-gtk/main_window.cpp src/ui-haiku/main_window.cpp`
if gettext is not installed;
2. copy `po/openpu.pot` to `po/<language>.po` and translate it;
3. add the language to `po/LINGUAS` and to the list in the Preferences dialog.
3. add the language to `po/LINGUAS` and to the language list of the Preferences window of both
interfaces.
## Tools
- `tools/asar_extract.py`: minimal, read-only asar extractor used to study the reference
+1
View File
@@ -24,5 +24,6 @@ if(XGETTEXT)
COMMAND ${XGETTEXT} --keyword=_ --keyword=N_ --from-code=UTF-8 --package-name=openpu
--add-comments=TRANSLATORS -o ${CMAKE_CURRENT_SOURCE_DIR}/openpu.pot
${PROJECT_SOURCE_DIR}/src/ui-gtk/main_window.cpp
${PROJECT_SOURCE_DIR}/src/ui-haiku/main_window.cpp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
endif()
+395 -245
View File
@@ -2,319 +2,469 @@
msgid ""
msgstr ""
"Project-Id-Version: openpu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-29 05:53+0100\n"
"PO-Revision-Date: 2026-11-28 20:00+0100\n"
"Last-Translator: OpenPU contributors\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/ui-gtk/main_window.cpp:54 src/ui-haiku/main_window.cpp:185
msgid "Crony (navigation)"
msgstr "Crony (avec navigation)"
#: src/ui-gtk/main_window.cpp:55 src/ui-haiku/main_window.cpp:186
msgid "Crony (no navigation)"
msgstr "Crony (sans navigation)"
#: src/ui-gtk/main_window.cpp:58 src/ui-haiku/main_window.cpp:189
msgid "unknown head unit"
msgstr "autoradio inconnu"
#: src/ui-gtk/main_window.cpp:63 src/ui-haiku/main_window.cpp:194
msgid "version %1, %2"
msgstr "version %1, %2"
#: src/ui-gtk/main_window.cpp:70 src/ui-haiku/main_window.cpp:200
msgid "The update server cannot be reached. Check your Internet connection."
msgstr "Le serveur de mises à jour est injoignable. Vérifiez votre connexion Internet."
msgstr ""
"Le serveur de mises à jour est injoignable. Vérifiez votre connexion "
"Internet."
#: src/ui-gtk/main_window.cpp:73 src/ui-haiku/main_window.cpp:202
msgid "The update server returned an error. Try again later."
msgstr "Le serveur de mises à jour a renvoyé une erreur. Réessayez plus tard."
#: src/ui-gtk/main_window.cpp:75 src/ui-haiku/main_window.cpp:203
msgid "This VIN is not valid."
msgstr "Ce VIN n'est pas valide."
#: src/ui-gtk/main_window.cpp:104 src/ui-haiku/main_window.cpp:407
msgid "Your saved data cannot be read"
msgstr "Vos données enregistrées sont illisibles"
#: src/ui-gtk/main_window.cpp:109 src/ui-haiku/main_window.cpp:720
#: src/ui-haiku/main_window.cpp:807 src/ui-haiku/main_window.cpp:1071
msgid "Back"
msgstr "Retour"
msgid "About OpenPU"
msgstr "À propos d'OpenPU"
msgid ""
"Download Peugeot head unit updates (system and navigation map) and prepare the USB stick, on "
"Linux and Haiku.\n"
"\n"
"Independent project, not affiliated with Stellantis or Peugeot."
msgstr ""
"Téléchargez les mises à jour de l'autoradio Peugeot (système et cartographie) et préparez la "
"clé USB, sous Linux et Haiku.\n"
"\n"
"Projet indépendant, sans lien avec Stellantis ni Peugeot."
msgid "Source code"
msgstr "Code source"
msgid "Cannot save the vehicle list"
msgstr "Impossible d'enregistrer la liste des véhicules"
msgid "My vehicles"
msgstr "Mes véhicules"
msgid "Add your vehicle with its VIN (17 characters, on the registration document, field E)."
msgstr "Ajoutez votre véhicule avec son VIN (17 caractères, sur le certificat d'immatriculation, champ E)."
msgid "Add a vehicle"
msgstr "Ajouter un véhicule"
msgid "Remove"
msgstr "Supprimer"
msgid "Check for updates"
msgstr "Rechercher les mises à jour"
msgid "download not finished"
msgstr "téléchargement inachevé"
msgid "Remove %1?"
msgstr "Supprimer %1 ?"
msgid "Downloaded files that were not written to a USB stick yet are deleted too."
msgstr "Les fichiers téléchargés qui n'ont pas encore été copiés sur une clé USB seront aussi supprimés."
msgid "Cancel"
msgstr "Annuler"
msgid ""
"The VIN (vehicle identification number) is written in field E of the registration document and "
"at the bottom of the windscreen."
msgstr ""
"Le VIN (numéro d'identification du véhicule) figure au champ E du certificat d'immatriculation "
"et en bas du pare-brise."
msgid "VIN"
msgstr "VIN"
msgid "Name"
msgstr "Nom"
msgid "e.g. 208 or Family car"
msgstr "par ex. 208 ou Voiture familiale"
msgid "Add"
msgstr "Ajouter"
msgid "A VIN has 17 characters and starts with VF3 or VR3."
msgstr "Un VIN comporte 17 caractères et commence par VF3 ou VR3."
msgid "Checking the vehicle…"
msgstr "Vérification du véhicule…"
msgid "This vehicle is unknown to the update service."
msgstr "Ce véhicule est inconnu du service de mises à jour."
msgid "This vehicle has no head unit that can be updated with a USB stick."
msgstr "Ce véhicule n'a pas d'autoradio pouvant être mis à jour par clé USB."
msgid "Download folder:"
msgstr "Dossier de téléchargement :"
msgid "Change…"
msgstr "Modifier…"
msgid "Installation guide"
msgstr "Guide d'installation"
msgid "Download"
msgstr "Télécharger"
msgid "Looking for updates…"
msgstr "Recherche des mises à jour…"
msgid "No update is available: your head unit is up to date."
msgstr "Aucune mise à jour disponible : votre autoradio est à jour."
msgid "Select the updates to download:"
msgstr "Sélectionnez les mises à jour à télécharger :"
msgid "System (firmware)"
msgstr "Système (firmware)"
msgid "Navigation map"
msgstr "Cartographie"
msgid "Download folder"
msgstr "Dossier de téléchargement"
msgid "Cannot save the settings"
msgstr "Impossible d'enregistrer les réglages"
msgid "Not enough free space"
msgstr "Espace libre insuffisant"
msgid ""
"%1 are needed in %2 but only %3 are free. If a previous download of these files is already in "
"this folder, it will be resumed and may fit."
msgstr ""
"%1 sont nécessaires dans %2 mais seuls %3 sont libres. Si un téléchargement précédent de ces "
"fichiers se trouve déjà dans ce dossier, il sera repris et pourra tenir."
msgid "Download anyway"
msgstr "Télécharger quand même"
msgid "Downloading"
msgstr "Téléchargement"
msgid "You can close the application: the download will resume where it stopped next time."
msgstr "Vous pouvez fermer l'application : le téléchargement reprendra là où il s'est arrêté."
msgid "Stop"
msgstr "Arrêter"
msgid "License"
msgstr "Licence"
msgid "waiting"
msgstr "en attente"
msgid "Connecting…"
msgstr "Connexion…"
msgid "Cannot write the file: %1"
msgstr "Impossible d'écrire le fichier : %1"
msgid "The download failed: %1"
msgstr "Le téléchargement a échoué : %1"
msgid "Download interrupted"
msgstr "Téléchargement interrompu"
msgid "The files already downloaded are kept; start again to resume."
msgstr "Les fichiers déjà téléchargés sont conservés ; relancez pour reprendre."
msgid "done"
msgstr "terminé"
msgid "Time left: %1"
msgstr "Temps restant : %1"
msgid "(connection lost, attempt %1)"
msgstr "(connexion perdue, tentative %1)"
msgid "Prepare the USB stick"
msgstr "Préparer la clé USB"
msgid "This USB stick is too small."
msgstr "Cette clé USB est trop petite."
msgid "Refresh"
msgstr "Actualiser"
msgid "Erase and write"
msgstr "Effacer et écrire"
msgid "Computing the required size…"
msgstr "Calcul de la taille nécessaire…"
msgid "A downloaded file is damaged"
msgstr "Un fichier téléchargé est endommagé"
msgid "Download the update again."
msgstr "Téléchargez à nouveau la mise à jour."
msgid "Plug in a USB stick of at least %1. It will be completely erased and formatted (FAT32)."
msgstr "Branchez une clé USB d'au moins %1. Elle sera entièrement effacée et formatée (FAT32)."
msgid "USB drives cannot be listed: "
msgstr "Impossible de lister les clés USB : "
msgid "too small"
msgstr "trop petite"
msgid "No USB stick found. Plug one in, then refresh."
msgstr "Aucune clé USB trouvée. Branchez-en une, puis actualisez."
msgid "Erase %1?"
msgstr "Effacer %1 ?"
msgid "Everything on this USB stick will be lost."
msgstr "Tout le contenu de cette clé USB sera perdu."
msgid "Writing the USB stick"
msgstr "Écriture de la clé USB"
msgid "Do not unplug the USB stick."
msgstr "Ne débranchez pas la clé USB."
msgid "Checking the downloaded files…"
msgstr "Vérification des fichiers téléchargés…"
msgid "Permission to format the USB stick was refused."
msgstr "L'autorisation de formater la clé USB a été refusée."
msgid "The USB stick could not be prepared"
msgstr "La clé USB n'a pas pu être préparée"
msgid "Formatting the USB stick…"
msgstr "Formatage de la clé USB…"
msgid "Copying the license…"
msgstr "Copie de la licence…"
msgid "Copying the update…"
msgstr "Copie de la mise à jour…"
msgid "Ejecting the USB stick…"
msgstr "Éjection de la clé USB…"
msgid "The USB stick is ready"
msgstr "La clé USB est prête"
msgid ""
"You can unplug the USB stick. With the engine running, plug it into the vehicle and follow the "
"instructions on the screen. The installation can take a long time: do not stop the engine."
msgstr ""
"Vous pouvez débrancher la clé USB. Moteur tournant, branchez-la dans le véhicule et suivez les "
"instructions à l'écran. L'installation peut être longue : ne coupez pas le moteur."
msgid "Finish"
msgstr "Terminer"
#: src/ui-gtk/main_window.cpp:113 src/ui-gtk/main_window.cpp:219
#: src/ui-haiku/main_window.cpp:279 src/ui-haiku/main_window.cpp:384
msgid "Preferences"
msgstr "Préférences"
#: src/ui-gtk/main_window.cpp:114 src/ui-haiku/main_window.cpp:385
msgid "Check for a new version of OpenPU"
msgstr "Rechercher une nouvelle version d'OpenPU"
#: src/ui-gtk/main_window.cpp:115 src/ui-haiku/main_window.cpp:382
msgid "About OpenPU"
msgstr "À propos d'OpenPU"
#: src/ui-gtk/main_window.cpp:118
msgid "Menu"
msgstr "Menu"
#: src/ui-gtk/main_window.cpp:181 src/ui-haiku/main_window.cpp:509
msgid "OpenPU is up to date"
msgstr "OpenPU est à jour"
#: src/ui-gtk/main_window.cpp:182 src/ui-haiku/main_window.cpp:509
msgid "Version %1 is the latest version."
msgstr "La version %1 est la plus récente."
#: src/ui-gtk/main_window.cpp:185 src/ui-haiku/main_window.cpp:513
msgid "Cannot check for a new version"
msgstr "Impossible de rechercher une nouvelle version"
#: src/ui-gtk/main_window.cpp:195 src/ui-haiku/main_window.cpp:526
msgid "OpenPU %1 is available"
msgstr "OpenPU %1 est disponible"
#: src/ui-gtk/main_window.cpp:197 src/ui-haiku/main_window.cpp:523
msgid "You are using version %1. Do you want to download the new version?"
msgstr "Vous utilisez la version %1. Voulez-vous télécharger la nouvelle version ?"
msgstr ""
"Vous utilisez la version %1. Voulez-vous télécharger la nouvelle version ?"
#: src/ui-gtk/main_window.cpp:201 src/ui-haiku/main_window.cpp:526
msgid "Later"
msgstr "Plus tard"
#: src/ui-gtk/main_window.cpp:201 src/ui-gtk/main_window.cpp:625
#: src/ui-haiku/main_window.cpp:527 src/ui-haiku/main_window.cpp:790
msgid "Download"
msgstr "Télécharger"
#: src/ui-gtk/main_window.cpp:231 src/ui-gtk/main_window.cpp:705
#: src/ui-haiku/main_window.cpp:308 src/ui-haiku/main_window.cpp:898
msgid "Download folder"
msgstr "Dossier de téléchargement"
#: src/ui-gtk/main_window.cpp:238 src/ui-gtk/main_window.cpp:608
#: src/ui-haiku/main_window.cpp:310 src/ui-haiku/main_window.cpp:803
msgid "Change…"
msgstr "Modifier…"
#: src/ui-gtk/main_window.cpp:247 src/ui-haiku/main_window.cpp:297
msgid "Language"
msgstr "Langue"
#: src/ui-gtk/main_window.cpp:252 src/ui-haiku/main_window.cpp:293
msgid "System language"
msgstr "Langue du système"
#: src/ui-gtk/main_window.cpp:258 src/ui-haiku/main_window.cpp:298
msgid "The new language is used the next time OpenPU starts."
msgstr "La nouvelle langue sera utilisée au prochain démarrage d'OpenPU."
#: src/ui-gtk/main_window.cpp:271 src/ui-gtk/main_window.cpp:286
#: src/ui-gtk/main_window.cpp:718 src/ui-haiku/main_window.cpp:565
msgid "Cannot save the settings"
msgstr "Impossible d'enregistrer les réglages"
#: src/ui-gtk/main_window.cpp:279 src/ui-haiku/main_window.cpp:301
msgid "Check for a new version of OpenPU at startup"
msgstr "Rechercher une nouvelle version d'OpenPU au démarrage"
#: src/ui-gtk/main_window.cpp:338 src/ui-haiku/main_window.cpp:548
msgid ""
"Download Peugeot head unit updates (system and navigation map) and prepare "
"the USB stick, on Linux and Haiku.\n"
"\n"
"Independent project, not affiliated with Stellantis or Peugeot."
msgstr ""
"Téléchargez les mises à jour de l'autoradio Peugeot (système et "
"cartographie) et préparez la clé USB, sous Linux et Haiku.\n"
"\n"
"Projet indépendant, sans lien avec Stellantis ni Peugeot."
#: src/ui-gtk/main_window.cpp:344 src/ui-haiku/main_window.cpp:556
msgid "Source code"
msgstr "Code source"
#: src/ui-gtk/main_window.cpp:356 src/ui-haiku/main_window.cpp:574
msgid "Cannot save the vehicle list"
msgstr "Impossible d'enregistrer la liste des véhicules"
#: src/ui-gtk/main_window.cpp:370 src/ui-haiku/main_window.cpp:635
msgid "My vehicles"
msgstr "Mes véhicules"
#: src/ui-gtk/main_window.cpp:372 src/ui-haiku/main_window.cpp:623
msgid ""
"Add your vehicle with its VIN (17 characters, on the registration document, "
"field E)."
msgstr ""
"Ajoutez votre véhicule avec son VIN (17 caractères, sur le certificat "
"d'immatriculation, champ E)."
#: src/ui-gtk/main_window.cpp:392 src/ui-gtk/main_window.cpp:486
#: src/ui-haiku/main_window.cpp:640 src/ui-haiku/main_window.cpp:710
msgid "Add a vehicle"
msgstr "Ajouter un véhicule"
#: src/ui-gtk/main_window.cpp:393 src/ui-gtk/main_window.cpp:457
#: src/ui-haiku/main_window.cpp:629 src/ui-haiku/main_window.cpp:683
msgid "Remove"
msgstr "Supprimer"
#: src/ui-gtk/main_window.cpp:394 src/ui-haiku/main_window.cpp:630
msgid "Check for updates"
msgstr "Rechercher les mises à jour"
#: src/ui-gtk/main_window.cpp:425 src/ui-haiku/main_window.cpp:655
msgid "download not finished"
msgstr "téléchargement inachevé"
#: src/ui-gtk/main_window.cpp:455 src/ui-haiku/main_window.cpp:682
msgid "Remove %1?"
msgstr "Supprimer %1 ?"
#: src/ui-gtk/main_window.cpp:456 src/ui-haiku/main_window.cpp:683
msgid ""
"Downloaded files that were not written to a USB stick yet are deleted too."
msgstr ""
"Les fichiers téléchargés qui n'ont pas encore été copiés sur une clé USB "
"seront aussi supprimés."
#: src/ui-gtk/main_window.cpp:457 src/ui-gtk/main_window.cpp:741
#: src/ui-gtk/main_window.cpp:982 src/ui-haiku/main_window.cpp:683
#: src/ui-haiku/main_window.cpp:938 src/ui-haiku/main_window.cpp:1156
msgid "Cancel"
msgstr "Annuler"
#: src/ui-gtk/main_window.cpp:488 src/ui-haiku/main_window.cpp:711
msgid ""
"The VIN (vehicle identification number) is written in field E of the "
"registration document and at the bottom of the windscreen."
msgstr ""
"Le VIN (numéro d'identification du véhicule) figure au champ E du certificat "
"d'immatriculation et en bas du pare-brise."
#: src/ui-gtk/main_window.cpp:496 src/ui-haiku/main_window.cpp:699
msgid "VIN"
msgstr "VIN"
#: src/ui-gtk/main_window.cpp:498 src/ui-haiku/main_window.cpp:702
msgid "Name"
msgstr "Nom"
#: src/ui-gtk/main_window.cpp:503
msgid "e.g. 208 or Family car"
msgstr "par ex. 208 ou Voiture familiale"
#: src/ui-gtk/main_window.cpp:517 src/ui-haiku/main_window.cpp:704
msgid "Add"
msgstr "Ajouter"
#: src/ui-gtk/main_window.cpp:535 src/ui-haiku/main_window.cpp:732
msgid "A VIN has 17 characters and starts with VF3 or VR3."
msgstr "Un VIN comporte 17 caractères et commence par VF3 ou VR3."
#: src/ui-gtk/main_window.cpp:541 src/ui-haiku/main_window.cpp:737
msgid "Checking the vehicle…"
msgstr "Vérification du véhicule…"
#: src/ui-gtk/main_window.cpp:558 src/ui-haiku/main_window.cpp:753
msgid "This vehicle is unknown to the update service."
msgstr "Ce véhicule est inconnu du service de mises à jour."
#: src/ui-gtk/main_window.cpp:562 src/ui-haiku/main_window.cpp:757
msgid "This vehicle has no head unit that can be updated with a USB stick."
msgstr "Ce véhicule n'a pas d'autoradio pouvant être mis à jour par clé USB."
#: src/ui-gtk/main_window.cpp:604 src/ui-haiku/main_window.cpp:801
msgid "Download folder:"
msgstr "Dossier de téléchargement :"
#: src/ui-gtk/main_window.cpp:617 src/ui-gtk/main_window.cpp:1118
#: src/ui-haiku/main_window.cpp:789 src/ui-haiku/main_window.cpp:1287
msgid "Installation guide"
msgstr "Guide d'installation"
#: src/ui-gtk/main_window.cpp:651 src/ui-haiku/main_window.cpp:835
msgid "Looking for updates…"
msgstr "Recherche des mises à jour…"
#: src/ui-gtk/main_window.cpp:685 src/ui-haiku/main_window.cpp:867
msgid "No update is available: your head unit is up to date."
msgstr "Aucune mise à jour disponible : votre autoradio est à jour."
#: src/ui-gtk/main_window.cpp:688 src/ui-haiku/main_window.cpp:870
msgid "Select the updates to download:"
msgstr "Sélectionnez les mises à jour à télécharger :"
#: src/ui-gtk/main_window.cpp:690 src/ui-gtk/main_window.cpp:803
#: src/ui-haiku/main_window.cpp:872 src/ui-haiku/main_window.cpp:979
msgid "System (firmware)"
msgstr "Système (firmware)"
#: src/ui-gtk/main_window.cpp:695 src/ui-gtk/main_window.cpp:807
#: src/ui-haiku/main_window.cpp:877 src/ui-haiku/main_window.cpp:982
msgid "Navigation map"
msgstr "Cartographie"
#: src/ui-gtk/main_window.cpp:736 src/ui-haiku/main_window.cpp:938
msgid "Not enough free space"
msgstr "Espace libre insuffisant"
#: src/ui-gtk/main_window.cpp:738 src/ui-haiku/main_window.cpp:935
msgid ""
"%1 are needed in %2 but only %3 are free. If a previous download of these "
"files is already in this folder, it will be resumed and may fit."
msgstr ""
"%1 sont nécessaires dans %2 mais seuls %3 sont libres. Si un téléchargement "
"précédent de ces fichiers se trouve déjà dans ce dossier, il sera repris et "
"pourra tenir."
#: src/ui-gtk/main_window.cpp:741 src/ui-haiku/main_window.cpp:938
msgid "Download anyway"
msgstr "Télécharger quand même"
#: src/ui-gtk/main_window.cpp:763 src/ui-haiku/main_window.cpp:958
msgid "Downloading"
msgstr "Téléchargement"
#: src/ui-gtk/main_window.cpp:765 src/ui-haiku/main_window.cpp:954
msgid ""
"You can close the application: the download will resume where it stopped "
"next time."
msgstr ""
"Vous pouvez fermer l'application : le téléchargement reprendra là où il "
"s'est arrêté."
#: src/ui-gtk/main_window.cpp:786 src/ui-gtk/main_window.cpp:1014
#: src/ui-haiku/main_window.cpp:952 src/ui-haiku/main_window.cpp:1168
msgid "Stop"
msgstr "Arrêter"
#: src/ui-gtk/main_window.cpp:799 src/ui-gtk/main_window.cpp:849
#: src/ui-haiku/main_window.cpp:554 src/ui-haiku/main_window.cpp:976
#: src/ui-haiku/main_window.cpp:1019
msgid "License"
msgstr "Licence"
#: src/ui-gtk/main_window.cpp:799 src/ui-haiku/main_window.cpp:976
msgid "waiting"
msgstr "en attente"
#: src/ui-gtk/main_window.cpp:812 src/ui-haiku/main_window.cpp:983
msgid "Connecting…"
msgstr "Connexion…"
#: src/ui-gtk/main_window.cpp:829 src/ui-haiku/main_window.cpp:999
msgid "Cannot write the file: %1"
msgstr "Impossible d'écrire le fichier : %1"
#: src/ui-gtk/main_window.cpp:830 src/ui-haiku/main_window.cpp:1000
msgid "The download failed: %1"
msgstr "Le téléchargement a échoué : %1"
#: src/ui-gtk/main_window.cpp:839 src/ui-haiku/main_window.cpp:1009
msgid "Download interrupted"
msgstr "Téléchargement interrompu"
#: src/ui-gtk/main_window.cpp:840 src/ui-haiku/main_window.cpp:1010
msgid "The files already downloaded are kept; start again to resume."
msgstr ""
"Les fichiers déjà téléchargés sont conservés ; relancez pour reprendre."
#: src/ui-gtk/main_window.cpp:849 src/ui-haiku/main_window.cpp:1019
msgid "done"
msgstr "terminé"
#: src/ui-gtk/main_window.cpp:859 src/ui-haiku/main_window.cpp:1027
msgid "Time left: %1"
msgstr "Temps restant : %1"
#: src/ui-gtk/main_window.cpp:861 src/ui-haiku/main_window.cpp:1029
msgid "(connection lost, attempt %1)"
msgstr "(connexion perdue, tentative %1)"
#: src/ui-gtk/main_window.cpp:886 src/ui-haiku/main_window.cpp:1062
msgid "Prepare the USB stick"
msgstr "Préparer la clé USB"
#: src/ui-gtk/main_window.cpp:897 src/ui-gtk/main_window.cpp:970
#: src/ui-haiku/main_window.cpp:1147
msgid "This USB stick is too small."
msgstr "Cette clé USB est trop petite."
#: src/ui-gtk/main_window.cpp:901 src/ui-haiku/main_window.cpp:1066
msgid "Refresh"
msgstr "Actualiser"
#: src/ui-gtk/main_window.cpp:910 src/ui-gtk/main_window.cpp:982
#: src/ui-haiku/main_window.cpp:1057 src/ui-haiku/main_window.cpp:1156
msgid "Erase and write"
msgstr "Effacer et écrire"
#: src/ui-gtk/main_window.cpp:920 src/ui-haiku/main_window.cpp:1081
msgid "Computing the required size…"
msgstr "Calcul de la taille nécessaire…"
#: src/ui-gtk/main_window.cpp:934 src/ui-gtk/main_window.cpp:1055
#: src/ui-haiku/main_window.cpp:1095 src/ui-haiku/main_window.cpp:1215
msgid "A downloaded file is damaged"
msgstr "Un fichier téléchargé est endommagé"
#: src/ui-gtk/main_window.cpp:934 src/ui-gtk/main_window.cpp:1055
#: src/ui-haiku/main_window.cpp:1095 src/ui-haiku/main_window.cpp:1215
msgid "Download the update again."
msgstr "Téléchargez à nouveau la mise à jour."
#: src/ui-gtk/main_window.cpp:941 src/ui-haiku/main_window.cpp:1102
msgid ""
"Plug in a USB stick of at least %1. It will be completely erased and "
"formatted (FAT32)."
msgstr ""
"Branchez une clé USB d'au moins %1. Elle sera entièrement effacée et "
"formatée (FAT32)."
#: src/ui-gtk/main_window.cpp:956 src/ui-haiku/main_window.cpp:1118
msgid "USB drives cannot be listed: "
msgstr "Impossible de lister les clés USB : "
#: src/ui-gtk/main_window.cpp:961 src/ui-haiku/main_window.cpp:1126
msgid "too small"
msgstr "trop petite"
#: src/ui-gtk/main_window.cpp:964 src/ui-haiku/main_window.cpp:1054
#: src/ui-haiku/main_window.cpp:1134
msgid "No USB stick found. Plug one in, then refresh."
msgstr "Aucune clé USB trouvée. Branchez-en une, puis actualisez."
#: src/ui-gtk/main_window.cpp:980 src/ui-haiku/main_window.cpp:1155
msgid "Erase %1?"
msgstr "Effacer %1 ?"
#: src/ui-gtk/main_window.cpp:981 src/ui-haiku/main_window.cpp:1155
msgid "Everything on this USB stick will be lost."
msgstr "Tout le contenu de cette clé USB sera perdu."
#: src/ui-gtk/main_window.cpp:1000 src/ui-haiku/main_window.cpp:1173
msgid "Writing the USB stick"
msgstr "Écriture de la clé USB"
#: src/ui-gtk/main_window.cpp:1001 src/ui-haiku/main_window.cpp:1174
msgid "Do not unplug the USB stick."
msgstr "Ne débranchez pas la clé USB."
#: src/ui-gtk/main_window.cpp:1026 src/ui-gtk/main_window.cpp:1072
#: src/ui-haiku/main_window.cpp:1188 src/ui-haiku/main_window.cpp:1234
msgid "Checking the downloaded files…"
msgstr "Vérification des fichiers téléchargés…"
#: src/ui-gtk/main_window.cpp:1046 src/ui-haiku/main_window.cpp:1206
msgid "Permission to format the USB stick was refused."
msgstr "L'autorisation de formater la clé USB a été refusée."
#: src/ui-gtk/main_window.cpp:1061 src/ui-haiku/main_window.cpp:1221
msgid "The USB stick could not be prepared"
msgstr "La clé USB n'a pas pu être préparée"
#: src/ui-gtk/main_window.cpp:1074 src/ui-haiku/main_window.cpp:1236
msgid "Formatting the USB stick…"
msgstr "Formatage de la clé USB…"
#: src/ui-gtk/main_window.cpp:1077 src/ui-haiku/main_window.cpp:1240
msgid "Copying the license…"
msgstr "Copie de la licence…"
#: src/ui-gtk/main_window.cpp:1078 src/ui-haiku/main_window.cpp:1243
msgid "Copying the update…"
msgstr "Copie de la mise à jour…"
#: src/ui-gtk/main_window.cpp:1080 src/ui-haiku/main_window.cpp:1245
msgid "Ejecting the USB stick…"
msgstr "Éjection de la clé USB…"
#: src/ui-gtk/main_window.cpp:1111 src/ui-haiku/main_window.cpp:1281
msgid "The USB stick is ready"
msgstr "La clé USB est prête"
#: src/ui-gtk/main_window.cpp:1113 src/ui-haiku/main_window.cpp:1282
msgid ""
"You can unplug the USB stick. With the engine running, plug it into the "
"vehicle and follow the instructions on the screen. The installation can take "
"a long time: do not stop the engine."
msgstr ""
"Vous pouvez débrancher la clé USB. Moteur tournant, branchez-la dans le "
"véhicule et suivez les instructions à l'écran. L'installation peut être "
"longue : ne coupez pas le moteur."
#: src/ui-gtk/main_window.cpp:1126 src/ui-haiku/main_window.cpp:1277
msgid "Finish"
msgstr "Terminer"
#: src/ui-haiku/main_window.cpp:387
msgid "Quit"
msgstr "Quitter"
#: src/ui-haiku/main_window.cpp:897
msgid "Select"
msgstr "Sélectionner"
+165 -116
View File
@@ -1,401 +1,450 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the openpu package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: openpu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-29 05:53+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src\ui-gtk\main_window.cpp:54
#: src/ui-gtk/main_window.cpp:54 src/ui-haiku/main_window.cpp:185
msgid "Crony (navigation)"
msgstr ""
#: src\ui-gtk\main_window.cpp:55
#: src/ui-gtk/main_window.cpp:55 src/ui-haiku/main_window.cpp:186
msgid "Crony (no navigation)"
msgstr ""
#: src\ui-gtk\main_window.cpp:58
#: src/ui-gtk/main_window.cpp:58 src/ui-haiku/main_window.cpp:189
msgid "unknown head unit"
msgstr ""
#: src\ui-gtk\main_window.cpp:63
#, qt-format
#: src/ui-gtk/main_window.cpp:63 src/ui-haiku/main_window.cpp:194
msgid "version %1, %2"
msgstr ""
#: src\ui-gtk\main_window.cpp:70
#: src/ui-gtk/main_window.cpp:70 src/ui-haiku/main_window.cpp:200
msgid "The update server cannot be reached. Check your Internet connection."
msgstr ""
#: src\ui-gtk\main_window.cpp:73
#: src/ui-gtk/main_window.cpp:73 src/ui-haiku/main_window.cpp:202
msgid "The update server returned an error. Try again later."
msgstr ""
#: src\ui-gtk\main_window.cpp:75
#: src/ui-gtk/main_window.cpp:75 src/ui-haiku/main_window.cpp:203
msgid "This VIN is not valid."
msgstr ""
#: src\ui-gtk\main_window.cpp:104
#: src/ui-gtk/main_window.cpp:104 src/ui-haiku/main_window.cpp:407
msgid "Your saved data cannot be read"
msgstr ""
#: src\ui-gtk\main_window.cpp:109
#: src/ui-gtk/main_window.cpp:109 src/ui-haiku/main_window.cpp:720
#: src/ui-haiku/main_window.cpp:807 src/ui-haiku/main_window.cpp:1071
msgid "Back"
msgstr ""
#: src\ui-gtk\main_window.cpp:113 src\ui-gtk\main_window.cpp:219
#: src/ui-gtk/main_window.cpp:113 src/ui-gtk/main_window.cpp:219
#: src/ui-haiku/main_window.cpp:279 src/ui-haiku/main_window.cpp:384
msgid "Preferences"
msgstr ""
#: src\ui-gtk\main_window.cpp:114
#: src/ui-gtk/main_window.cpp:114 src/ui-haiku/main_window.cpp:385
msgid "Check for a new version of OpenPU"
msgstr ""
#: src\ui-gtk\main_window.cpp:115
#: src/ui-gtk/main_window.cpp:115 src/ui-haiku/main_window.cpp:382
msgid "About OpenPU"
msgstr ""
#: src\ui-gtk\main_window.cpp:118
#: src/ui-gtk/main_window.cpp:118
msgid "Menu"
msgstr ""
#: src\ui-gtk\main_window.cpp:181
#: src/ui-gtk/main_window.cpp:181 src/ui-haiku/main_window.cpp:509
msgid "OpenPU is up to date"
msgstr ""
#: src\ui-gtk\main_window.cpp:182
#, qt-format
#: src/ui-gtk/main_window.cpp:182 src/ui-haiku/main_window.cpp:509
msgid "Version %1 is the latest version."
msgstr ""
#: src\ui-gtk\main_window.cpp:185
#: src/ui-gtk/main_window.cpp:185 src/ui-haiku/main_window.cpp:513
msgid "Cannot check for a new version"
msgstr ""
#: src\ui-gtk\main_window.cpp:195
#, qt-format
#: src/ui-gtk/main_window.cpp:195 src/ui-haiku/main_window.cpp:526
msgid "OpenPU %1 is available"
msgstr ""
#: src\ui-gtk\main_window.cpp:197
#, qt-format
#: src/ui-gtk/main_window.cpp:197 src/ui-haiku/main_window.cpp:523
msgid "You are using version %1. Do you want to download the new version?"
msgstr ""
#: src\ui-gtk\main_window.cpp:201
#: src/ui-gtk/main_window.cpp:201 src/ui-haiku/main_window.cpp:526
msgid "Later"
msgstr ""
#: src\ui-gtk\main_window.cpp:201 src\ui-gtk\main_window.cpp:625
#: src/ui-gtk/main_window.cpp:201 src/ui-gtk/main_window.cpp:625
#: src/ui-haiku/main_window.cpp:527 src/ui-haiku/main_window.cpp:790
msgid "Download"
msgstr ""
#: src\ui-gtk\main_window.cpp:231 src\ui-gtk\main_window.cpp:705
#: src/ui-gtk/main_window.cpp:231 src/ui-gtk/main_window.cpp:705
#: src/ui-haiku/main_window.cpp:308 src/ui-haiku/main_window.cpp:898
msgid "Download folder"
msgstr ""
#: src\ui-gtk\main_window.cpp:238 src\ui-gtk\main_window.cpp:608
#: src/ui-gtk/main_window.cpp:238 src/ui-gtk/main_window.cpp:608
#: src/ui-haiku/main_window.cpp:310 src/ui-haiku/main_window.cpp:803
msgid "Change…"
msgstr ""
#: src\ui-gtk\main_window.cpp:247
#: src/ui-gtk/main_window.cpp:247 src/ui-haiku/main_window.cpp:297
msgid "Language"
msgstr ""
#: src\ui-gtk\main_window.cpp:252
#: src/ui-gtk/main_window.cpp:252 src/ui-haiku/main_window.cpp:293
msgid "System language"
msgstr ""
#: src\ui-gtk\main_window.cpp:258
#: src/ui-gtk/main_window.cpp:258 src/ui-haiku/main_window.cpp:298
msgid "The new language is used the next time OpenPU starts."
msgstr ""
#: src\ui-gtk\main_window.cpp:271 src\ui-gtk\main_window.cpp:286 src\ui-gtk\main_window.cpp:718
#: src/ui-gtk/main_window.cpp:271 src/ui-gtk/main_window.cpp:286
#: src/ui-gtk/main_window.cpp:718 src/ui-haiku/main_window.cpp:565
msgid "Cannot save the settings"
msgstr ""
#: src\ui-gtk\main_window.cpp:279
#: src/ui-gtk/main_window.cpp:279 src/ui-haiku/main_window.cpp:301
msgid "Check for a new version of OpenPU at startup"
msgstr ""
#: src\ui-gtk\main_window.cpp:338
msgid "Download Peugeot head unit updates (system and navigation map) and prepare the USB stick, on Linux and Haiku.\n\nIndependent project, not affiliated with Stellantis or Peugeot."
#: src/ui-gtk/main_window.cpp:338 src/ui-haiku/main_window.cpp:548
msgid ""
"Download Peugeot head unit updates (system and navigation map) and prepare "
"the USB stick, on Linux and Haiku.\n"
"\n"
"Independent project, not affiliated with Stellantis or Peugeot."
msgstr ""
#: src\ui-gtk\main_window.cpp:344
#: src/ui-gtk/main_window.cpp:344 src/ui-haiku/main_window.cpp:556
msgid "Source code"
msgstr ""
#: src\ui-gtk\main_window.cpp:356
#: src/ui-gtk/main_window.cpp:356 src/ui-haiku/main_window.cpp:574
msgid "Cannot save the vehicle list"
msgstr ""
#: src\ui-gtk\main_window.cpp:370
#: src/ui-gtk/main_window.cpp:370 src/ui-haiku/main_window.cpp:635
msgid "My vehicles"
msgstr ""
#: src\ui-gtk\main_window.cpp:372
msgid "Add your vehicle with its VIN (17 characters, on the registration document, field E)."
#: src/ui-gtk/main_window.cpp:372 src/ui-haiku/main_window.cpp:623
msgid ""
"Add your vehicle with its VIN (17 characters, on the registration document, "
"field E)."
msgstr ""
#: src\ui-gtk\main_window.cpp:392 src\ui-gtk\main_window.cpp:486
#: src/ui-gtk/main_window.cpp:392 src/ui-gtk/main_window.cpp:486
#: src/ui-haiku/main_window.cpp:640 src/ui-haiku/main_window.cpp:710
msgid "Add a vehicle"
msgstr ""
#: src\ui-gtk\main_window.cpp:393 src\ui-gtk\main_window.cpp:457
#: src/ui-gtk/main_window.cpp:393 src/ui-gtk/main_window.cpp:457
#: src/ui-haiku/main_window.cpp:629 src/ui-haiku/main_window.cpp:683
msgid "Remove"
msgstr ""
#: src\ui-gtk\main_window.cpp:394
#: src/ui-gtk/main_window.cpp:394 src/ui-haiku/main_window.cpp:630
msgid "Check for updates"
msgstr ""
#: src\ui-gtk\main_window.cpp:425
#: src/ui-gtk/main_window.cpp:425 src/ui-haiku/main_window.cpp:655
msgid "download not finished"
msgstr ""
#: src\ui-gtk\main_window.cpp:455
#, qt-format
#: src/ui-gtk/main_window.cpp:455 src/ui-haiku/main_window.cpp:682
msgid "Remove %1?"
msgstr ""
#: src\ui-gtk\main_window.cpp:456
msgid "Downloaded files that were not written to a USB stick yet are deleted too."
#: src/ui-gtk/main_window.cpp:456 src/ui-haiku/main_window.cpp:683
msgid ""
"Downloaded files that were not written to a USB stick yet are deleted too."
msgstr ""
#: src\ui-gtk\main_window.cpp:457 src\ui-gtk\main_window.cpp:741 src\ui-gtk\main_window.cpp:982
#: src/ui-gtk/main_window.cpp:457 src/ui-gtk/main_window.cpp:741
#: src/ui-gtk/main_window.cpp:982 src/ui-haiku/main_window.cpp:683
#: src/ui-haiku/main_window.cpp:938 src/ui-haiku/main_window.cpp:1156
msgid "Cancel"
msgstr ""
#: src\ui-gtk\main_window.cpp:488
msgid "The VIN (vehicle identification number) is written in field E of the registration document and at the bottom of the windscreen."
#: src/ui-gtk/main_window.cpp:488 src/ui-haiku/main_window.cpp:711
msgid ""
"The VIN (vehicle identification number) is written in field E of the "
"registration document and at the bottom of the windscreen."
msgstr ""
#: src\ui-gtk\main_window.cpp:496
#: src/ui-gtk/main_window.cpp:496 src/ui-haiku/main_window.cpp:699
msgid "VIN"
msgstr ""
#: src\ui-gtk\main_window.cpp:498
#: src/ui-gtk/main_window.cpp:498 src/ui-haiku/main_window.cpp:702
msgid "Name"
msgstr ""
#: src\ui-gtk\main_window.cpp:503
#: src/ui-gtk/main_window.cpp:503
msgid "e.g. 208 or Family car"
msgstr ""
#: src\ui-gtk\main_window.cpp:517
#: src/ui-gtk/main_window.cpp:517 src/ui-haiku/main_window.cpp:704
msgid "Add"
msgstr ""
#: src\ui-gtk\main_window.cpp:535
#: src/ui-gtk/main_window.cpp:535 src/ui-haiku/main_window.cpp:732
msgid "A VIN has 17 characters and starts with VF3 or VR3."
msgstr ""
#: src\ui-gtk\main_window.cpp:541
#: src/ui-gtk/main_window.cpp:541 src/ui-haiku/main_window.cpp:737
msgid "Checking the vehicle…"
msgstr ""
#: src\ui-gtk\main_window.cpp:558
#: src/ui-gtk/main_window.cpp:558 src/ui-haiku/main_window.cpp:753
msgid "This vehicle is unknown to the update service."
msgstr ""
#: src\ui-gtk\main_window.cpp:562
#: src/ui-gtk/main_window.cpp:562 src/ui-haiku/main_window.cpp:757
msgid "This vehicle has no head unit that can be updated with a USB stick."
msgstr ""
#: src\ui-gtk\main_window.cpp:604
#: src/ui-gtk/main_window.cpp:604 src/ui-haiku/main_window.cpp:801
msgid "Download folder:"
msgstr ""
#: src\ui-gtk\main_window.cpp:617 src\ui-gtk\main_window.cpp:1118
#: src/ui-gtk/main_window.cpp:617 src/ui-gtk/main_window.cpp:1118
#: src/ui-haiku/main_window.cpp:789 src/ui-haiku/main_window.cpp:1287
msgid "Installation guide"
msgstr ""
#: src\ui-gtk\main_window.cpp:651
#: src/ui-gtk/main_window.cpp:651 src/ui-haiku/main_window.cpp:835
msgid "Looking for updates…"
msgstr ""
#: src\ui-gtk\main_window.cpp:685
#: src/ui-gtk/main_window.cpp:685 src/ui-haiku/main_window.cpp:867
msgid "No update is available: your head unit is up to date."
msgstr ""
#: src\ui-gtk\main_window.cpp:688
#: src/ui-gtk/main_window.cpp:688 src/ui-haiku/main_window.cpp:870
msgid "Select the updates to download:"
msgstr ""
#: src\ui-gtk\main_window.cpp:690 src\ui-gtk\main_window.cpp:803
#: src/ui-gtk/main_window.cpp:690 src/ui-gtk/main_window.cpp:803
#: src/ui-haiku/main_window.cpp:872 src/ui-haiku/main_window.cpp:979
msgid "System (firmware)"
msgstr ""
#: src\ui-gtk\main_window.cpp:695 src\ui-gtk\main_window.cpp:807
#: src/ui-gtk/main_window.cpp:695 src/ui-gtk/main_window.cpp:807
#: src/ui-haiku/main_window.cpp:877 src/ui-haiku/main_window.cpp:982
msgid "Navigation map"
msgstr ""
#: src\ui-gtk\main_window.cpp:736
#: src/ui-gtk/main_window.cpp:736 src/ui-haiku/main_window.cpp:938
msgid "Not enough free space"
msgstr ""
#: src\ui-gtk\main_window.cpp:738
#, qt-format
msgid "%1 are needed in %2 but only %3 are free. If a previous download of these files is already in this folder, it will be resumed and may fit."
#: src/ui-gtk/main_window.cpp:738 src/ui-haiku/main_window.cpp:935
msgid ""
"%1 are needed in %2 but only %3 are free. If a previous download of these "
"files is already in this folder, it will be resumed and may fit."
msgstr ""
#: src\ui-gtk\main_window.cpp:741
#: src/ui-gtk/main_window.cpp:741 src/ui-haiku/main_window.cpp:938
msgid "Download anyway"
msgstr ""
#: src\ui-gtk\main_window.cpp:763
#: src/ui-gtk/main_window.cpp:763 src/ui-haiku/main_window.cpp:958
msgid "Downloading"
msgstr ""
#: src\ui-gtk\main_window.cpp:765
msgid "You can close the application: the download will resume where it stopped next time."
#: src/ui-gtk/main_window.cpp:765 src/ui-haiku/main_window.cpp:954
msgid ""
"You can close the application: the download will resume where it stopped "
"next time."
msgstr ""
#: src\ui-gtk\main_window.cpp:786 src\ui-gtk\main_window.cpp:1014
#: src/ui-gtk/main_window.cpp:786 src/ui-gtk/main_window.cpp:1014
#: src/ui-haiku/main_window.cpp:952 src/ui-haiku/main_window.cpp:1168
msgid "Stop"
msgstr ""
#: src\ui-gtk\main_window.cpp:799 src\ui-gtk\main_window.cpp:849
#: src/ui-gtk/main_window.cpp:799 src/ui-gtk/main_window.cpp:849
#: src/ui-haiku/main_window.cpp:554 src/ui-haiku/main_window.cpp:976
#: src/ui-haiku/main_window.cpp:1019
msgid "License"
msgstr ""
#: src\ui-gtk\main_window.cpp:799
#: src/ui-gtk/main_window.cpp:799 src/ui-haiku/main_window.cpp:976
msgid "waiting"
msgstr ""
#: src\ui-gtk\main_window.cpp:812
#: src/ui-gtk/main_window.cpp:812 src/ui-haiku/main_window.cpp:983
msgid "Connecting…"
msgstr ""
#: src\ui-gtk\main_window.cpp:829
#, qt-format
#: src/ui-gtk/main_window.cpp:829 src/ui-haiku/main_window.cpp:999
msgid "Cannot write the file: %1"
msgstr ""
#: src\ui-gtk\main_window.cpp:830
#, qt-format
#: src/ui-gtk/main_window.cpp:830 src/ui-haiku/main_window.cpp:1000
msgid "The download failed: %1"
msgstr ""
#: src\ui-gtk\main_window.cpp:839
#: src/ui-gtk/main_window.cpp:839 src/ui-haiku/main_window.cpp:1009
msgid "Download interrupted"
msgstr ""
#: src\ui-gtk\main_window.cpp:840
#: src/ui-gtk/main_window.cpp:840 src/ui-haiku/main_window.cpp:1010
msgid "The files already downloaded are kept; start again to resume."
msgstr ""
#: src\ui-gtk\main_window.cpp:849
#: src/ui-gtk/main_window.cpp:849 src/ui-haiku/main_window.cpp:1019
msgid "done"
msgstr ""
#: src\ui-gtk\main_window.cpp:859
#, qt-format
#: src/ui-gtk/main_window.cpp:859 src/ui-haiku/main_window.cpp:1027
msgid "Time left: %1"
msgstr ""
#: src\ui-gtk\main_window.cpp:861
#, qt-format
#: src/ui-gtk/main_window.cpp:861 src/ui-haiku/main_window.cpp:1029
msgid "(connection lost, attempt %1)"
msgstr ""
#: src\ui-gtk\main_window.cpp:886
#: src/ui-gtk/main_window.cpp:886 src/ui-haiku/main_window.cpp:1062
msgid "Prepare the USB stick"
msgstr ""
#: src\ui-gtk\main_window.cpp:897 src\ui-gtk\main_window.cpp:970
#: src/ui-gtk/main_window.cpp:897 src/ui-gtk/main_window.cpp:970
#: src/ui-haiku/main_window.cpp:1147
msgid "This USB stick is too small."
msgstr ""
#: src\ui-gtk\main_window.cpp:901
#: src/ui-gtk/main_window.cpp:901 src/ui-haiku/main_window.cpp:1066
msgid "Refresh"
msgstr ""
#: src\ui-gtk\main_window.cpp:910 src\ui-gtk\main_window.cpp:982
#: src/ui-gtk/main_window.cpp:910 src/ui-gtk/main_window.cpp:982
#: src/ui-haiku/main_window.cpp:1057 src/ui-haiku/main_window.cpp:1156
msgid "Erase and write"
msgstr ""
#: src\ui-gtk\main_window.cpp:920
#: src/ui-gtk/main_window.cpp:920 src/ui-haiku/main_window.cpp:1081
msgid "Computing the required size…"
msgstr ""
#: src\ui-gtk\main_window.cpp:934 src\ui-gtk\main_window.cpp:1055
#: src/ui-gtk/main_window.cpp:934 src/ui-gtk/main_window.cpp:1055
#: src/ui-haiku/main_window.cpp:1095 src/ui-haiku/main_window.cpp:1215
msgid "A downloaded file is damaged"
msgstr ""
#: src\ui-gtk\main_window.cpp:934 src\ui-gtk\main_window.cpp:1055
#: src/ui-gtk/main_window.cpp:934 src/ui-gtk/main_window.cpp:1055
#: src/ui-haiku/main_window.cpp:1095 src/ui-haiku/main_window.cpp:1215
msgid "Download the update again."
msgstr ""
#: src\ui-gtk\main_window.cpp:941
#, qt-format
msgid "Plug in a USB stick of at least %1. It will be completely erased and formatted (FAT32)."
#: src/ui-gtk/main_window.cpp:941 src/ui-haiku/main_window.cpp:1102
msgid ""
"Plug in a USB stick of at least %1. It will be completely erased and "
"formatted (FAT32)."
msgstr ""
#: src\ui-gtk\main_window.cpp:956
#: src/ui-gtk/main_window.cpp:956 src/ui-haiku/main_window.cpp:1118
msgid "USB drives cannot be listed: "
msgstr ""
#: src\ui-gtk\main_window.cpp:961
#: src/ui-gtk/main_window.cpp:961 src/ui-haiku/main_window.cpp:1126
msgid "too small"
msgstr ""
#: src\ui-gtk\main_window.cpp:964
#: src/ui-gtk/main_window.cpp:964 src/ui-haiku/main_window.cpp:1054
#: src/ui-haiku/main_window.cpp:1134
msgid "No USB stick found. Plug one in, then refresh."
msgstr ""
#: src\ui-gtk\main_window.cpp:980
#, qt-format
#: src/ui-gtk/main_window.cpp:980 src/ui-haiku/main_window.cpp:1155
msgid "Erase %1?"
msgstr ""
#: src\ui-gtk\main_window.cpp:981
#: src/ui-gtk/main_window.cpp:981 src/ui-haiku/main_window.cpp:1155
msgid "Everything on this USB stick will be lost."
msgstr ""
#: src\ui-gtk\main_window.cpp:1000
#: src/ui-gtk/main_window.cpp:1000 src/ui-haiku/main_window.cpp:1173
msgid "Writing the USB stick"
msgstr ""
#: src\ui-gtk\main_window.cpp:1001
#: src/ui-gtk/main_window.cpp:1001 src/ui-haiku/main_window.cpp:1174
msgid "Do not unplug the USB stick."
msgstr ""
#: src\ui-gtk\main_window.cpp:1026 src\ui-gtk\main_window.cpp:1072
#: src/ui-gtk/main_window.cpp:1026 src/ui-gtk/main_window.cpp:1072
#: src/ui-haiku/main_window.cpp:1188 src/ui-haiku/main_window.cpp:1234
msgid "Checking the downloaded files…"
msgstr ""
#: src\ui-gtk\main_window.cpp:1046
#: src/ui-gtk/main_window.cpp:1046 src/ui-haiku/main_window.cpp:1206
msgid "Permission to format the USB stick was refused."
msgstr ""
#: src\ui-gtk\main_window.cpp:1061
#: src/ui-gtk/main_window.cpp:1061 src/ui-haiku/main_window.cpp:1221
msgid "The USB stick could not be prepared"
msgstr ""
#: src\ui-gtk\main_window.cpp:1074
#: src/ui-gtk/main_window.cpp:1074 src/ui-haiku/main_window.cpp:1236
msgid "Formatting the USB stick…"
msgstr ""
#: src\ui-gtk\main_window.cpp:1077
#: src/ui-gtk/main_window.cpp:1077 src/ui-haiku/main_window.cpp:1240
msgid "Copying the license…"
msgstr ""
#: src\ui-gtk\main_window.cpp:1078
#: src/ui-gtk/main_window.cpp:1078 src/ui-haiku/main_window.cpp:1243
msgid "Copying the update…"
msgstr ""
#: src\ui-gtk\main_window.cpp:1080
#: src/ui-gtk/main_window.cpp:1080 src/ui-haiku/main_window.cpp:1245
msgid "Ejecting the USB stick…"
msgstr ""
#: src\ui-gtk\main_window.cpp:1111
#: src/ui-gtk/main_window.cpp:1111 src/ui-haiku/main_window.cpp:1281
msgid "The USB stick is ready"
msgstr ""
#: src\ui-gtk\main_window.cpp:1113
msgid "You can unplug the USB stick. With the engine running, plug it into the vehicle and follow the instructions on the screen. The installation can take a long time: do not stop the engine."
#: src/ui-gtk/main_window.cpp:1113 src/ui-haiku/main_window.cpp:1282
msgid ""
"You can unplug the USB stick. With the engine running, plug it into the "
"vehicle and follow the instructions on the screen. The installation can take "
"a long time: do not stop the engine."
msgstr ""
#: src\ui-gtk\main_window.cpp:1126
#: src/ui-gtk/main_window.cpp:1126 src/ui-haiku/main_window.cpp:1277
msgid "Finish"
msgstr ""
#: src/ui-haiku/main_window.cpp:387
msgid "Quit"
msgstr ""
#: src/ui-haiku/main_window.cpp:897
msgid "Select"
msgstr ""
+32
View File
@@ -0,0 +1,32 @@
include(GNUInstallDirs)
add_executable(OpenPU
main.cpp
main_window.cpp
)
find_library(INTL_LIBRARY intl)
target_link_libraries(OpenPU PRIVATE openpu_core openpu_warnings be tracker shared
$<$<BOOL:${INTL_LIBRARY}>:${INTL_LIBRARY}>)
target_compile_definitions(OpenPU PRIVATE
GETTEXT_PACKAGE="openpu"
OPENPU_LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
# BeAPI headers trigger -Wshadow/-Wconversion noise we cannot fix.
target_compile_options(OpenPU PRIVATE -Wno-shadow -Wno-conversion)
# Application resources: signature, version, flags (Haiku rc + xres).
configure_file(OpenPU.rdef.in ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rdef @ONLY)
find_program(HAIKU_RC rc)
find_program(HAIKU_XRES xres)
find_program(HAIKU_MIMESET mimeset)
if(HAIKU_RC AND HAIKU_XRES)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rsrc
COMMAND ${HAIKU_RC} -o ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rsrc ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rdef
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rdef)
add_custom_target(OpenPU_rsrc DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rsrc)
add_dependencies(OpenPU OpenPU_rsrc)
add_custom_command(TARGET OpenPU POST_BUILD
COMMAND ${HAIKU_XRES} -o $<TARGET_FILE:OpenPU> ${CMAKE_CURRENT_BINARY_DIR}/OpenPU.rsrc
COMMAND ${HAIKU_MIMESET} -f $<TARGET_FILE:OpenPU>)
endif()
install(TARGETS OpenPU RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+15
View File
@@ -0,0 +1,15 @@
/* SPDX-License-Identifier: MIT */
resource app_signature "application/x-vnd.openpu-OpenPU";
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @PROJECT_VERSION_MAJOR@,
middle = @PROJECT_VERSION_MINOR@,
minor = @PROJECT_VERSION_PATCH@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "OpenPU @PROJECT_VERSION@",
long_info = "OpenPU @PROJECT_VERSION@ - Peugeot head unit updates on a USB stick. MIT license."
};
+34
View File
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
#pragma once
// gettext, with the same message catalogs as the GTK interface (po/).
#include <libintl.h>
#include <initializer_list>
#include <string>
#define _(text) gettext(text)
namespace openpu::haiku {
/// Replaces %1..%9 in `format` (same placeholders as Glib::ustring::compose, so the translations
/// are shared with the GTK interface).
inline std::string compose(const std::string& format, std::initializer_list<std::string> args)
{
std::string out;
out.reserve(format.size());
for (std::size_t i = 0; i < format.size(); ++i) {
const char c = format[i];
if (c == '%' && i + 1 < format.size() && format[i + 1] >= '1' && format[i + 1] <= '9') {
const auto index = static_cast<std::size_t>(format[i + 1] - '1');
if (index < args.size())
out += *(args.begin() + index);
++i;
continue;
}
out.push_back(c);
}
return out;
}
} // namespace openpu::haiku
+75
View File
@@ -0,0 +1,75 @@
// SPDX-License-Identifier: MIT
#include "main_window.hpp"
#include "openpu/storage.hpp"
#include <Application.h>
#include <LocaleRoster.h>
#include <Message.h>
#include "i18n.hpp"
#include <cctype>
#include <clocale>
#include <cstdlib>
#include <string>
namespace {
constexpr const char* kSignature = "application/x-vnd.openpu-OpenPU";
/// First preferred language of the Locale preferences ("fr", "en_US"...), empty if unknown.
std::string preferredLanguage()
{
BMessage languages;
if (BLocaleRoster::Default()->GetPreferredLanguages(&languages) != B_OK)
return {};
const char* language = nullptr;
if (languages.FindString("language", 0, &language) != B_OK || language == nullptr)
return {};
return language;
}
class App : public BApplication {
public:
explicit App(std::string language) : BApplication(kSignature), language_(std::move(language)) {}
void ReadyToRun() override { (new openpu::haiku::MainWindow(language_))->Show(); }
private:
std::string language_;
};
} // namespace
int main()
{
// A language chosen in the settings overrides the one of the Locale preferences.
std::string language;
try {
language = openpu::Settings::load(openpu::paths::configDir() / "config.json").language;
} catch (const openpu::StorageError&) {
// dismissed: the window reports unreadable settings itself
}
if (language.empty())
language = preferredLanguage();
if (language.empty())
language = "en";
// gettext follows LANGUAGE, but only when the message locale is not "C".
(void)setenv("LANGUAGE", language.c_str(), 1); // NOLINT(concurrency-mt-unsafe): no thread yet
(void)setenv("LC_MESSAGES", "en_US.UTF-8", 0); // NOLINT(concurrency-mt-unsafe)
(void)std::setlocale(LC_ALL, ""); // NOLINT(concurrency-mt-unsafe)
const char* localeDir = std::getenv("OPENPU_LOCALEDIR"); // NOLINT(concurrency-mt-unsafe): build tree
bindtextdomain(GETTEXT_PACKAGE, localeDir != nullptr ? localeDir : OPENPU_LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
std::string twoLetters;
for (char c : language.substr(0, 2))
twoLetters.push_back(static_cast<char>(std::tolower(static_cast<unsigned char>(c))));
App app(twoLetters);
app.Run();
return 0;
}
File diff suppressed because it is too large. Load diff
+167
View File
@@ -0,0 +1,167 @@
// SPDX-License-Identifier: MIT
#pragma once
#include "ui_queue.hpp"
#include "openpu/api_client.hpp"
#include "openpu/app_update.hpp"
#include "openpu/job.hpp"
#include "openpu/storage.hpp"
#include "openpu/usb.hpp"
#include <Messenger.h>
#include <Window.h>
#include <memory>
#include <optional>
#include <string>
#include <thread>
#include <vector>
class BButton;
class BCardView;
class BCheckBox;
class BFilePanel;
class BListView;
class BMenuField;
class BPopUpMenu;
class BStatusBar;
class BStringView;
class BTextControl;
class BTextView;
class BView;
namespace openpu::haiku {
/// Messages shared with the preferences window.
enum : uint32 {
kMsgChooseFolder = 'chfd', ///< main window: open the folder panel
kMsgSetLanguage = 'slng', ///< main window: "language" (string, empty = system)
kMsgSetAutoCheck = 'sach', ///< main window: "value" (bool)
kMsgFolderChanged = 'fdch',///< preferences window: "path" (string)
};
class MainWindow : public BWindow {
public:
/// `language`: two-letter language of the interface (for the guide links).
explicit MainWindow(std::string language);
~MainWindow() override;
MainWindow(const MainWindow&) = delete;
MainWindow& operator=(const MainWindow&) = delete;
void MessageReceived(BMessage* message) override;
bool QuitRequested() override;
private:
enum Page : int32 { Vehicles, Add, Updates, Download, Usb, Write, Done };
// pages
BView* buildVehiclesPage();
BView* buildAddPage();
BView* buildUpdatesPage();
BView* buildDownloadPage();
BView* buildUsbPage();
BView* buildWritePage();
BView* buildDonePage();
void show(Page page);
// vehicles
void refreshVehicles();
std::optional<Vehicle> selectedVehicle() const;
void onVehicleSelected();
void onAddVehicle();
void onRemoveVehicle();
void onCheckUpdates();
// updates / download
void showUpdates(const AvailableUpdates& updates);
void updateDownloadButton();
void onChooseFolder();
void onFolderChosen(BMessage* message);
void onStartDownload();
void startDownload(const DownloadPlan& plan);
void onDownloadProgress(const JobProgress& p);
void onDownloaded(const DownloadedFiles& files);
// usb
void enterUsbPage();
void refreshDrives();
void onDriveSelected();
void onPrepareUsb();
void startWrite(const UsbDrive& drive);
void onWriteProgress(const UsbProgress& p);
void onWritten();
// helpers
template <typename F>
void runAsync(F&& work);
void joinWorker();
void showError(const std::string& title, const std::string& detail);
void showAbout();
void showPreferences();
void openGuide();
void checkAppUpdate(bool manual);
void offerAppUpdate(const AppRelease& release);
void saveVehicles();
void saveSettings();
void updateDownloadDirLabel();
UiQueue ui_;
std::string language_;
std::unique_ptr<Transport> transport_;
std::unique_ptr<ApiClient> api_;
std::unique_ptr<UsbBackend> usb_;
VehicleStore store_;
Settings settings_;
std::filesystem::path settingsFile_;
std::thread worker_;
std::thread updateThread_; // OpenPU new-version check, independent of the main flow
bool updateCheckRunning_ = false;
CancelToken cancel_;
BMessenger preferences_;
BFilePanel* folderPanel_ = nullptr;
// flow state
std::optional<Vehicle> current_;
AvailableUpdates updates_;
DownloadedFiles files_;
std::vector<UsbDrive> drives_;
std::int32_t selectedDrive_ = -1;
std::uint64_t payload_ = 0;
// widgets
BCardView* cards_ = nullptr;
BListView* vehicleList_ = nullptr;
BTextView* vehiclesEmpty_ = nullptr;
BButton *removeButton_ = nullptr, *checkButton_ = nullptr;
BTextControl *vinEntry_ = nullptr, *nameEntry_ = nullptr;
BStringView* addStatus_ = nullptr;
BButton* addConfirm_ = nullptr;
BStringView* updatesTitle_ = nullptr;
BTextView* updatesStatus_ = nullptr;
BCheckBox *firmwareCheck_ = nullptr, *mapCheck_ = nullptr;
BStringView* downloadDirLabel_ = nullptr;
BButton *downloadButton_ = nullptr, *guideButton_ = nullptr;
BStringView* licenseLabel_ = nullptr;
BStatusBar *firmwareBar_ = nullptr, *mapBar_ = nullptr;
BStringView* etaLabel_ = nullptr;
BButton* cancelDownload_ = nullptr;
BTextView* usbInfo_ = nullptr;
BPopUpMenu* driveMenu_ = nullptr;
BMenuField* driveField_ = nullptr;
BStringView* usbStatus_ = nullptr;
BButton* prepareButton_ = nullptr;
BStatusBar* writeBar_ = nullptr;
BStringView* writeDetail_ = nullptr;
BButton* cancelWrite_ = nullptr;
BButton* doneButton_ = nullptr;
};
} // namespace openpu::haiku
+55
View File
@@ -0,0 +1,55 @@
// SPDX-License-Identifier: MIT
#pragma once
#include <Messenger.h>
#include <atomic>
#include <deque>
#include <functional>
#include <mutex>
namespace openpu::haiku {
/// Runs closures posted from worker threads on a window's thread.
/// post() never blocks: a single kMessage is in flight at a time and drain() runs everything queued.
class UiQueue {
public:
static constexpr uint32 kMessage = 'uiqd';
void setTarget(const BMessenger& target) { target_ = target; }
void post(std::function<void()> fn)
{
{
std::scoped_lock lock(mutex_);
queue_.push_back(std::move(fn));
}
if (!pending_.exchange(true)) {
BMessage message(kMessage);
// Zero timeout: a worker must never wait for the window (it may be joining the worker).
if (target_.SendMessage(&message, static_cast<BHandler*>(nullptr), 0) != B_OK)
pending_ = false;
}
}
/// Called by the target window when it receives kMessage.
void drain()
{
pending_ = false;
std::deque<std::function<void()>> local;
{
std::scoped_lock lock(mutex_);
local.swap(queue_);
}
for (auto& fn : local)
fn();
}
private:
BMessenger target_;
std::atomic<bool> pending_{false};
std::mutex mutex_;
std::deque<std::function<void()>> queue_;
};
} // namespace openpu::haiku