What changed, and why it matters
This commit removes conditional code that previously hid Spanish, German, and Japanese language support when building a Bitcoin-only firmware variant. After the change, all firmware builds expose the same set of languages. There is no security-relevant change in the diff: no cryptographic, authentication, parsing, memory-handling, or access-control code is modified.
No security action required. Treat as a routine localization/build cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes #ifndef BTC_ONLY / #endif guards around LANG_ES, LANG_DE, LANG_JA entries in the language table, font table, and enum, and unifies SUPPORT_WALLET_INDEX to SETUP_JAPANESE regardless of BTC_ONLY. It also tweaks an AStyle batch script exclusion list. These are build-configuration and localization cleanups with no evident security impact.
Changed components
src/ui/gui_frame/gui_style.csrc/ui/gui_widgets/gui_setup_widgets.csrc/ui/lv_i18n/lv_i18n_api.csrc/ui/lv_i18n/lv_i18n_api.htools/AStyle.batInspect captured patch +1 / −11
diff --git a/src/ui/gui_frame/gui_style.c b/src/ui/gui_frame/gui_style.c
index f2cf7d7..5dea329 100644
--- a/src/ui/gui_frame/gui_style.c
+++ b/src/ui/gui_frame/gui_style.c
@@ -22,11 +22,9 @@ static const GuiFontDesc_t g_langFontArr[] = {
{LANG_RU, &ruTitle, &ruLittleTitle, &ruText, &ruIllustrate, &ruIllustrate},
{LANG_ZH_CN, &cnTitle, &cnLittleTitle, &cnText, &cnIllustrate, &cnIllustrate},
{LANG_KO, &koTitle, &koLittleTitle, &koText, &koIllustrate, &koIllustrate},
-#ifndef BTC_ONLY
{LANG_ES, &esTitle, &esLittleTitle, &esText, &esIllustrate, &esIllustrate},
{LANG_DE, &deTitle, &deLittleTitle, &deText, &deIllustrate, &deIllustrate},
{LANG_JA, &jaTitle, &jaLittleTitle, &jaText, &jaIllustrate, &jaIllustrate},
-#endif
};
static void GuiBtnmStyleInit(void)
diff --git a/src/ui/gui_widgets/gui_setup_widgets.c b/src/ui/gui_widgets/gui_setup_widgets.c
index 1ef314d..aa4ec38 100644
--- a/src/ui/gui_widgets/gui_setup_widgets.c
+++ b/src/ui/gui_widgets/gui_setup_widgets.c
@@ -22,11 +22,7 @@ typedef enum {
SETUP_LANGUAGE_BUTT,
} SETUP_LANGUAGE_ENUM;
-#ifdef BTC_ONLY
-#define SUPPORT_WALLET_INDEX SETUP_KOREAN
-#else
#define SUPPORT_WALLET_INDEX SETUP_JAPANESE
-#endif
static const char *g_languageList[] = {
"English",
diff --git a/src/ui/lv_i18n/lv_i18n_api.c b/src/ui/lv_i18n/lv_i18n_api.c
index 176a505..04513f4 100644
--- a/src/ui/lv_i18n/lv_i18n_api.c
+++ b/src/ui/lv_i18n/lv_i18n_api.c
@@ -14,11 +14,9 @@ const LanguageInfo_t g_languageList[] = {
{LANG_RU, "ru"},
{LANG_ZH_CN, "zh-CN"},
{LANG_KO, "ko"},
-#ifndef BTC_ONLY
{LANG_ES, "es"},
{LANG_DE, "de"},
{LANG_JA, "ja"},
-#endif
};
static uint8_t g_curLangIndex = LANG_EN;
diff --git a/src/ui/lv_i18n/lv_i18n_api.h b/src/ui/lv_i18n/lv_i18n_api.h
index fbb82a5..47a5a84 100644
--- a/src/ui/lv_i18n/lv_i18n_api.h
+++ b/src/ui/lv_i18n/lv_i18n_api.h
@@ -8,11 +8,9 @@ typedef enum {
LANG_RU,
LANG_ZH_CN,
LANG_KO,
-#ifndef BTC_ONLY
LANG_ES,
LANG_DE,
LANG_JA,
-#endif
LANG_TYPE_BUTT,
} LANG_TYPE_ENUM;
diff --git a/tools/AStyle.bat b/tools/AStyle.bat
index cf4219b..a798ed2 100644
--- a/tools/AStyle.bat
+++ b/tools/AStyle.bat
@@ -1,3 +1,3 @@
-astyle -A3nrUpHcQ --exclude=../src/cm_backtrace/Languages --exclude=../src/ui/gui_assets/coin --exclude=../src/ui/gui_assets/emoji --exclude=../src/ui/gui_assets/img --exclude=../src/ui/gui_assets/wallet --exclude=../src/ui/gui_assets/walletList ../src/*.c ../src/*.h
+astyle -A3nrUpHcQ --exclude=../src/cm_backtrace/Languages --exclude=../src/ui/gui_assets/coin --exclude=../src/ui/gui_assets/emoji --exclude=../src/ui/gui_assets/img --exclude=../src/ui/gui_assets/wallet ../src/*.c ../src/*.h
pause
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.