Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3472,5 +3472,8 @@
"type": "int"
}
}
}
},
"whoopFirmwareWarningTitle": "WHOOP-Nutzer: Verbinde dich nicht wieder mit der WHOOP-App",
"whoopFirmwareWarningAction": "Wenn du OpenStrap oder eine andere Open-Source-App nutzt oder später zu einer wechseln möchtest, verbinde dein Band nicht wieder mit der offiziellen WHOOP-App. Sie kann Firmware-Updates automatisch installieren. Deinstalliere oder deaktiviere die WHOOP-App, damit sie dein Band nicht aktualisiert.",
"whoopFirmwareWarningDetails": "Berichte zur WHOOP 5.0 / MG Firmware 50.43.1.0 und 50.43.2.0 beschreiben einen blockierten Datenzugriff. Bluetooth kann sich weiterhin verbinden. OpenStrap kann das von WHOOP signierte Mitgliedschafts-Token nicht ausstellen, das betroffene Bänder entsperrt. Wir arbeiten an einer Lösung, aber es gibt noch keine Abhilfe."
}
5 changes: 4 additions & 1 deletion lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2892,5 +2892,8 @@
}
},
"reportContactLabel": "Contacto (opcional)",
"reportContactHint": "Correo o Discord, solo si quieres una respuesta"
"reportContactHint": "Correo o Discord, solo si quieres una respuesta",
"whoopFirmwareWarningTitle": "Usuarios de WHOOP: no vuelvas a conectarte a la app de WHOOP",
"whoopFirmwareWarningAction": "Si usas OpenStrap u otra app de código abierto, o piensas cambiarte a una más adelante, no vuelvas a conectar tu banda a la app oficial de WHOOP. Puede instalar actualizaciones de firmware automáticamente. Desinstala o desactiva la app de WHOOP para evitar que actualice tu banda.",
"whoopFirmwareWarningDetails": "Hay informes de que el firmware 50.43.1.0 y 50.43.2.0 de WHOOP 5.0 / MG bloquea el acceso a los datos. Es posible que el Bluetooth siga conectándose. OpenStrap no puede emitir el token de membresía firmado por WHOOP que se necesita para desbloquear las bandas afectadas. Estamos trabajando en una solución, pero todavía no hay ningún arreglo disponible."
}
5 changes: 4 additions & 1 deletion lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2863,5 +2863,8 @@
}
},
"reportContactLabel": "Contact (facultatif)",
"reportContactHint": "E-mail ou Discord, seulement si vous voulez une réponse"
"reportContactHint": "E-mail ou Discord, seulement si vous voulez une réponse",
"whoopFirmwareWarningTitle": "Utilisateurs WHOOP : ne vous reconnectez pas à l’application WHOOP",
"whoopFirmwareWarningAction": "Si vous utilisez OpenStrap ou une autre application open source, ou si vous comptez y passer plus tard, ne reconnectez pas votre bracelet à l’application WHOOP officielle. Elle peut installer des mises à jour du firmware automatiquement. Désinstallez ou désactivez l’application WHOOP pour l’empêcher de mettre à jour votre bracelet.",
"whoopFirmwareWarningDetails": "Des signalements concernant les firmwares 50.43.1.0 et 50.43.2.0 des WHOOP 5.0 / MG décrivent un accès aux données bloqué. Le Bluetooth peut encore se connecter. OpenStrap ne peut pas émettre le jeton d’abonnement signé par WHOOP nécessaire pour déverrouiller les bracelets concernés. Nous travaillons sur une solution, mais aucun correctif n’est encore disponible."
}
5 changes: 4 additions & 1 deletion lib/l10n/app_hi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2863,5 +2863,8 @@
}
},
"reportContactLabel": "संपर्क (वैकल्पिक)",
"reportContactHint": "ईमेल या Discord, केवल अगर आप जवाब चाहते हैं"
"reportContactHint": "ईमेल या Discord, केवल अगर आप जवाब चाहते हैं",
"whoopFirmwareWarningTitle": "WHOOP उपयोगकर्ता: WHOOP ऐप से दोबारा कनेक्ट न करें",
"whoopFirmwareWarningAction": "अगर आप OpenStrap या कोई दूसरा ओपन-सोर्स ऐप इस्तेमाल करते हैं, या बाद में किसी पर जाने की सोच रहे हैं, तो अपना बैंड आधिकारिक WHOOP ऐप से दोबारा कनेक्ट न करें। वह फ़र्मवेयर अपडेट अपने-आप इंस्टॉल कर सकता है। WHOOP ऐप को अनइंस्टॉल या अक्षम कर दें, ताकि वह आपके बैंड को अपडेट न कर सके।",
"whoopFirmwareWarningDetails": "WHOOP 5.0 / MG के फ़र्मवेयर 50.43.1.0 और 50.43.2.0 के बारे में रिपोर्टें बताती हैं कि डेटा तक पहुँच रोक दी जाती है। ब्लूटूथ फिर भी कनेक्ट हो सकता है। प्रभावित बैंड को अनलॉक करने के लिए WHOOP द्वारा साइन किया गया मेंबरशिप टोकन चाहिए, जिसे OpenStrap जारी नहीं कर सकता। हम समाधान पर काम कर रहे हैं, लेकिन अभी कोई उपाय उपलब्ध नहीं है।"
}
5 changes: 4 additions & 1 deletion lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2863,5 +2863,8 @@
}
},
"reportContactLabel": "联系方式(可选)",
"reportContactHint": "邮箱或 Discord,仅在你希望得到回复时填写"
"reportContactHint": "邮箱或 Discord,仅在你希望得到回复时填写",
"whoopFirmwareWarningTitle": "WHOOP 用户:请勿重新连接 WHOOP 应用",
"whoopFirmwareWarningAction": "如果你在使用 OpenStrap 或其他开源应用,或打算以后改用,请不要再把手环连接到 WHOOP 官方应用。它可能会自动安装固件更新。请卸载或停用 WHOOP 应用,以免它更新你的手环。",
"whoopFirmwareWarningDetails": "有报告称,WHOOP 5.0 / MG 固件 50.43.1.0 和 50.43.2.0 会阻止访问数据。蓝牙可能仍能连接。解锁受影响的手环需要由 WHOOP 签名的会员令牌,OpenStrap 无法签发。我们正在寻找解决办法,但目前还没有可用的修复。"
}
23 changes: 23 additions & 0 deletions test/whoop_firmware_warning_test.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:openstrap_edge/l10n/app_localizations.dart';
import 'package:openstrap_edge/ui2/onboarding/pairing.dart';
import 'package:openstrap_edge/ui2/pairing/device_picker.dart';
import 'package:openstrap_edge/ui2/pairing/whoop_firmware_warning.dart';
import 'package:openstrap_edge/ui2/ui2.dart';

void main() {
// The warning is the one message that keeps a band usable, so it may not
// fall back to English: it shipped translated for ru and th only.
test('every language has its own firmware warning', () {
final en = lookupAppLocalizations(const Locale('en'));
for (final locale in AppLocalizations.supportedLocales) {
if (locale.languageCode == 'en') continue;
final l = lookupAppLocalizations(locale);
final code = locale.languageCode;
expect(l.whoopFirmwareWarningTitle, isNot(en.whoopFirmwareWarningTitle),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Wrong locale text passes

When multiple non-English locales resolve to the same non-English warning, every language has its own firmware warning only compares each locale’s strings with English on lines 18–24, so lookups returning the same incorrect non-English translation still pass; the test does not catch users seeing another language’s warning.

Assert each locale’s warning against locale-specific expected text, or otherwise verify that each lookup uses the correct locale’s translation.

Prompt for AI agents
In `test/whoop_firmware_warning_test.dart` at line 18:

**Wrong locale text passes**

When multiple non-English locales resolve to the same non-English warning, `every language has its own firmware warning` only compares each locale’s strings with English on lines 18–24, so lookups returning the same incorrect non-English translation still pass; the test does not catch users seeing another language’s warning.

Assert each locale’s warning against locale-specific expected text, or otherwise verify that each lookup uses the correct locale’s translation.

reason: code);
expect(l.whoopFirmwareWarningAction, isNot(en.whoopFirmwareWarningAction),
reason: code);
expect(
l.whoopFirmwareWarningDetails, isNot(en.whoopFirmwareWarningDetails),
reason: code);
// The facts a translation must not lose.
expect(l.whoopFirmwareWarningTitle, contains('WHOOP'), reason: code);
expect(l.whoopFirmwareWarningDetails, contains('50.43.1.0'), reason: code);
expect(l.whoopFirmwareWarningDetails, contains('50.43.2.0'), reason: code);
}
});

for (final brightness in Brightness.values) {
testWidgets('connection warning precedes search in $brightness', (t) async {
t.view.physicalSize = const Size(390, 844);
Expand Down