Merge !40: feat: add update check in settings

In-app update check for the Android build (closes #38, #9): Settings shows
"openGym vX available" when gitlab.com has a newer release, tapping it
downloads the APK, checks its SHA-256 and hands it to the package installer
through a small local Capacitor plugin.

Brought onto workout-clean by hand:
- Settings.jsx: the branch's switchUnit sheet and Workout-controls sheet stay,
  the MR's update state, DownloadProgress sheet and Data row come on top; the
  row keeps the branch's "Load starter plan" neighbour (starterPlanSheet).
- The row is additionally gated on MOBILE so the web bundle never asks
  gitlab.com; isAndroid() still decides between Android and iOS.
- build.gradle: the MR's `.debug` applicationIdSuffix is dropped — the branch
  already gives the debug build its own id (`.test`, with the label overlay in
  src/debug/res); git had auto-merged both blocks and Gradle silently took
  the last one.
- Locale packs: both sides kept; the progress sheet's '{0} %' / '{0} MB'
  templates now exist in every pack (fr: Mo, ru: МБ, tr: %{0}). pt-BR only
  carries the four strings whose Brazilian wording differs (baixar vs
  transferir); the identical ones inherit from pt.
- pt-br-locale.test.js: branch version, values recomputed (624/603).
- Settings.workoutview.test.jsx mocks isAndroid like the other Settings tests.
- New: update.test.js fixture with the real v1.3.1 release JSON (the checksum
  link is listed before the APK), Settings.update.test.jsx for the gating.
This commit is contained in:
Duarte Santos committed 2026-09-05 14:22:48 +02:00
commit e2a34a2fee
26 files changed
+843 -9

No files matched your search

+9
View File
@@ -1179,4 +1179,13 @@ export default {
'Convert the numbers': 'Zahlen umrechnen',
'Keep the numbers, change the label': 'Zahlen behalten, nur Beschriftung ändern',
'Switching the unit offers to convert every stored weight.': 'Beim Einheitenwechsel wird angeboten, alle gespeicherten Gewichte umzurechnen.',
'Update to {0}?': 'Auf {0} aktualisieren?',
'The latest version will be downloaded and the installer will open.': 'Die neueste Version wird heruntergeladen und die Installation gestartet.',
'Download & Install': 'Herunterladen & Installieren',
'Update failed: {0}': 'Update fehlgeschlagen: {0}',
'openGym v{0} available': 'openGym v{0} verfügbar',
'Starting download…': 'Download wird gestartet…',
'Downloading update…': 'Update wird heruntergeladen…',
'{0} %': '{0} %',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Convertir los números',
'Keep the numbers, change the label': 'Mantener los números, cambiar la etiqueta',
'Switching the unit offers to convert every stored weight.': 'Al cambiar la unidad se ofrece convertir todos los pesos guardados.',
'Update to {0}?': '¿Actualizar a {0}?',
'The latest version will be downloaded and the installer will open.': 'Se descargará la última versión y se abrirá el instalador.',
'Download & Install': 'Descargar e instalar',
'Update failed: {0}': 'Error en la actualización: {0}',
'openGym v{0} available': 'openGym v{0} disponible',
'Starting download…': 'Iniciando descarga…',
'Downloading update…': 'Descargando actualización…',
'{0} %': '{0} %',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Convertir les nombres',
'Keep the numbers, change the label': 'Garder les nombres, changer l’étiquette',
'Switching the unit offers to convert every stored weight.': 'Changer d’unité propose de convertir tous les poids enregistrés.',
'Update to {0}?': 'Mettre à jour vers {0} ?',
'The latest version will be downloaded and the installer will open.': 'La dernière version sera téléchargée et l’installateur s’ouvrira.',
'Download & Install': 'Télécharger et installer',
'Update failed: {0}': 'Échec de la mise à jour : {0}',
'openGym v{0} available': 'openGym v{0} disponible',
'Starting download…': 'Démarrage du téléchargement…',
'Downloading update…': 'Téléchargement de la mise à jour…',
'{0} %': '{0} %',
'{0} MB': '{0} Mo',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'संख्याएँ बदलें',
'Keep the numbers, change the label': 'संख्याएँ रखें, लेबल बदलें',
'Switching the unit offers to convert every stored weight.': 'इकाई बदलने पर सभी सहेजे गए वज़न बदलने का विकल्प मिलता है।',
'Update to {0}?': '{0} में अपडेट करें?',
'The latest version will be downloaded and the installer will open.': 'नवीनतम संस्करण डाउनलोड होगा और इंस्टॉलर खुलेगा।',
'Download & Install': 'डाउनलोड और इंस्टॉल करें',
'Update failed: {0}': 'अपडेट विफल: {0}',
'openGym v{0} available': 'openGym v{0} उपलब्ध',
'Starting download…': 'डाउनलोड शुरू हो रहा है…',
'Downloading update…': 'अपडेट डाउनलोड हो रहा है…',
'{0} %': '{0}%',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1163,4 +1163,13 @@ export default {
'Convert the numbers': 'Számok átváltása',
'Keep the numbers, change the label': 'Számok maradnak, csak a címke változik',
'Switching the unit offers to convert every stored weight.': 'Mértékegység-váltáskor felajánlja minden tárolt súly átváltását.',
'Update to {0}?': 'Frissítés erre: {0}?',
'The latest version will be downloaded and the installer will open.': 'A legújabb verzió letöltődik, és megnyílik a telepítő.',
'Download & Install': 'Letöltés és telepítés',
'Update failed: {0}': 'A frissítés sikertelen: {0}',
'openGym v{0} available': 'openGym v{0} elérhető',
'Starting download…': 'Letöltés indítása…',
'Downloading update…': 'Frissítés letöltése…',
'{0} %': '{0} %',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Converti i numeri',
'Keep the numbers, change the label': 'Tieni i numeri, cambia l’etichetta',
'Switching the unit offers to convert every stored weight.': 'Cambiando unità viene proposto di convertire tutti i pesi salvati.',
'Update to {0}?': 'Aggiornare a {0}?',
'The latest version will be downloaded and the installer will open.': 'L’ultima versione verrà scaricata e si aprirà il programma di installazione.',
'Download & Install': 'Scarica e installa',
'Update failed: {0}': 'Aggiornamento fallito: {0}',
'openGym v{0} available': 'openGym v{0} disponibile',
'Starting download…': 'Avvio del download…',
'Downloading update…': 'Download dell’aggiornamento…',
'{0} %': '{0} %',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': '숫자 변환',
'Keep the numbers, change the label': '숫자 유지, 표시만 변경',
'Switching the unit offers to convert every stored weight.': '단위를 바꾸면 저장된 모든 무게를 변환할지 물어봅니다.',
'Update to {0}?': '{0}(으)로 업데이트하시겠습니까?',
'The latest version will be downloaded and the installer will open.': '최신 버전이 다운로드되고 설치 프로그램이 열립니다.',
'Download & Install': '다운로드 및 설치',
'Update failed: {0}': '업데이트 실패: {0}',
'openGym v{0} available': 'openGym v{0} 사용 가능',
'Starting download…': '다운로드 시작 중…',
'Downloading update…': '업데이트 다운로드 중…',
'{0} %': '{0}%',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Przelicz liczby',
'Keep the numbers, change the label': 'Zostaw liczby, zmień etykietę',
'Switching the unit offers to convert every stored weight.': 'Zmiana jednostki proponuje przeliczenie wszystkich zapisanych ciężarów.',
'Update to {0}?': 'Zaktualizować do {0}?',
'The latest version will be downloaded and the installer will open.': 'Najnowsza wersja zostanie pobrana i otworzy się instalator.',
'Download & Install': 'Pobierz i zainstaluj',
'Update failed: {0}': 'Aktualizacja nie powiodła się: {0}',
'openGym v{0} available': 'openGym v{0} dostępna',
'Starting download…': 'Rozpoczynanie pobierania…',
'Downloading update…': 'Pobieranie aktualizacji…',
'{0} %': '{0}%',
'{0} MB': '{0} MB',
}
+4
View File
@@ -647,6 +647,10 @@ export const PT_BR_OVERRIDES = {
'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Todos os pesos salvos — séries registradas, pesos de trabalho, alvos das rotinas, peso corporal, pesos das barras — estão em {0}. Converter os números, ou mantê-los e mudar só o rótulo?',
'Keep the numbers, change the label': 'Manter os números, mudar o rótulo',
'Switching the unit offers to convert every stored weight.': 'Ao mudar de unidade é oferecido converter todos os pesos salvos.',
'The latest version will be downloaded and the installer will open.': 'A versão mais recente será baixada e o instalador será aberto.',
'Download & Install': 'Baixar e instalar',
'Starting download…': 'Iniciando download…',
'Downloading update…': 'Baixando atualização…',
}
export default { ...pt, ...PT_BR_OVERRIDES }
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Converter os números',
'Keep the numbers, change the label': 'Manter os números, mudar a etiqueta',
'Switching the unit offers to convert every stored weight.': 'Ao mudar de unidade é proposto converter todos os pesos guardados.',
'Update to {0}?': 'Atualizar para {0}?',
'The latest version will be downloaded and the installer will open.': 'A versão mais recente será transferida e o instalador será aberto.',
'Download & Install': 'Transferir e instalar',
'Update failed: {0}': 'Falha na atualização: {0}',
'openGym v{0} available': 'openGym v{0} disponível',
'Starting download…': 'A iniciar transferência…',
'Downloading update…': 'A transferir atualização…',
'{0} %': '{0} %',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Пересчитать числа',
'Keep the numbers, change the label': 'Оставить числа, сменить подпись',
'Switching the unit offers to convert every stored weight.': 'При смене единицы предлагается пересчитать все сохранённые веса.',
'Update to {0}?': 'Обновить до {0}?',
'The latest version will be downloaded and the installer will open.': 'Последняя версия будет загружена и откроется установщик.',
'Download & Install': 'Скачать и установить',
'Update failed: {0}': 'Ошибка обновления: {0}',
'openGym v{0} available': 'openGym v{0} доступна',
'Starting download…': 'Начало загрузки…',
'Downloading update…': 'Загрузка обновления…',
'{0} %': '{0} %',
'{0} MB': '{0} МБ',
}
+9
View File
@@ -1171,4 +1171,13 @@ export default {
'Convert the numbers': 'แปลงตัวเลข',
'Keep the numbers, change the label': 'คงตัวเลขไว้ เปลี่ยนแค่ป้าย',
'Switching the unit offers to convert every stored weight.': 'เมื่อเปลี่ยนหน่วยจะมีตัวเลือกให้แปลงน้ำหนักที่บันทึกไว้ทั้งหมด',
'Update to {0}?': 'อัปเดตเป็น {0} หรือไม่?',
'The latest version will be downloaded and the installer will open.': 'เวอร์ชันล่าสุดจะถูกดาวน์โหลดและตัวติดตั้งจะเปิดขึ้น',
'Download & Install': 'ดาวน์โหลดและติดตั้ง',
'Update failed: {0}': 'อัปเดตล้มเหลว: {0}',
'openGym v{0} available': 'openGym v{0} พร้อมใช้งาน',
'Starting download…': 'กำลังเริ่มดาวน์โหลด…',
'Downloading update…': 'กำลังดาวน์โหลดอัปเดต…',
'{0} %': '{0}%',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': 'Sayıları çevir',
'Keep the numbers, change the label': 'Sayıları koru, etiketi değiştir',
'Switching the unit offers to convert every stored weight.': 'Birim değiştirilince tüm kayıtlı ağırlıkları çevirme seçeneği sunulur.',
'Update to {0}?': '{0} sürümüne güncellensin mi?',
'The latest version will be downloaded and the installer will open.': 'En son sürüm indirilecek ve yükleyici açılacak.',
'Download & Install': 'İndir ve Kur',
'Update failed: {0}': 'Güncelleme başarısız: {0}',
'openGym v{0} available': 'openGym v{0} mevcut',
'Starting download…': 'İndirme başlatılıyor…',
'Downloading update…': 'Güncelleme indiriliyor…',
'{0} %': '%{0}',
'{0} MB': '{0} MB',
}
+9
View File
@@ -1160,4 +1160,13 @@ export default {
'Convert the numbers': '换算数值',
'Keep the numbers, change the label': '保留数值,只改标签',
'Switching the unit offers to convert every stored weight.': '切换单位时会提示换算所有已保存的重量。',
'Update to {0}?': '更新到 {0}?',
'The latest version will be downloaded and the installer will open.': '将下载最新版本并打开安装程序。',
'Download & Install': '下载并安装',
'Update failed: {0}': '更新失败:{0}',
'openGym v{0} available': 'openGym v{0} 可用',
'Starting download…': '正在开始下载…',
'Downloading update…': '正在下载更新…',
'{0} %': '{0}%',
'{0} MB': '{0} MB',
}