fix(touch): stop telling three boards to flash from a Launcher they do not have

Gating "Save update bin to SD" on CAP_SD gave it to the Pager, the ThinkNode M9
and the Heltec V4-R8 as well as the T-Deck. The two strings it shows still name
bmorcelli's Launcher -- "For Launcher installs: ..." on the button, and
"Saved: %s\nFlash it from the Launcher." when it finishes -- which is the T-Deck's
update path and means nothing on the other three. Those users get told to open
something that does not exist on their device.

The obvious fix is to reword the strings, and that is the trap: both are
translated in all 13 .lang files, TR() looks rows up by their English text, and
editing the English orphans every translation of them silently. So the T-Deck
keeps its strings byte-identical and the other boards get their own keys, chosen
at compile time. Two new keys, added to all 13 files with English on both sides,
which is this repo's convention for a row awaiting a translator (see 4709c81).

i18n-audit: 13/13 languages, 952 keys, nothing missing. audit-lang: no UNSAFE
format mismatches, which matters here because SDFW_SAVED_FMT is handed to
snprintf as the format string. T-Deck (the #if arm), Pager, M9 and V4-R8 (the
#else arm) all build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Michael A. Cojocari
2026-08-21 15:39:01 -04:00
co-authored by Claude Opus 5
parent 4b9c9f1f24
commit d7b981bc62
14 changed files with 43 additions and 2 deletions
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Запазено — рестарт
Saved — reconnecting… Запазено — повторно свързване…
Saved: %s\nFlash it from the Launcher. Запазено: %s\nФлашнете го от Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Запис на SD… %d%%
Saving to SD… 0% Запис на SD… 0%
Scan to open on phone Сканирай, за да отвориш на телефона
+2
View File
@@ -722,6 +722,8 @@ Saved — applying… Gespeichert wird angewendet …
Saved — rebooting Gespeichert — Neustart
Saved — reconnecting… Gespeichert — verbinde neu…
Saved: %s\nFlash it from the Launcher. Gespeichert: %s\nFlashe es über den Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Speichern auf SD… %d%%
Saving to SD… 0% Speichern auf SD… 0%
Scan to open on phone Scannen, um am Handy zu öffnen
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Αποθηκεύτηκε — επανεκκίνηση
Saved — reconnecting… Αποθηκεύτηκε — επανασύνδεση…
Saved: %s\nFlash it from the Launcher. Αποθηκεύτηκε: %s\nΕγκαταστήστε το από τον Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Αποθήκευση στην SD… %d%%
Saving to SD… 0% Αποθήκευση στην SD… 0%
Scan to open on phone Σαρώστε για άνοιγμα στο κινητό
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Guardado — reiniciando
Saved — reconnecting… Guardado — reconectando…
Saved: %s\nFlash it from the Launcher. Guardado: %s\nFlashéalo desde el Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Guardando en SD… %d%%
Saving to SD… 0% Guardando en SD… 0%
Scan to open on phone Escanea para abrir en el móvil
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Enregistré — redémarrage
Saved — reconnecting… Enregistré — reconnexion…
Saved: %s\nFlash it from the Launcher. Enregistré : %s\nFlashez-le depuis le Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Enregistrement sur SD… %d%%
Saving to SD… 0% Enregistrement sur SD… 0%
Scan to open on phone Scannez pour ouvrir sur le téléphone
+2
View File
@@ -733,6 +733,8 @@ Saved — applying… Mentve — alkalmazás folyamatban…
Saved — rebooting Mentve — újraindítás
Saved — reconnecting… Mentve — újracsatlakozás…
Saved: %s\nFlash it from the Launcher. Mentett: %s\nFlash-eld a Launcher-ből.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Mentés SD-kártyára… %d%%
Saving to SD… 0% Mentés SD-kártyára… 0%
Scan to open on phone Olvasd be a telefonos megnyitáshoz
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Salvato — riavvio
Saved — reconnecting… Salvato — riconnessione…
Saved: %s\nFlash it from the Launcher. Salvato: %s\nFlashalo dal Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Salvataggio su SD… %d%%
Saving to SD… 0% Salvataggio su SD… 0%
Scan to open on phone Scansiona per aprire sul telefono
+2
View File
@@ -722,6 +722,8 @@ Saved — applying… Opgeslagen — wordt toegepast…
Saved — rebooting Opgeslagen — opnieuw opstarten
Saved — reconnecting… Opgeslagen — opnieuw verbinden…
Saved: %s\nFlash it from the Launcher. Opgeslagen: %s\nFlash het vanuit de Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Opslaan naar SD… %d%%
Saving to SD… 0% Opslaan naar SD… 0%
Scan to open on phone Scan om op je telefoon te openen
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Salvo — reiniciando
Saved — reconnecting… Salvo — reconectando…
Saved: %s\nFlash it from the Launcher. Salvo: %s\nInstale pelo Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Salvando no SD… %d%%
Saving to SD… 0% Salvando no SD… 0%
Scan to open on phone Escaneie para abrir no celular
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Salvat — se reporneşte
Saved — reconnecting… Salvat — se reconectează…
Saved: %s\nFlash it from the Launcher. Salvat: %s\nInstalează-l din Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Se salvează pe SD… %d%%
Saving to SD… 0% Se salvează pe SD… 0%
Scan to open on phone Scanează pentru a deschide pe telefon
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Сохранено — перезагрузка
Saved — reconnecting… Сохранено — переподключение…
Saved: %s\nFlash it from the Launcher. Сохранено: %s\nПрошейте из Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Сохранение на SD… %d%%
Saving to SD… 0% Сохранение на SD… 0%
Scan to open on phone Отсканируйте, чтобы открыть на телефоне
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Сачувано — рестарт
Saved — reconnecting… Сачувано — поновно повезивање…
Saved: %s\nFlash it from the Launcher. Сачувано: %s\nФлешујте га из Launcher-а.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Чување на SD… %d%%
Saving to SD… 0% Чување на SD… 0%
Scan to open on phone Скенирај да отвориш на телефону
+2
View File
@@ -722,6 +722,8 @@ Saved — applying…
Saved — rebooting Збережено — перезавантаження
Saved — reconnecting… Збережено — перепідключення…
Saved: %s\nFlash it from the Launcher. Збережено: %s\nПрошийте з Launcher.
Saved: %s\nReady for offline flashing. Saved: %s\nReady for offline flashing.
Saves the latest firmware of the selected channel to the SD card (BINS folder). Saves the latest firmware of the selected channel to the SD card (BINS folder).
Saving to SD… %d%% Збереження на SD… %d%%
Saving to SD… 0% Збереження на SD… 0%
Scan to open on phone Відскануйте, щоб відкрити на телефоні
+17 -2
View File
@@ -5377,6 +5377,21 @@ static void otaButtonRefreshState() {
// the ACTIVE update channel (stable, or beta when "Get test builds" is on)
// into /BINS/wadamesh-beta_<N>-<stable|beta>.bin on the SD card. The download
// streams on the tile worker; this UI side mirrors the OTA poll pattern.
// Wording is board-conditional and the two sets are SEPARATE TR() keys on purpose.
// Only the T-Deck has bmorcelli's Launcher; now that this feature is gated on
// CAP_SD it also compiles for the Pager, the ThinkNode M9 and the Heltec V4-R8,
// where "flash it from the Launcher" names something the user does not have. The
// T-Deck strings must stay byte-identical: they are translated in all 13 .lang
// files, and editing the English key orphans every translation of it (audit with
// scripts/build/audit-lang.py).
#if defined(HAS_TDECK_GT911)
#define SDFW_SAVED_FMT TR("Saved: %s\nFlash it from the Launcher.")
#define SDFW_HINT_TEXT TR("For Launcher installs: saves the latest firmware of the selected channel to the SD card (BINS folder).")
#else
#define SDFW_SAVED_FMT TR("Saved: %s\nReady for offline flashing.")
#define SDFW_HINT_TEXT TR("Saves the latest firmware of the selected channel to the SD card (BINS folder).")
#endif
static volatile bool s_sdfw_request = false; // UI -> worker
static volatile int s_sdfw_state = 0; // 0 idle, 1 running, 2 ok, 3 error
static volatile int s_sdfw_pct = 0;
@@ -5400,7 +5415,7 @@ static void sdFwPollTimerCb(lv_timer_t* t) {
if (st == 2) {
if (s_sdfw_status_lbl) {
char b[112];
snprintf(b, sizeof b, TR("Saved: %s\nFlash it from the Launcher."), s_sdfw_msg);
snprintf(b, sizeof b, SDFW_SAVED_FMT, s_sdfw_msg);
lv_label_set_text(s_sdfw_status_lbl, b);
}
if (g_lv.task) g_lv.task->showAlert(TR("Update bin saved to SD"), 3000);
@@ -30965,7 +30980,7 @@ static void settingsCatBuild(int cat) {
lv_obj_set_width(s_sdfw_status_lbl, lblw);
lv_obj_set_style_text_font(s_sdfw_status_lbl, &g_font_12, LV_PART_MAIN);
lv_obj_set_style_text_color(s_sdfw_status_lbl, lv_color_hex(COLOR_SUB), LV_PART_MAIN);
lv_label_set_text(s_sdfw_status_lbl, TR("For Launcher installs: saves the latest firmware of the selected channel to the SD card (BINS folder)."));
lv_label_set_text(s_sdfw_status_lbl, SDFW_HINT_TEXT);
}
#endif
}