mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed localization of 3D scene toolbar tips.
This commit is contained in:
parent
0cfac53d24
commit
8126ec33fc
10 changed files with 39 additions and 27 deletions
|
@ -3035,10 +3035,10 @@ void GLCanvas3D::set_tooltip(const std::string& tooltip) const
|
|||
if (tooltip.empty())
|
||||
m_canvas->UnsetToolTip();
|
||||
else
|
||||
t->SetTip(tooltip);
|
||||
t->SetTip(wxString::FromUTF8(tooltip.data()));
|
||||
}
|
||||
else if (!tooltip.empty()) // Avoid "empty" tooltips => unset of the empty tooltip leads to application crash under OSX
|
||||
m_canvas->SetToolTip(tooltip);
|
||||
m_canvas->SetToolTip(wxString::FromUTF8(tooltip.data()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3389,7 +3389,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "add.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Add...") + " [" + GUI::shortkey_ctrl_prefix() + "I]";
|
||||
item.tooltip = _utf8(L("Add...")) + " [" + GUI::shortkey_ctrl_prefix() + "I]";
|
||||
item.sprite_id = 0;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_ADD)); };
|
||||
if (!m_toolbar.add_item(item))
|
||||
|
@ -3399,7 +3399,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "remove.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Delete") + " [Del]";
|
||||
item.tooltip = _utf8(L("Delete")) + " [Del]";
|
||||
item.sprite_id = 1;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_DELETE)); };
|
||||
item.enabled_state_callback = []()->bool { return wxGetApp().plater()->can_delete(); };
|
||||
|
@ -3410,7 +3410,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "delete_all.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Delete all") + " [" + GUI::shortkey_ctrl_prefix() + "Del]";
|
||||
item.tooltip = _utf8(L("Delete all")) + " [" + GUI::shortkey_ctrl_prefix() + "Del]";
|
||||
item.sprite_id = 2;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_DELETE_ALL)); };
|
||||
item.enabled_state_callback = []()->bool { return wxGetApp().plater()->can_delete_all(); };
|
||||
|
@ -3421,7 +3421,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "arrange.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Arrange [A]");
|
||||
item.tooltip = _utf8(L("Arrange")) + " [A]";
|
||||
item.sprite_id = 3;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_ARRANGE)); };
|
||||
item.enabled_state_callback = []()->bool { return wxGetApp().plater()->can_arrange(); };
|
||||
|
@ -3435,7 +3435,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "copy.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Copy") + " [" + GUI::shortkey_ctrl_prefix() + "C]";
|
||||
item.tooltip = _utf8(L("Copy")) + " [" + GUI::shortkey_ctrl_prefix() + "C]";
|
||||
item.sprite_id = 4;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_COPY)); };
|
||||
item.enabled_state_callback = []()->bool { return wxGetApp().plater()->can_copy(); };
|
||||
|
@ -3446,7 +3446,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "paste.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Paste") + " [" + GUI::shortkey_ctrl_prefix() + "V]";
|
||||
item.tooltip = _utf8(L("Paste")) + " [" + GUI::shortkey_ctrl_prefix() + "V]";
|
||||
item.sprite_id = 5;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_PASTE)); };
|
||||
item.enabled_state_callback = []()->bool { return wxGetApp().plater()->can_paste(); };
|
||||
|
@ -3460,7 +3460,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "instance_add.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Add instance [+]");
|
||||
item.tooltip = _utf8(L("Add instance")) + " [+]";
|
||||
item.sprite_id = 6;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_MORE)); };
|
||||
item.visibility_callback = []()->bool { return wxGetApp().get_mode() != comSimple; };
|
||||
|
@ -3472,7 +3472,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "instance_remove.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Remove instance [-]");
|
||||
item.tooltip = _utf8(L("Remove instance")) + " [-]";
|
||||
item.sprite_id = 7;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_FEWER)); };
|
||||
item.visibility_callback = []()->bool { return wxGetApp().get_mode() != comSimple; };
|
||||
|
@ -3487,7 +3487,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "split_objects.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Split to objects");
|
||||
item.tooltip = _utf8(L("Split to objects"));
|
||||
item.sprite_id = 8;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_SPLIT_OBJECTS)); };
|
||||
item.visibility_callback = GLToolbarItem::Default_Visibility_Callback;
|
||||
|
@ -3499,7 +3499,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "split_parts.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Split to parts");
|
||||
item.tooltip = _utf8(L("Split to parts"));
|
||||
item.sprite_id = 9;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_SPLIT_VOLUMES)); };
|
||||
item.visibility_callback = []()->bool { return wxGetApp().get_mode() != comSimple; };
|
||||
|
@ -3514,7 +3514,7 @@ bool GLCanvas3D::_init_toolbar()
|
|||
#if ENABLE_SVG_ICONS
|
||||
item.icon_filename = "layers_white.svg";
|
||||
#endif // ENABLE_SVG_ICONS
|
||||
item.tooltip = GUI::L_str("Layers editing");
|
||||
item.tooltip = _utf8(L("Layers editing"));
|
||||
item.sprite_id = 10;
|
||||
item.is_toggable = true;
|
||||
item.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING)); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue