ENH: update translation

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I9b260cb3e21b9052c9a2d65378bd0e795f6db6f3
(cherry picked from commit 2507eba37d5f09cca51b3e9f9f281b2208e57eb1)
This commit is contained in:
xun.zhang 2025-01-17 00:29:54 +08:00 committed by Noisyfox
parent 1ab2f775fc
commit c605f73d80
8 changed files with 631 additions and 38 deletions

File diff suppressed because one or more lines are too long

View file

@ -51,13 +51,12 @@ FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, w
{
const wxString AutoForFlushLabel = _L("Filament-Saving Mode");
const wxString AutoForMatchLabel = _L("Convenient Mode");
const wxString ManualLabel = _L("Manual Mode");
const wxString ManualLabel = _L("Custom Mode");
const wxString AutoForFlushDetail = _L("Calculate the best filament arrangement "
"to minimize usage. Need to manually arrange filaments on the printer "
const wxString AutoForFlushDetail = _L("Calculate the best filament grouping "
"to minimize filament waste. Need to manually place filaments on the printer "
"based on slicing results.");
const wxString AutoForMatchDetail = _L("Use AMS filaments to automatically assign filament "
"to the left or right nozzle.");
const wxString AutoForMatchDetail = _L("Calculate the filament grouping based on the printer's filaments, reducing the need for adjusting filaments at the printer.");
const wxString ManualDetail = _L("Manually assign filament to the left or right nozzle.");
const wxString AutoForFlushDesp = ""; //_L("(Post-slicing arrangement)");
@ -145,13 +144,15 @@ FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, w
{
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
const std::string wiki_path = Slic3r::resources_dir() + "/wiki/filament_group_wiki_zh.html";
auto* wiki_sizer = new wxBoxSizer(wxHORIZONTAL);
wiki_link = new wxStaticText(this, wxID_ANY, _L("Learn more"));
wiki_link->SetBackgroundColour(BackGroundColor);
wiki_link->SetForegroundColour(GreenColor);
wiki_link->SetFont(Label::Body_12.Underlined());
wiki_link->SetCursor(wxCursor(wxCURSOR_HAND));
wiki_link->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent &) { wxLaunchDefaultBrowser("http//:example.com"); });
wiki_link->Bind(wxEVT_LEFT_DOWN, [wiki_path](wxMouseEvent &) { wxLaunchDefaultBrowser(wxString(wiki_path.c_str())); });
wiki_sizer->Add(wiki_link, 0, wxALIGN_CENTER | wxALL, FromDIP(3));
button_sizer->Add(wiki_sizer, 0, wxLEFT, horizontal_margin);

View file

@ -116,7 +116,7 @@ FilamentMapDialog::FilamentMapDialog(wxWindow *parent,
bool machine_synced,
bool show_default,
bool with_checkbox)
: wxDialog(parent, wxID_ANY, _L("Filament arrangement"), wxDefaultPosition, wxDefaultSize,wxDEFAULT_DIALOG_STYLE), m_filament_color(filament_color), m_filament_map(filament_map)
: wxDialog(parent, wxID_ANY, _L("Filament grouping"), wxDefaultPosition, wxDefaultSize,wxDEFAULT_DIALOG_STYLE), m_filament_color(filament_color), m_filament_map(filament_map)
{
SetBackgroundColour(*wxWHITE);

View file

@ -56,7 +56,7 @@ FilamentMapManualPanel::FilamentMapManualPanel(wxWindow *p
top_sizer->Add(drag_sizer, 0, wxALIGN_CENTER | wxEXPAND);
m_tips = new Label(this, _L("Tips: You can drag the filaments to reassign them to different nozzles.\n"
"But your filament arrangement may not be the most efficient for filament usage."));
"But your filament grouping may not be the most efficient for filament usage."));
m_tips->SetFont(Label::Body_14);
m_tips->SetForegroundColour(TextNormalGreyColor);
top_sizer->AddSpacer(FromDIP(8));
@ -273,11 +273,10 @@ void GUI::FilamentMapBtnPanel::Show()
FilamentMapAutoPanel::FilamentMapAutoPanel(wxWindow *parent, FilamentMapMode mode, bool machine_synced) : wxPanel(parent)
{
const wxString AutoForFlushDetail = _L("Calculate the best filament arrangement "
"to minimize usage. Need to manually arrange filaments on the printer "
const wxString AutoForFlushDetail = _L("Calculate the best filament grouping "
"to minimize filament waste. Need to manually place filaments on the printer "
"based on slicing results.");
const wxString AutoForMatchDetail = _L("Use AMS filaments to automatically assign filament "
"to the left or right nozzle.");
const wxString AutoForMatchDetail = _L("Calculate the filament grouping based on the printer's filaments, reducing the need for adjusting filaments at the printer.");
auto sizer = new wxBoxSizer(wxHORIZONTAL);
m_flush_panel = new FilamentMapBtnPanel(this, _L("Filament-Saving Mode"), AutoForFlushDetail, "flush_mode_panel_icon");
@ -345,7 +344,7 @@ FilamentMapDefaultPanel::FilamentMapDefaultPanel(wxWindow *parent) : wxPanel(par
{
auto sizer = new wxBoxSizer(wxHORIZONTAL);
m_label = new Label(this, _L("The filament arrangement for current plate follows the global settings."));
m_label = new Label(this, _L("The filament grouping for current plate follows the global settings."));
m_label->SetFont(Label::Body_14);
m_label->SetBackgroundColour(*wxWHITE);

View file

@ -4432,7 +4432,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
// click behavior
if (ImGui::IsMouseHoveringRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), true)) {
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
MessageDialog msg_dlg(nullptr, _L("Automatically re-slice according to the optimal filament arrangement, and the arrangement results will be displayed after slicing."), wxEmptyString, wxOK | wxCANCEL);
MessageDialog msg_dlg(nullptr, _L("Automatically re-slice according to the optimal filament grouping, and the grouping results will be displayed after slicing."), wxEmptyString, wxOK | wxCANCEL);
if (msg_dlg.ShowModal() == wxID_OK) {
PartPlateList &partplate_list = wxGetApp().plater()->get_partplate_list();
PartPlate *plate = partplate_list.get_curr_plate();
@ -4461,7 +4461,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
int AMS_filament_max_num = std::max(m_left_extruder_filament.size(), m_right_extruder_filament.size());
float three_words_width = imgui.calc_text_size("ABC"sv).x;
float ams_item_height = std::ceil(AMS_filament_max_num / 4.0f) * (three_words_width * 1.6f + line_height) + line_height * 2;
float AMS_container_height = ams_item_height + line_height * (has_tips ? 6 : 4);
float AMS_container_height = ams_item_height + line_height * (has_tips ? 7 : 5);
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1.f, 1.f, 1.f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(.15f, .18f, .19f, 1.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(window_padding * 3, 0));
@ -4476,9 +4476,9 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
ImGui::Dummy({window_padding, window_padding});
ImGui::PushStyleColor(ImGuiCol_Separator, ImVec4(.8f, .8f, .8f, 1.0f));
if (is_auto)
imgui.title(_u8L("Color Arrangement Recommendation"));
imgui.title(_u8L("Filament Grouping Recommendation"));
else
imgui.title(_u8L("Color Arrangement"));
imgui.title(_u8L("Filament Grouping"));
ImGui::PopStyleColor();
ImGui::Dummy({window_padding, window_padding});
@ -4489,7 +4489,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(0, 0, 0, 20));
ImGui::BeginChild("#LeftAMS", ImVec2(half_width, ams_item_height), false, ImGuiWindowFlags_AlwaysUseWindowPadding);
{
imgui.text(_u8L("Left extruder"));
imgui.text(_u8L("Left nozzle"));
ImGui::Dummy({window_padding, window_padding});
int index = 1;
for (const auto &extruder_filament : m_left_extruder_filament) {
@ -4504,7 +4504,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(0, 0, 0, 20));
ImGui::BeginChild("#RightAMS", ImVec2(half_width, ams_item_height), false, ImGuiWindowFlags_AlwaysUseWindowPadding);
{
imgui.text(_u8L("Right extruder"));
imgui.text(_u8L("Right nozzle"));
ImGui::Dummy({window_padding, window_padding});
int index = 1;
for (const auto &extruder_filament : m_right_extruder_filament) {
@ -4532,8 +4532,8 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
float saved_flush_weight = stats_by_extruder.stats_by_single_extruder.filament_flush_weight - stats_by_extruder.stats_by_multi_extruder_best.filament_flush_weight;
int saved_filament_changed_time = stats_by_extruder.stats_by_single_extruder.filament_change_count - stats_by_extruder.stats_by_multi_extruder_best.filament_change_count;
if (saved_flush_weight > EPSILON || saved_filament_changed_time > 0) {
imgui.text(_u8L("This arrangement would be optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Save %1%g filament and %2% changes than one-extruder printer.")) % number_format(saved_flush_weight) % saved_filament_changed_time).str()), parent_width);
imgui.text(_u8L("Current grouping of slice result is optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Save %1%g filament and %2% changes than one-nozzle printer.")) % number_format(saved_flush_weight) % saved_filament_changed_time).str()), parent_width);
}
} else if (filament_map_mode != fmmAutoForFlush) {
float more_cost = stats_by_extruder.stats_by_multi_extruder_curr.filament_flush_weight - stats_by_extruder.stats_by_multi_extruder_best.filament_flush_weight;
@ -4543,19 +4543,21 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
is_optimal_group = false;
ImVec4 orangeColor = ImVec4(1.0f, 0.5f, 0.0f, 1.0f);
ImGui::PushStyleColor(ImGuiCol_Text, orangeColor);
imgui.text(_u8L("This arrangement is not optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Cost %1%g filament and %2% changes more than optimal arrangement.")) % number_format(more_cost) % more_time).str()), parent_width);
imgui.text(_u8L("Current grouping of slice result is not optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Cost %1%g filament and %2% changes more than optimal grouping.")) % number_format(more_cost) % more_time).str()), parent_width);
ImGui::PopStyleColor(1);
} else {
float saved_flush_weight = stats_by_extruder.stats_by_single_extruder.filament_flush_weight - stats_by_extruder.stats_by_multi_extruder_best.filament_flush_weight;
int saved_filament_changed_time = stats_by_extruder.stats_by_single_extruder.filament_change_count - stats_by_extruder.stats_by_multi_extruder_best.filament_change_count;
if (saved_flush_weight > EPSILON || saved_filament_changed_time > 0) {
imgui.text(_u8L("This arrangement would be optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Save %1%g filament and %2% changes than one-extruder printer.")) % number_format(saved_flush_weight) % saved_filament_changed_time).str()), parent_width);
imgui.text(_u8L("Current grouping of slice result is optimal."));
imgui.text_wrapped(from_u8((boost::format(_u8L("Save %1%g filament and %2% changes than one-nozzle printer.")) % number_format(saved_flush_weight) % saved_filament_changed_time).str()), parent_width);
}
}
}
imgui.text_wrapped(from_u8(_u8L("Please place the filaments on the printer as recommended.")), parent_width);
ImGui::Dummy({window_padding, window_padding});
if (!is_optimal_group) {
link_text_set_to_optional(_u8L("Set to Optimal"));
@ -4563,7 +4565,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
ImGui::Dummy({window_padding, window_padding});
ImGui::SameLine();
}
link_text(_u8L("Rearrange filament"));
link_text(_u8L("Regroup filament"));
ImGui::EndChild();
}

View file

@ -1448,15 +1448,7 @@ static std::pair<bool, bool> construct_extruder_unprintable_error(ObjectFilament
model_prefix = (boost::format(_u8L("The model %s is")) % object_result.object_filaments.front().object->name).str();
tips[idx] += model_prefix;
tips[idx] += (boost::format(_u8L(" located within the %s only area, making it impossible to print with the filaments assigned to %s.\n"
"Please move the model out of the %s only area or adjust the filament assignment.")) % opposite_nozzle_name % nozzle_name % opposite_nozzle_name).str();
if (object_result.object_filaments.size() > 1) {
for (ObjectFilamentInfo& object_filament : left_unprintable_objects)
{
tips[idx] += object_filament.object->name;
tips[idx] += "\n";
}
}
"Please move the model out of the %s only area or adjust the filament assignment.\n")) % opposite_nozzle_name % nozzle_name % opposite_nozzle_name).str();
output_text = tips[idx];
}

View file

@ -1276,10 +1276,10 @@ wxWindow* PreferencesDialog::create_general_page()
#endif
#if 0
auto title_filament_group = create_item_title(_L("Filament Arrange"), page, _L("Filament Arrange"));
auto title_filament_group = create_item_title(_L("Filament Grouping"), page, _L("Filament Grouping"));
//temporarily disable it
//auto item_ignore_ext_filament = create_item_checkbox(_L("Ignore ext filament when auto grouping"), page, _L("Ignore ext filament when auto grouping"), 50, "ignore_ext_filament_when_group");
auto item_pop_up_filament_map_dialog = create_item_checkbox(_L("Pop up to select filament arrangement mode"), page, _L("Pop up to select filament arrangement mode"), 50, "pop_up_filament_map_dialog");
auto item_pop_up_filament_map_dialog = create_item_checkbox(_L("Pop up to select filament grouping mode"), page, _L("Pop up to select filament grouping mode"), 50, "pop_up_filament_map_dialog");
#endif
auto title_develop_mode = create_item_title(_L("Develop mode"), page, _L("Develop mode"));

View file

@ -532,7 +532,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_txt_mapping_sugs->SetMinSize(wxSize(FromDIP(580), -1));
m_txt_mapping_sugs->SetMaxSize(wxSize(FromDIP(580), -1));
m_txt_mapping_sugs->SetBackgroundColour(*wxWHITE);
m_txt_mapping_sugs->SetLabel(_L("Your filament arrangement method is not optimal."));
m_txt_mapping_sugs->SetLabel(_L("Your filament grouping method is not optimal."));
m_mapping_sugs_sizer->Add(m_img_mapping_sugs, 0, wxALIGN_CENTER, 0);
m_mapping_sugs_sizer->Add(m_txt_mapping_sugs, 0, wxALIGN_CENTER, 0);