From 69cd8ba0488cc97e60f22d5db4c82892b5c662f0 Mon Sep 17 00:00:00 2001 From: DanS Date: Sat, 4 Jul 2026 01:19:30 -0500 Subject: [PATCH] i18n(market): route chart interval labels + "Updated" through TR() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add market_iv_1h/1d/1w/1m and market_updated ("· Updated %s") keys and use them in the chart interval strip (previously hardcoded "1H"/"1D"/"1W"/"1M") and the pair-selector attribution line (previously a literal "· Updated %s"). Closes the audit's i18n gaps in the market tab. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/market_tab.cpp | 5 +++-- src/util/i18n.cpp | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index 5103f85..21eebac 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -1386,7 +1386,7 @@ static void mktDrawPairSelector(App* app, const std::vector& Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("market_attribution")); if (!market.last_updated.empty()) { ImGui::SameLine(0, 12); - snprintf(buf, sizeof(buf), " \xc2\xb7 Updated %s", market.last_updated.c_str()); + snprintf(buf, sizeof(buf), TR("market_updated"), market.last_updated.c_str()); Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), buf); } ImGui::Dummy(ImVec2(0, gap)); @@ -1582,7 +1582,8 @@ static void mktDrawPriceChart(const MktCtx& cx) // Interval buttons (left). Live = in-session buffer; the rest are historical. const struct { const char* lbl; int iv; } kIvs[] = { - { TR("market_iv_live"), 0 }, { "1H", 1 }, { "1D", 2 }, { "1W", 3 }, { "1M", 4 } + { TR("market_iv_live"), 0 }, { TR("market_iv_1h"), 1 }, { TR("market_iv_1d"), 2 }, + { TR("market_iv_1w"), 3 }, { TR("market_iv_1m"), 4 } }; float bx = chartMin.x + chartPad; for (int b = 0; b < 5; b++) { diff --git a/src/util/i18n.cpp b/src/util/i18n.cpp index d951975..c8f7f19 100644 --- a/src/util/i18n.cpp +++ b/src/util/i18n.cpp @@ -1112,6 +1112,11 @@ void I18n::loadBuiltinEnglish() strings_["market_24h_volume"] = "24H VOLUME"; strings_["market_6h"] = "6h"; strings_["market_iv_live"] = "Live"; + strings_["market_iv_1h"] = "1H"; + strings_["market_iv_1d"] = "1D"; + strings_["market_iv_1w"] = "1W"; + strings_["market_iv_1m"] = "1M"; + strings_["market_updated"] = "\xc2\xb7 Updated %s"; strings_["market_vol_short"] = "Vol"; strings_["market_cap_short"] = "Cap"; strings_["market_attribution"] = "Price data from CoinGecko";