Lokalization: Following-up previous commits:

* GCodeViewer : Used format() instead of sprintf()
 * Added comments to translators
 * Updated POT and merged with community dictionaries
This commit is contained in:
YuSanka 2023-05-26 12:44:12 +02:00
parent 1a82b5b5ff
commit 85b963704a
17 changed files with 18246 additions and 17168 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3311,11 +3311,9 @@ void GCodeViewer::render_legend(float& legend_height)
::sprintf(buf, "%.1f%%", 100.0f * percent); ::sprintf(buf, "%.1f%%", 100.0f * percent);
ImGui::TextUnformatted((percent > 0.0f) ? buf : ""); ImGui::TextUnformatted((percent > 0.0f) ? buf : "");
ImGui::SameLine(offsets[2]); ImGui::SameLine(offsets[2]);
::sprintf(buf, "%.2f %s", used_filament_m, (imperial_units ? inches : metres).c_str()); imgui.text(format("%1$.2f %2%", used_filament_m, (imperial_units ? inches : metres)));
imgui.text(buf);
ImGui::SameLine(offsets[3]); ImGui::SameLine(offsets[3]);
::sprintf(buf, "%.2f %s", used_filament_g, grams.c_str()); imgui.text(format("%1$.2f %2%", used_filament_g, grams));
imgui.text(buf);
} }
} }
else { else {
@ -3335,13 +3333,10 @@ void GCodeViewer::render_legend(float& legend_height)
ImGui::TextUnformatted((percent > 0.0f) ? buf : ""); ImGui::TextUnformatted((percent > 0.0f) ? buf : "");
} }
else if (used_filament_m > 0.0) { else if (used_filament_m > 0.0) {
char buf[64];
ImGui::SameLine(offsets[0]); ImGui::SameLine(offsets[0]);
::sprintf(buf, "%.2f %s", used_filament_m, (imperial_units ? inches : metres).c_str()); imgui.text(format("%1$.2f %2%", used_filament_m, (imperial_units ? inches : metres)));
imgui.text(buf);
ImGui::SameLine(offsets[1]); ImGui::SameLine(offsets[1]);
::sprintf(buf, "%.2f %s", used_filament_g, grams.c_str()); imgui.text(format("%1$.2f %2%", used_filament_g, grams));
imgui.text(buf);
} }
} }

View File

@ -336,7 +336,10 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
ImVec4 first_color = ImGuiWrapper::to_ImVec4(select_first_color); ImVec4 first_color = ImGuiWrapper::to_ImVec4(select_first_color);
const std::string first_label = into_u8(m_desc.at("first_color")) + "##color_picker"; const std::string first_label = into_u8(m_desc.at("first_color")) + "##color_picker";
if (ImGui::ColorEdit4(first_label.c_str(), (float*)&first_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel, if (ImGui::ColorEdit4(first_label.c_str(), (float*)&first_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel,
_u8L("Current").c_str(), _u8L("Original").c_str())) // TRN Means "current color"
_u8L("Current").c_str(),
// TRN Means "original color"
_u8L("Original").c_str()))
m_modified_extruders_colors[m_first_selected_extruder_idx] = ImGuiWrapper::from_ImVec4(first_color); m_modified_extruders_colors[m_first_selected_extruder_idx] = ImGuiWrapper::from_ImVec4(first_color);
ImGui::AlignTextToFramePadding(); ImGui::AlignTextToFramePadding();