fix: sidebar nav text overflow for long translations

- Add text scaling for section labels (TOOLS, ADVANCED) in sidebar
- Separate explorer_section key from explorer nav label to fix ALL CAPS
- Shorten long sidebar translations: es/pt settings, pt overview, ru tools/advanced
- Fix explorer translations from ALL CAPS to proper case in all languages
This commit is contained in:
2026-04-12 18:45:48 -05:00
parent 40cec14ebf
commit aa26ab5fbd
24 changed files with 22297 additions and 20583 deletions

View File

@@ -1675,7 +1675,7 @@ void RenderSettingsPage(App* app) {
// EXPLORER & OPTIONS — full-width card
// ====================================================================
{
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("explorer"));
Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("explorer_section"));
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
ImVec2 cardMin = ImGui::GetCursorScreenPos();

View File

@@ -557,15 +557,21 @@ inline bool RenderSidebar(NavPage& current, float sidebarWidth, float contentHei
if (showLabels) {
ImFont* olFont = Type().overline();
float olFontSz = ScaledFontSize(olFont);
float maxSectionW = panelRight - wp.x - sbSectionLabelPadLeft;
int si = 0;
for (int i = 0; i < (int)NavPage::Count_; ++i) {
if (kNavItems[i].section_label && si < nSectionLabels) {
float ly = panelTopY + sectionLabelY[si++];
const char* sLabel = NavSectionLabel(kNavItems[i]);
float drawFsz = olFontSz;
ImVec2 sLabelSz = olFont->CalcTextSizeA(drawFsz, 1000.0f, 0.0f, sLabel);
if (sLabelSz.x > maxSectionW && maxSectionW > 0)
drawFsz *= maxSectionW / sLabelSz.x;
ImVec4 olCol = ImGui::ColorConvertU32ToFloat4(OnSurfaceMedium());
olCol.w *= expandFrac;
dl->AddText(olFont, olFontSz,
dl->AddText(olFont, drawFsz,
ImVec2(wp.x + sbSectionLabelPadLeft, ly),
ImGui::ColorConvertFloat4ToU32(olCol), NavSectionLabel(kNavItems[i]));
ImGui::ColorConvertFloat4ToU32(olCol), sLabel);
}
}
} else {

View File

@@ -195,7 +195,7 @@ static void RenderSyncBanner(const WalletState& state) {
? (float)state.sync.blocks / state.sync.headers * 100.0f : 0.0f;
char syncBuf[128];
snprintf(syncBuf, sizeof(syncBuf),
"Blockchain syncing (%.1f%%)... Balances may be inaccurate.", syncPct);
TR("blockchain_syncing"), syncPct);
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::ColorConvertU32ToFloat4(schema::UI().resolveColor(schema::UI().drawElement("tabs.send", "sync-banner-bg-color").color)));
float syncH = std::max(schema::UI().drawElement("tabs.send", "sync-banner-min-height").size, schema::UI().drawElement("tabs.send", "sync-banner-height").size * Layout::vScale());
ImGui::BeginChild("##SyncBanner", ImVec2(ImGui::GetContentRegionAvail().x, syncH),