mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Extend and Update localizations (#12610)
This commit is contained in:
@@ -6396,9 +6396,9 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_values.emplace_back("rectangle");
|
||||
def->enum_values.emplace_back("cone");
|
||||
def->enum_values.emplace_back("rib");
|
||||
def->enum_labels.emplace_back("Rectangle");
|
||||
def->enum_labels.emplace_back("Cone");
|
||||
def->enum_labels.emplace_back("Rib");
|
||||
def->enum_labels.emplace_back(L("Rectangle"));
|
||||
def->enum_labels.emplace_back(L("Cone"));
|
||||
def->enum_labels.emplace_back(L("Rib"));
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<WipeTowerWallType>(wtwRectangle));
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ void Bed_2D::repaint(const std::vector<Vec2d>& shape)
|
||||
dc.DrawText(origin_label, origin_label_x, origin_label_y);
|
||||
|
||||
// ORCA add grid size value as information for large scale beds
|
||||
auto grid_label = wxString("1x1 Grid: " + std::to_string(step) + " mm");
|
||||
auto grid_label = wxString::Format(_L("1x1 Grid: %d mm"), step);
|
||||
Point draw_bb = to_pixels(Vec2d(
|
||||
std::min(m_pos(0),bb.min(0)),
|
||||
std::min(m_pos(1),bb.min(1))
|
||||
|
||||
@@ -515,7 +515,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
// layer_height shouldn't be equal to zero
|
||||
float skin_depth = config->opt_float("skin_infill_depth");
|
||||
if (config->opt_float("infill_lock_depth") > skin_depth) {
|
||||
const wxString msg_text = _(L("Lock depth should smaller than skin depth.\nReset to 50% of skin depth."));
|
||||
const wxString msg_text = _(L("Lock depth should smaller than skin depth.\nReset to 50%% of skin depth."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
|
||||
@@ -523,34 +523,34 @@ bool static check_old_linux_datadir(const wxString& app_name) {
|
||||
#endif
|
||||
|
||||
struct FileWildcards {
|
||||
std::string_view title;
|
||||
const char* title_id;
|
||||
std::vector<std::string_view> file_extensions;
|
||||
};
|
||||
|
||||
static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
|
||||
/* FT_STEP */ { "STEP files"sv, { ".stp"sv, ".step"sv } },
|
||||
/* FT_STL */ { "STL files"sv, { ".stl"sv } },
|
||||
/* FT_OBJ */ { "OBJ files"sv, { ".obj"sv } },
|
||||
/* FT_AMF */ { "AMF files"sv, { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
|
||||
/* FT_3MF */ { "3MF files"sv, { ".3mf"sv } },
|
||||
/* FT_GCODE_3MF */ {"Gcode 3MF files"sv, {".gcode.3mf"sv}},
|
||||
/* FT_GCODE */ { "G-code files"sv, { ".gcode"sv} },
|
||||
/* FT_STEP */ { L("STEP files"), { ".stp"sv, ".step"sv } },
|
||||
/* FT_STL */ { L("STL files"), { ".stl"sv } },
|
||||
/* FT_OBJ */ { L("OBJ files"), { ".obj"sv } },
|
||||
/* FT_AMF */ { L("AMF files"), { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
|
||||
/* FT_3MF */ { L("3MF files"), { ".3mf"sv } },
|
||||
/* FT_GCODE_3MF */ {L("Gcode 3MF files"), {".gcode.3mf"sv}},
|
||||
/* FT_GCODE */ { L("G-code files"), { ".gcode"sv} },
|
||||
#ifdef __APPLE__
|
||||
/* FT_MODEL */
|
||||
{"Supported files"sv, {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
|
||||
#else
|
||||
/* FT_MODEL */
|
||||
{"Supported files"sv, {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".drc"sv}},
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".drc"sv}},
|
||||
#endif
|
||||
/* FT_ZIP */ { "ZIP files"sv, { ".zip"sv } },
|
||||
/* FT_PROJECT */ { "Project files"sv, { ".3mf"sv} },
|
||||
/* FT_GALLERY */ { "Known files"sv, { ".stl"sv, ".obj"sv } },
|
||||
/* FT_ZIP */ { L("ZIP files"), { ".zip"sv } },
|
||||
/* FT_PROJECT */ { L("Project files"), { ".3mf"sv} },
|
||||
/* FT_GALLERY */ { L("Known files"), { ".stl"sv, ".obj"sv } },
|
||||
|
||||
/* FT_INI */ { "INI files"sv, { ".ini"sv } },
|
||||
/* FT_SVG */ { "SVG files"sv, { ".svg"sv } },
|
||||
/* FT_TEX */ { "Texture"sv, { ".png"sv, ".svg"sv } },
|
||||
/* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv } },
|
||||
/* FT_DRC */ { "Draco files"sv, { ".drc"sv } },
|
||||
/* FT_INI */ { L("INI files"), { ".ini"sv } },
|
||||
/* FT_SVG */ { L("SVG files"), { ".svg"sv } },
|
||||
/* FT_TEX */ { L("Texture"), { ".png"sv, ".svg"sv } },
|
||||
/* FT_SL1 */ { L("Masked SLA files"), { ".sl1"sv, ".sl1s"sv } },
|
||||
/* FT_DRC */ { L("Draco files"), { ".drc"sv } },
|
||||
};
|
||||
|
||||
// This function produces a Win32 file dialog file template mask to be consumed by wxWidgets on all platforms.
|
||||
@@ -605,7 +605,8 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
||||
mask += ";*";
|
||||
mask += boost::to_upper_copy(std::string(ext));
|
||||
}
|
||||
return GUI::format_wxstr("%s (%s)|%s", data.title, title, mask);
|
||||
const wxString translated_title = Slic3r::GUI::I18N::translate(data.title_id);
|
||||
return GUI::format_wxstr("%s (%s)|%s", translated_title, title, mask);
|
||||
}
|
||||
|
||||
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
||||
@@ -4401,7 +4402,7 @@ wxString GUI_App::transition_tridid(int trid_id) const
|
||||
if (trid_id == VIRTUAL_TRAY_MAIN_ID || trid_id == VIRTUAL_TRAY_DEPUTY_ID)
|
||||
{
|
||||
assert(0);
|
||||
return wxString("Ext");
|
||||
return _L("Ext");
|
||||
}
|
||||
|
||||
wxString maping_dict[] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
|
||||
|
||||
@@ -68,7 +68,7 @@ AddMachinePanel::AddMachinePanel(wxWindow* parent, wxWindowID id, const wxPoint&
|
||||
m_button_add_machine->SetBorderColor(0x909090);
|
||||
m_button_add_machine->SetMinSize(wxSize(96, 39));
|
||||
btn_sizer->Add(m_button_add_machine, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 5);
|
||||
m_staticText_add_machine = new wxStaticText(this, wxID_ANY, wxT("click to add machine"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_staticText_add_machine = new wxStaticText(this, wxID_ANY, _L("click to add machine"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_staticText_add_machine->Wrap(-1);
|
||||
m_staticText_add_machine->SetForegroundColour(0x909090);
|
||||
btn_sizer->Add(m_staticText_add_machine, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 5);
|
||||
@@ -200,7 +200,7 @@ void MonitorPanel::init_tabpanel()
|
||||
|
||||
std::string network_ver = Slic3r::NetworkAgent::get_version();
|
||||
if (!network_ver.empty()) {
|
||||
m_tabpanel->SetFooterText(wxString::Format("Network plugin v%s", network_ver));
|
||||
m_tabpanel->SetFooterText(wxString::Format(_L("Network plug-in v%s"), network_ver));
|
||||
}
|
||||
|
||||
m_initialized = true;
|
||||
@@ -543,9 +543,9 @@ void MonitorPanel::update_network_version_footer()
|
||||
|
||||
wxString footer_text;
|
||||
if (!suffix.empty() && configured_base == binary_version) {
|
||||
footer_text = wxString::Format("Network plugin v%s (%s)", binary_version, suffix);
|
||||
footer_text = wxString::Format(_L("Network plug-in v%s (%s)"), binary_version, suffix);
|
||||
} else {
|
||||
footer_text = wxString::Format("Network plugin v%s", binary_version);
|
||||
footer_text = wxString::Format(_L("Network plug-in v%s"), binary_version);
|
||||
}
|
||||
|
||||
m_tabpanel->SetFooterText(footer_text);
|
||||
|
||||
@@ -20,7 +20,7 @@ NetworkPluginDownloadDialog::NetworkPluginDownloadDialog(wxWindow* parent, Mode
|
||||
const std::string& error_message,
|
||||
const std::string& error_details)
|
||||
: DPIDialog(parent, wxID_ANY, mode == Mode::UpdateAvailable ?
|
||||
_L("Network Plugin Update Available") : _L("Bambu Network Plugin Required"),
|
||||
_L("Network Plug-in Update Available") : _L("Bambu Network Plug-in Required"),
|
||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||
, m_mode(mode)
|
||||
, m_error_message(error_message)
|
||||
@@ -54,8 +54,8 @@ void NetworkPluginDownloadDialog::create_missing_plugin_ui()
|
||||
|
||||
auto* desc = new wxStaticText(this, wxID_ANY,
|
||||
m_mode == Mode::CorruptedPlugin ?
|
||||
_L("The Bambu Network Plugin is corrupted or incompatible. Please reinstall it.") :
|
||||
_L("The Bambu Network Plugin is required for cloud features, printer discovery, and remote printing."));
|
||||
_L("The Bambu Network Plug-in is corrupted or incompatible. Please reinstall it.") :
|
||||
_L("The Bambu Network Plug-in is required for cloud features, printer discovery, and remote printing."));
|
||||
desc->SetFont(::Label::Body_13);
|
||||
desc->Wrap(FromDIP(400));
|
||||
main_sizer->Add(desc, 0, wxLEFT | wxRIGHT, FromDIP(25));
|
||||
@@ -134,7 +134,7 @@ void NetworkPluginDownloadDialog::create_update_available_ui(const std::string&
|
||||
wxBoxSizer* main_sizer = static_cast<wxBoxSizer*>(GetSizer());
|
||||
|
||||
auto* desc = new wxStaticText(this, wxID_ANY,
|
||||
_L("A new version of the Bambu Network Plugin is available."));
|
||||
_L("A new version of the Bambu Network Plug-in is available."));
|
||||
desc->SetFont(::Label::Body_13);
|
||||
desc->Wrap(FromDIP(400));
|
||||
main_sizer->Add(desc, 0, wxLEFT | wxRIGHT, FromDIP(25));
|
||||
@@ -305,14 +305,14 @@ NetworkPluginRestartDialog::NetworkPluginRestartDialog(wxWindow* parent)
|
||||
auto* text_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto* desc = new wxStaticText(this, wxID_ANY,
|
||||
_L("The Bambu Network Plugin has been installed successfully."));
|
||||
_L("The Bambu Network Plug-in has been installed successfully."));
|
||||
desc->SetFont(::Label::Body_14);
|
||||
desc->Wrap(FromDIP(350));
|
||||
text_sizer->Add(desc, 0, wxTOP, FromDIP(10));
|
||||
text_sizer->Add(0, 0, 0, wxTOP, FromDIP(10));
|
||||
|
||||
auto* restart_msg = new wxStaticText(this, wxID_ANY,
|
||||
_L("A restart is required to load the new plugin. Would you like to restart now?"));
|
||||
_L("A restart is required to load the new plug-in. Would you like to restart now?"));
|
||||
restart_msg->SetFont(::Label::Body_13);
|
||||
restart_msg->Wrap(FromDIP(350));
|
||||
text_sizer->Add(restart_msg, 0, wxBOTTOM, FromDIP(10));
|
||||
|
||||
Reference in New Issue
Block a user