FIX: translation for cut

Change-Id: I31f755b857f07e920fe6e50d48f4aa34a53e07da
This commit is contained in:
zhimin.zeng 2023-03-17 14:30:58 +08:00 committed by Lane.Wei
parent 292f7e2c21
commit e031708043
24 changed files with 3079 additions and 539 deletions

View file

@ -2424,10 +2424,10 @@ bool ObjectList::del_from_cut_object(bool is_cut_connector, bool is_model_part/*
const wxString msg_end = is_cut_connector ? ("\n" + _L("To save cut correspondence you can delete all connectors from all related objects.")) : "";
InfoDialog dialog(wxGetApp().plater(), title,
_L("This action will break a cut correspondence.\n"
(_L("This action will break a cut correspondence.\n"
"After that model consistency can't be guaranteed .\n"
"\n"
"To manipulate with solid parts or negative volumes you have to invalidate cut infornation first." + msg_end ),
"To manipulate with solid parts or negative volumes you have to invalidate cut infornation first.") + msg_end ),
false, buttons_style | wxCANCEL_DEFAULT | wxICON_WARNING);
dialog.SetButtonLabel(wxID_YES, _L("Invalidate cut info"));

View file

@ -1607,18 +1607,18 @@ void GLGizmoAdvancedCut::render_connectors_input_window(float x, float y, float
void GLGizmoAdvancedCut::render_input_window_warning() const
{
if (m_has_invalid_connector) {
wxString out = /*wxString(ImGui::WarningMarkerSmall)*/ "Warning: " + _L("Invalid connectors detected") + ":";
wxString out = /*wxString(ImGui::WarningMarkerSmall)*/ _L("Warning") + ": " + _L("Invalid connectors detected") + ":";
if (m_info_stats.outside_cut_contour > size_t(0))
out += "\n - " + std::to_string(m_info_stats.outside_cut_contour) +
(m_info_stats.outside_cut_contour == 1 ? L("connector is out of cut contour") : L("connectors are out of cut contour"));
(m_info_stats.outside_cut_contour == 1 ? _L("connector is out of cut contour") : _L("connectors are out of cut contour"));
if (m_info_stats.outside_bb > size_t(0))
out += "\n - " + std::to_string(m_info_stats.outside_bb) +
(m_info_stats.outside_bb == 1 ? L("connector is out of object") : L("connectors is out of object"));
(m_info_stats.outside_bb == 1 ? _L("connector is out of object") : _L("connectors is out of object"));
if (m_info_stats.is_overlap)
out += "\n - " + _L("Some connectors are overlapped");
m_imgui->text(out);
}
if (!m_keep_upper && !m_keep_lower) m_imgui->text(/*wxString(ImGui::WarningMarkerSmall)*/"Warning: " + _L("Invalid state. \nNo one part is selected for keep after cut"));
if (!m_keep_upper && !m_keep_lower) m_imgui->text(/*wxString(ImGui::WarningMarkerSmall)*/_L("Warning") + ": " + _L("Invalid state. \nNo one part is selected for keep after cut"));
}
bool GLGizmoAdvancedCut::render_reset_button(const std::string &label_id, const std::string &tooltip) const
@ -1651,10 +1651,10 @@ bool GLGizmoAdvancedCut::render_connect_type_radio_button(CutConnectorType type)
wxString radio_name;
switch (type) {
case CutConnectorType::Plug:
radio_name = L("Plug");
radio_name = _L("Plug");
break;
case CutConnectorType::Dowel:
radio_name = L("Dowel");
radio_name = _L("Dowel");
break;
default:
break;

View file

@ -233,10 +233,6 @@ void Button::messureSize()
{
wxClientDC dc(this);
dc.GetTextExtent(GetLabel(), &textSize.width, &textSize.height, &textSize.x, &textSize.y);
if (minSize.GetWidth() > 0) {
wxWindow::SetMinSize(minSize);
return;
}
wxSize szContent = textSize.GetSize();
if (this->active_icon.bmp().IsOk()) {
if (szContent.y > 0) {
@ -251,7 +247,11 @@ void Button::messureSize()
wxSize size = szContent + paddingSize * 2;
if (minSize.GetHeight() > 0)
size.SetHeight(minSize.GetHeight());
wxWindow::SetMinSize(size);
if (minSize.GetWidth() > size.GetWidth())
wxWindow::SetMinSize(minSize);
else
wxWindow::SetMinSize(size);
}
void Button::mouseDown(wxMouseEvent& event)