i18n(market): route chart interval labels + "Updated" through TR()
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) <noreply@anthropic.com>
This commit is contained in:
@@ -1386,7 +1386,7 @@ static void mktDrawPairSelector(App* app, const std::vector<data::ExchangeInfo>&
|
|||||||
Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("market_attribution"));
|
Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("market_attribution"));
|
||||||
if (!market.last_updated.empty()) {
|
if (!market.last_updated.empty()) {
|
||||||
ImGui::SameLine(0, 12);
|
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);
|
Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), buf);
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0, gap));
|
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.
|
// Interval buttons (left). Live = in-session buffer; the rest are historical.
|
||||||
const struct { const char* lbl; int iv; } kIvs[] = {
|
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;
|
float bx = chartMin.x + chartPad;
|
||||||
for (int b = 0; b < 5; b++) {
|
for (int b = 0; b < 5; b++) {
|
||||||
|
|||||||
@@ -1112,6 +1112,11 @@ void I18n::loadBuiltinEnglish()
|
|||||||
strings_["market_24h_volume"] = "24H VOLUME";
|
strings_["market_24h_volume"] = "24H VOLUME";
|
||||||
strings_["market_6h"] = "6h";
|
strings_["market_6h"] = "6h";
|
||||||
strings_["market_iv_live"] = "Live";
|
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_vol_short"] = "Vol";
|
||||||
strings_["market_cap_short"] = "Cap";
|
strings_["market_cap_short"] = "Cap";
|
||||||
strings_["market_attribution"] = "Price data from CoinGecko";
|
strings_["market_attribution"] = "Price data from CoinGecko";
|
||||||
|
|||||||
Reference in New Issue
Block a user