feat: Full UI internationalization, pool hashrate stats, and layout caching
- Replace all hardcoded English strings with TR() translation keys across every tab, dialog, and component (~20 UI files) - Expand all 8 language files (de, es, fr, ja, ko, pt, ru, zh) with complete translations (~37k lines added) - Improve i18n loader with exe-relative path fallback and English base fallback for missing keys - Add pool-side hashrate polling via pool stats API in xmrig_manager - Introduce Layout::beginFrame() per-frame caching and refresh balance layout config only on schema generation change - Offload daemon output parsing to worker thread - Add CJK subset fallback font for Chinese/Japanese/Korean glyphs
This commit is contained in:
@@ -69,16 +69,14 @@ void ExportAllKeysDialog::render(App* app)
|
||||
auto exportBtn = S.button("dialogs.export-all-keys", "export-button");
|
||||
auto closeBtn = S.button("dialogs.export-all-keys", "close-button");
|
||||
|
||||
if (material::BeginOverlayDialog("Export All Private Keys", &s_open, win.width, 0.94f)) {
|
||||
if (material::BeginOverlayDialog(TR("export_keys_title"), &s_open, win.width, 0.94f)) {
|
||||
// Warning
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.4f, 0.4f, 1.0f));
|
||||
ImGui::PushFont(material::Type().iconSmall());
|
||||
ImGui::Text(ICON_MD_WARNING);
|
||||
ImGui::PopFont();
|
||||
ImGui::SameLine(0, 4.0f);
|
||||
ImGui::TextWrapped("DANGER: This will export ALL private keys from your wallet! "
|
||||
"Anyone with access to this file can steal your funds. "
|
||||
"Store it securely and delete after use.");
|
||||
ImGui::TextWrapped("%s", TR("export_keys_danger"));
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -90,19 +88,19 @@ void ExportAllKeysDialog::render(App* app)
|
||||
}
|
||||
|
||||
// Options
|
||||
ImGui::Text("Export options:");
|
||||
ImGui::Checkbox("Include Z-addresses (shielded)", &s_include_z);
|
||||
ImGui::Checkbox("Include T-addresses (transparent)", &s_include_t);
|
||||
ImGui::Text("%s", TR("export_keys_options"));
|
||||
ImGui::Checkbox(TR("export_keys_include_z"), &s_include_z);
|
||||
ImGui::Checkbox(TR("export_keys_include_t"), &s_include_t);
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
// Filename
|
||||
ImGui::Text("Output filename:");
|
||||
ImGui::Text("%s", TR("output_filename"));
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
ImGui::InputText("##Filename", s_filename, sizeof(s_filename));
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::TextDisabled("File will be saved in: ~/.config/ObsidianDragon/");
|
||||
ImGui::TextDisabled("%s", TR("file_save_location"));
|
||||
|
||||
if (s_exporting) {
|
||||
ImGui::EndDisabled();
|
||||
@@ -117,7 +115,7 @@ void ExportAllKeysDialog::render(App* app)
|
||||
ImGui::BeginDisabled();
|
||||
}
|
||||
|
||||
if (material::StyledButton("Export Keys", ImVec2(exportBtn.width, 0), S.resolveFont(exportBtn.font))) {
|
||||
if (material::StyledButton(TR("export_keys_btn"), ImVec2(exportBtn.width, 0), S.resolveFont(exportBtn.font))) {
|
||||
if (!s_include_z && !s_include_t) {
|
||||
Notifications::instance().warning("Select at least one address type");
|
||||
} else if (!app->rpc() || !app->rpc()->isConnected()) {
|
||||
@@ -215,7 +213,7 @@ void ExportAllKeysDialog::render(App* app)
|
||||
s_exporting = false;
|
||||
if (writeOk) {
|
||||
s_status = "Exported to: " + filepath;
|
||||
Notifications::instance().success("Keys exported successfully");
|
||||
Notifications::instance().success(TR("export_keys_success"));
|
||||
} else {
|
||||
s_status = "Failed to write file";
|
||||
Notifications::instance().error("Failed to save key file");
|
||||
@@ -229,11 +227,11 @@ void ExportAllKeysDialog::render(App* app)
|
||||
if (s_exporting) {
|
||||
ImGui::EndDisabled();
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled("Exporting %d/%d...", s_exported_count, s_total_addresses);
|
||||
ImGui::TextDisabled(TR("export_keys_progress"), s_exported_count, s_total_addresses);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (material::StyledButton("Close", ImVec2(closeBtn.width, 0), S.resolveFont(closeBtn.font))) {
|
||||
if (material::StyledButton(TR("close"), ImVec2(closeBtn.width, 0), S.resolveFont(closeBtn.font))) {
|
||||
s_open = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user