mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	All project is ready to localization.
* Macro _LC is changed to _CHB. [to put translated string into std::string correctly] * Macro _LS is changed to L. [to mark string to translation] * Standard wxWidgets macro _() is used for translation now. * Updated POfile for EN
This commit is contained in:
		
							parent
							
								
									cec12e203a
								
							
						
					
					
						commit
						baa5726532
					
				
					 13 changed files with 4683 additions and 3429 deletions
				
			
		|  | @ -378,7 +378,7 @@ sub _init_menubar { | |||
|     # Help menu | ||||
|     my $helpMenu = Wx::Menu->new; | ||||
|     { | ||||
|         $self->_append_menu_item($helpMenu, L("&Configuration $Slic3r::GUI::ConfigWizard::wizard…"), L("Run Configuration $Slic3r::GUI::ConfigWizard::wizard"), sub { | ||||
|         $self->_append_menu_item($helpMenu, L("&Configuration ").$Slic3r::GUI::ConfigWizard::wizard."…", L("Run Configuration ").$Slic3r::GUI::ConfigWizard::wizard, sub { | ||||
|             # Run the config wizard, offer the "reset user profile" checkbox. | ||||
|             $self->config_wizard(0); | ||||
|         }); | ||||
|  | @ -526,7 +526,7 @@ sub quick_slice { | |||
|         } | ||||
|          | ||||
|         # show processbar dialog | ||||
|         $progress_dialog = Wx::ProgressDialog->new(L('Slicing…'), L("Processing $input_file_basename…"),  | ||||
|         $progress_dialog = Wx::ProgressDialog->new(L('Slicing…'), L("Processing ").$input_file_basename."…",  | ||||
|             100, $self, 0); | ||||
|         $progress_dialog->Pulse; | ||||
|          | ||||
|  |  | |||
|  | @ -947,7 +947,7 @@ sub rotate { | |||
|     if (!defined $angle) { | ||||
|         my $axis_name = $axis == X ? 'X' : $axis == Y ? 'Y' : 'Z'; | ||||
|         my $default = $axis == Z ? rad2deg($model_instance->rotation) : 0; | ||||
|         $angle = $self->_get_number_from_user(L("Enter the rotation angle:"), L("Rotate around $axis_name axis"), L("Invalid rotation angle entered"), $default); | ||||
|         $angle = $self->_get_number_from_user(L("Enter the rotation angle:"), L("Rotate around ").$axis_name.(" axis"), L("Invalid rotation angle entered"), $default); | ||||
|         return if $angle eq ''; | ||||
|     } | ||||
|      | ||||
|  | @ -1032,7 +1032,7 @@ sub changescale { | |||
|             return if $newsize eq ''; | ||||
|             $scale = $newsize / $cursize * 100; | ||||
|         } else { | ||||
|             $scale = $self->_get_number_from_user(L('Enter the scale % for the selected object:'), L("Scale along $axis_name"), L('Invalid scaling value entered'), 100, 1); | ||||
|             $scale = $self->_get_number_from_user(L('Enter the scale % for the selected object:'), L("Scale along ").$axis_name, L('Invalid scaling value entered'), 100, 1); | ||||
|             return if $scale eq ''; | ||||
|         } | ||||
|          | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -36,43 +36,43 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt) | |||
| { | ||||
| //	on_change(nullptr);
 | ||||
| 
 | ||||
| 	auto box = new wxStaticBox(this, wxID_ANY, _L("Shape")); | ||||
| 	auto box = new wxStaticBox(this, wxID_ANY, _(L("Shape"))); | ||||
| 	auto sbsizer = new wxStaticBoxSizer(box, wxVERTICAL); | ||||
| 
 | ||||
| 	// shape options
 | ||||
| 	m_shape_options_book = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxSize(300, -1), wxCHB_TOP); | ||||
| 	sbsizer->Add(m_shape_options_book); | ||||
| 
 | ||||
| 	auto optgroup = init_shape_options_page(_L("Rectangular")); | ||||
| 	auto optgroup = init_shape_options_page(_(L("Rectangular"))); | ||||
| 		ConfigOptionDef def; | ||||
| 		def.type = coPoints; | ||||
| 		def.default_value = new ConfigOptionPoints{ Pointf(200, 200) }; | ||||
| 		def.label = _LS("Size"); | ||||
| 		def.tooltip = _LS("Size in X and Y of the rectangular plate."); | ||||
| 		def.label = L("Size"); | ||||
| 		def.tooltip = L("Size in X and Y of the rectangular plate."); | ||||
| 		Option option(def, "rect_size"); | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		def.type = coPoints; | ||||
| 		def.default_value = new ConfigOptionPoints{ Pointf(0, 0) }; | ||||
| 		def.label = _LS("Origin"); | ||||
| 		def.tooltip = _LS("Distance of the 0,0 G-code coordinate from the front left corner of the rectangle."); | ||||
| 		def.label = L("Origin"); | ||||
| 		def.tooltip = L("Distance of the 0,0 G-code coordinate from the front left corner of the rectangle."); | ||||
| 		option = Option(def, "rect_origin"); | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = init_shape_options_page(_L("Circular")); | ||||
| 		optgroup = init_shape_options_page(_(L("Circular"))); | ||||
| 		def.type = coFloat; | ||||
| 		def.default_value = new ConfigOptionFloat(200); | ||||
| 		def.sidetext = _LS("mm"); | ||||
| 		def.label = _LS("Diameter"); | ||||
| 		def.tooltip = _LS("Diameter of the print bed. It is assumed that origin (0,0) is located in the center."); | ||||
| 		def.sidetext = L("mm"); | ||||
| 		def.label = L("Diameter"); | ||||
| 		def.tooltip = L("Diameter of the print bed. It is assumed that origin (0,0) is located in the center."); | ||||
| 		option = Option(def, "diameter"); | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = init_shape_options_page(_L("Custom")); | ||||
| 		optgroup = init_shape_options_page(_(L("Custom"))); | ||||
| 		Line line{ "", "" }; | ||||
| 		line.full_width = 1; | ||||
| 		line.widget = [this](wxWindow* parent) { | ||||
| 			auto btn = new wxButton(parent, wxID_ANY, _L("Load shape from STL..."), wxDefaultPosition, wxDefaultSize); | ||||
| 			auto btn = new wxButton(parent, wxID_ANY, _(L("Load shape from STL...")), wxDefaultPosition, wxDefaultSize); | ||||
| 			 | ||||
| 			auto sizer = new wxBoxSizer(wxHORIZONTAL); | ||||
| 			sizer->Add(btn); | ||||
|  | @ -117,7 +117,7 @@ ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(wxString title){ | |||
| 
 | ||||
| 	auto panel = new wxPanel(m_shape_options_book); | ||||
| 	ConfigOptionsGroupShp optgroup; | ||||
| 	optgroup = std::make_shared<ConfigOptionsGroup>(panel, _L("Settings")); | ||||
| 	optgroup = std::make_shared<ConfigOptionsGroup>(panel, _(L("Settings"))); | ||||
| 
 | ||||
| 	optgroup->label_width = 100; | ||||
| 	optgroup->m_on_change = [this](t_config_option_key opt_key, boost::any value){ | ||||
|  | @ -295,7 +295,7 @@ void BedShapePanel::load_stl() | |||
| 	for (auto file_type: file_types) | ||||
| 		MODEL_WILDCARD += vec_FILE_WILDCARDS.at(file_type) + "|"; | ||||
| 
 | ||||
| 	auto dialog = new wxFileDialog(this, _L("Choose a file to import bed shape from (STL/OBJ/AMF/PRUSA):"), "", "", | ||||
| 	auto dialog = new wxFileDialog(this, _(L("Choose a file to import bed shape from (STL/OBJ/AMF/PRUSA):")), "", "", | ||||
| 		MODEL_WILDCARD, wxFD_OPEN | wxFD_FILE_MUST_EXIST); | ||||
| 	if (dialog->ShowModal() != wxID_OK) { | ||||
| 		dialog->Destroy(); | ||||
|  | @ -312,7 +312,7 @@ void BedShapePanel::load_stl() | |||
| 		model = Model::read_from_file(file_name); | ||||
| 	} | ||||
| 	catch (std::exception &e) { | ||||
| 		auto msg = _L("Error! ") + file_name + " : " + e.what() + "."; | ||||
| 		auto msg = _(L("Error! ")) + file_name + " : " + e.what() + "."; | ||||
| 		show_error(this, msg); | ||||
| 		exit(1); | ||||
| 	} | ||||
|  | @ -321,11 +321,11 @@ void BedShapePanel::load_stl() | |||
| 	auto expolygons = mesh.horizontal_projection(); | ||||
| 
 | ||||
| 	if (expolygons.size() == 0) { | ||||
| 		show_error(this, _L("The selected file contains no geometry.")); | ||||
| 		show_error(this, _(L("The selected file contains no geometry."))); | ||||
| 		return; | ||||
| 	} | ||||
| 	if (expolygons.size() > 1) { | ||||
| 		show_error(this, _L("The selected file contains several disjoint areas. This is not supported.")); | ||||
| 		show_error(this, _(L("The selected file contains several disjoint areas. This is not supported."))); | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -39,7 +39,7 @@ class BedShapeDialog : public wxDialog | |||
| { | ||||
| 	BedShapePanel*	m_panel; | ||||
| public: | ||||
| 	BedShapeDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, _L("Bed Shape"), | ||||
| 	BedShapeDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, _(L("Bed Shape")), | ||||
| 		wxDefaultPosition, wxSize(350, 700), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER){} | ||||
| 	~BedShapeDialog(){  } | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ namespace Slic3r { namespace GUI { | |||
| 		wxString tooltip_text(""); | ||||
| 		wxString tooltip = L_str(m_opt.tooltip); | ||||
| 		if (tooltip.length() > 0) | ||||
| 			tooltip_text = tooltip + "(" + _L("default") + ": " + | ||||
| 			tooltip_text = tooltip + "(" + _(L("default")) + ": " + | ||||
| 							(boost::iends_with(m_opt_id, "_gcode") ? "\n" : "") +  | ||||
| 							default_string + ")"; | ||||
| 
 | ||||
|  |  | |||
|  | @ -221,7 +221,7 @@ bool select_language(wxArrayString & names, | |||
| 	wxArrayLong & identifiers) | ||||
| { | ||||
| 	wxCHECK_MSG(names.Count() == identifiers.Count(), false, | ||||
| 		_L("Array of language names and identifiers should have the same size.")); | ||||
| 		_(L("Array of language names and identifiers should have the same size."))); | ||||
| 	int init_selection = 0; | ||||
| 	long current_language = g_wxLocale ? g_wxLocale->GetLanguage() : wxLANGUAGE_UNKNOWN; | ||||
| 	for (auto lang : identifiers){ | ||||
|  | @ -232,7 +232,7 @@ bool select_language(wxArrayString & names, | |||
| 	} | ||||
| 	if (init_selection == identifiers.size()) | ||||
| 		init_selection = 0; | ||||
| 	long index = wxGetSingleChoiceIndex(_L("Select the language"), _L("Language"),  | ||||
| 	long index = wxGetSingleChoiceIndex(_(L("Select the language")), _(L("Language")),  | ||||
| 										names, init_selection); | ||||
| 	if (index != -1) | ||||
| 	{ | ||||
|  | @ -297,15 +297,12 @@ void get_installed_languages(wxArrayString & names, | |||
| 	wxString name = wxLocale::GetLanguageName(wxLANGUAGE_DEFAULT); | ||||
| 	if (!name.IsEmpty()) | ||||
| 	{ | ||||
| 		names.Add(_L("Default")); | ||||
| 		names.Add(_(L("Default"))); | ||||
| 		identifiers.Add(wxLANGUAGE_DEFAULT); | ||||
| 	} | ||||
| 	for (bool cont = dir.GetFirst(&filename, wxEmptyString, wxDIR_DIRS); | ||||
| 		cont; cont = dir.GetNext(&filename)) | ||||
| 	{ | ||||
| 		wxLogTrace(wxTraceMask(), | ||||
| 			"L10n: Directory found = \"%s\"", | ||||
| 			filename.GetData()); | ||||
| 		langinfo = wxLocale::FindLanguageInfo(filename); | ||||
| 		if (langinfo != NULL) | ||||
| 		{ | ||||
|  | @ -325,14 +322,14 @@ void add_debug_menu(wxMenuBar *menu, int event_language_change) | |||
| { | ||||
| //#if 0
 | ||||
|     auto local_menu = new wxMenu(); | ||||
| 	local_menu->Append(wxWindow::NewControlId(1), _L("Change Application Language")); | ||||
| 	local_menu->Append(wxWindow::NewControlId(1), _(L("Change Application Language"))); | ||||
| 	local_menu->Bind(wxEVT_MENU, [event_language_change](wxEvent&){ | ||||
| 		wxArrayString names; | ||||
| 		wxArrayLong identifiers; | ||||
| 		get_installed_languages(names, identifiers); | ||||
| 		if (select_language(names, identifiers)){ | ||||
| 			save_language(); | ||||
| 			show_info(g_wxTabPanel, "Application will be restarted", "Attention!"); | ||||
| 			show_info(g_wxTabPanel, _(L("Application will be restarted")), _(L("Attention!"))); | ||||
| 			if (event_language_change > 0) { | ||||
| 				wxCommandEvent event(event_language_change); | ||||
| 				g_wxApp->ProcessEvent(event); | ||||
|  | @ -485,19 +482,19 @@ void add_created_tab(Tab* panel, PresetBundle *preset_bundle) | |||
| } | ||||
| 
 | ||||
| void show_error(wxWindow* parent, wxString message){ | ||||
| 	auto msg_wingow = new wxMessageDialog(parent, message, _L("Error"), wxOK | wxICON_ERROR); | ||||
| 	auto msg_wingow = new wxMessageDialog(parent, message, _(L("Error")), wxOK | wxICON_ERROR); | ||||
| 	msg_wingow->ShowModal(); | ||||
| } | ||||
| 
 | ||||
| void show_info(wxWindow* parent, wxString message, wxString title){ | ||||
| 	auto msg_wingow = new wxMessageDialog(parent, message, title.empty() ? _L("Notice") : title, wxOK | wxICON_INFORMATION); | ||||
| 	auto msg_wingow = new wxMessageDialog(parent, message, title.empty() ? _(L("Notice")) : title, wxOK | wxICON_INFORMATION); | ||||
| 	msg_wingow->ShowModal(); | ||||
| } | ||||
| 
 | ||||
| void warning_catcher(wxWindow* parent, wxString message){ | ||||
| 	if (message == _L("GLUquadricObjPtr | Attempt to free unreferenced scalar") ) | ||||
| 	if (message == _(L("GLUquadricObjPtr | Attempt to free unreferenced scalar")) ) | ||||
| 		return; | ||||
| 	auto msg = new wxMessageDialog(parent, message, _L("Warning"), wxOK | wxICON_WARNING); | ||||
| 	auto msg = new wxMessageDialog(parent, message, _(L("Warning")), wxOK | wxICON_WARNING); | ||||
| 	msg->ShowModal();	 | ||||
| } | ||||
| 
 | ||||
|  | @ -557,6 +554,7 @@ AppConfig* get_app_config() | |||
| 
 | ||||
| wxString L_str(std::string str) | ||||
| { | ||||
| 	//! Explicitly specify that the source string is already in UTF-8 encoding
 | ||||
| 	return wxGetTranslation(wxString(str.c_str(), wxConvUTF8)); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,13 +23,16 @@ class AppConfig; | |||
| class DynamicPrintConfig; | ||||
| class TabIface; | ||||
| 
 | ||||
| //! macro used to localization, return wxString
 | ||||
| #define _L(s) wxGetTranslation(s) | ||||
| // !!! If you needed to translate some wxString,
 | ||||
| // !!! please use _(L(string))
 | ||||
| // !!! _() - is a standard wxWidgets macro to translate
 | ||||
| // !!! L() is used only for marking localizable string 
 | ||||
| // !!! It will be used in "xgettext" to create a Locating Message Catalog.
 | ||||
| #define L(s) s | ||||
| 
 | ||||
| //! macro used to localization, return wxScopedCharBuffer
 | ||||
| //! With wxConvUTF8 explicitly specify that the source string is already in UTF-8 encoding
 | ||||
| #define _LC(s) wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str() | ||||
| //! macro used to mark string used at localization, return same string
 | ||||
| #define _LS(s) s | ||||
| #define _CHB(s) wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str() | ||||
| 
 | ||||
| namespace GUI { | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,31 +23,31 @@ std::string PresetHints::cooling_description(const Preset &preset) | |||
| 		int 	max_fan_speed 				= preset.config.opt_int("max_fan_speed", 0); | ||||
| 		int 	min_print_speed				= int(preset.config.opt_float("min_print_speed", 0) + 0.5); | ||||
| 		int 	fan_below_layer_time		= preset.config.opt_int("fan_below_layer_time", 0); | ||||
| 		sprintf(buf, _LC("If estimated layer time is below ~%ds, fan will run at %d%% and print speed will be reduced so that no less than %ds are spent on that layer (however, speed will never be reduced below %dmm/s)."), | ||||
| 		sprintf(buf, _CHB(L("If estimated layer time is below ~%ds, fan will run at %d%% and print speed will be reduced so that no less than %ds are spent on that layer (however, speed will never be reduced below %dmm/s).")), | ||||
|             slowdown_below_layer_time, max_fan_speed, slowdown_below_layer_time, min_print_speed); | ||||
| 		out += buf; | ||||
|         if (fan_below_layer_time > slowdown_below_layer_time) { | ||||
| 			sprintf(buf, _LC("\nIf estimated layer time is greater, but still below ~%ds, fan will run at a proportionally decreasing speed between %d%% and %d%%."), | ||||
| 			sprintf(buf, _CHB(L("\nIf estimated layer time is greater, but still below ~%ds, fan will run at a proportionally decreasing speed between %d%% and %d%%.")), | ||||
|                 fan_below_layer_time, max_fan_speed, min_fan_speed); | ||||
|             out += buf; | ||||
|         } | ||||
| 		out += _LC("\nDuring the other layers, fan "); | ||||
| 		out += _CHB(L("\nDuring the other layers, fan ")); | ||||
|     } else { | ||||
|         out = _LC("Fan "); | ||||
|         out = _CHB(L("Fan ")); | ||||
|     } | ||||
| 	if (preset.config.opt_bool("fan_always_on", 0)) { | ||||
| 		int 	disable_fan_first_layers 	= preset.config.opt_int("disable_fan_first_layers", 0); | ||||
| 		int 	min_fan_speed 				= preset.config.opt_int("min_fan_speed", 0); | ||||
|         sprintf(buf, _LC("will always run at %d%% "), min_fan_speed); | ||||
|         sprintf(buf, _CHB(L("will always run at %d%% ")), min_fan_speed); | ||||
|         out += buf; | ||||
|         if (disable_fan_first_layers > 1) { | ||||
|         	sprintf(buf, _LC("except for the first %d layers"), disable_fan_first_layers); | ||||
|         	sprintf(buf, _CHB(L("except for the first %d layers")), disable_fan_first_layers); | ||||
| 	        out += buf; | ||||
|         } | ||||
|         else if (disable_fan_first_layers == 1) | ||||
|         	out += _LC("except for the first layer"); | ||||
|         	out += _CHB(L("except for the first layer")); | ||||
|     } else | ||||
|     	out += _LC("will be turned off."); | ||||
|     	out += _CHB(L("will be turned off.")); | ||||
| 
 | ||||
|     return out; | ||||
| } | ||||
|  | @ -148,7 +148,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                     limit_by_first_layer_speed(std::max(external_perimeter_speed, small_perimeter_speed), max_print_speed)); | ||||
|             if (max_flow < external_perimeter_rate) { | ||||
|                 max_flow = external_perimeter_rate; | ||||
|                 max_flow_extrusion_type = _LC("external perimeters"); | ||||
|                 max_flow_extrusion_type = _CHB(L("external perimeters")); | ||||
|             } | ||||
|             double perimeter_rate = Flow::new_from_config_width(frPerimeter,  | ||||
|                 first_positive(first_layer_extrusion_width_ptr, perimeter_extrusion_width, extrusion_width),  | ||||
|  | @ -157,7 +157,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                     limit_by_first_layer_speed(std::max(perimeter_speed, small_perimeter_speed), max_print_speed)); | ||||
|             if (max_flow < perimeter_rate) { | ||||
|                 max_flow = perimeter_rate; | ||||
|                 max_flow_extrusion_type = _LC("perimeters"); | ||||
|                 max_flow_extrusion_type = _CHB(L("perimeters")); | ||||
|             } | ||||
|         } | ||||
|         if (! bridging && infill_extruder_active) { | ||||
|  | @ -166,7 +166,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                 nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(infill_speed, max_print_speed); | ||||
|             if (max_flow < infill_rate) { | ||||
|                 max_flow = infill_rate; | ||||
|                 max_flow_extrusion_type = _LC("infill"); | ||||
|                 max_flow_extrusion_type = _CHB(L("infill")); | ||||
|             } | ||||
|         } | ||||
|         if (solid_infill_extruder_active) { | ||||
|  | @ -176,7 +176,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                 (bridging ? bridge_speed : limit_by_first_layer_speed(solid_infill_speed, max_print_speed)); | ||||
|             if (max_flow < solid_infill_rate) { | ||||
|                 max_flow = solid_infill_rate; | ||||
|                 max_flow_extrusion_type = _LC("solid infill"); | ||||
|                 max_flow_extrusion_type = _CHB(L("solid infill")); | ||||
|             } | ||||
|             if (! bridging) { | ||||
|                 double top_solid_infill_rate = Flow::new_from_config_width(frInfill,  | ||||
|  | @ -184,7 +184,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                     nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(top_solid_infill_speed, max_print_speed); | ||||
|                 if (max_flow < top_solid_infill_rate) { | ||||
|                     max_flow = top_solid_infill_rate; | ||||
|                     max_flow_extrusion_type = _LC("top solid infill"); | ||||
|                     max_flow_extrusion_type = _CHB(L("top solid infill")); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | @ -195,7 +195,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                 (bridging ? bridge_speed : limit_by_first_layer_speed(support_material_speed, max_print_speed)); | ||||
|             if (max_flow < support_material_rate) { | ||||
|                 max_flow = support_material_rate; | ||||
|                 max_flow_extrusion_type = _LC("support"); | ||||
|                 max_flow_extrusion_type = _CHB(L("support")); | ||||
|             } | ||||
|         } | ||||
|         if (support_material_interface_extruder_active) { | ||||
|  | @ -205,25 +205,25 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle | |||
|                 (bridging ? bridge_speed : limit_by_first_layer_speed(support_material_interface_speed, max_print_speed)); | ||||
|             if (max_flow < support_material_interface_rate) { | ||||
|                 max_flow = support_material_interface_rate; | ||||
|                 max_flow_extrusion_type = _LC("support interface"); | ||||
|                 max_flow_extrusion_type = _CHB(L("support interface")); | ||||
|             } | ||||
|         } | ||||
|         //FIXME handle gap_fill_speed
 | ||||
|         if (! out.empty()) | ||||
|             out += "\n"; | ||||
|         out += (first_layer ? _LC("First layer volumetric") : (bridging ? _LC("Bridging volumetric") : _LC("Volumetric"))); | ||||
|         out += _LC(" flow rate is maximized "); | ||||
|         out += (first_layer ? _CHB(L("First layer volumetric")) : (bridging ? _CHB(L("Bridging volumetric")) : _CHB(L("Volumetric")))); | ||||
|         out += _CHB(L(" flow rate is maximized ")); | ||||
|         bool limited_by_max_volumetric_speed = max_volumetric_speed > 0 && max_volumetric_speed < max_flow; | ||||
|         out += (limited_by_max_volumetric_speed ?  | ||||
|             _LC("by the print profile maximum") :  | ||||
|             (_LC("when printing ") + max_flow_extrusion_type)) | ||||
|             + _LC(" with a volumetric rate "); | ||||
|             _CHB(L("by the print profile maximum")) :  | ||||
|             (_CHB(L("when printing ")) + max_flow_extrusion_type)) | ||||
|             + _CHB(L(" with a volumetric rate ")); | ||||
|         if (limited_by_max_volumetric_speed) | ||||
|             max_flow = max_volumetric_speed; | ||||
|         char buf[2048]; | ||||
|         sprintf(buf, _LC("%3.2f mm³/s"), max_flow); | ||||
|         sprintf(buf, _CHB(L("%3.2f mm³/s")), max_flow); | ||||
|         out += buf; | ||||
|         sprintf(buf, _LC(" at filament speed %3.2f mm/s."), max_flow / filament_crossection); | ||||
|         sprintf(buf, _CHB(L(" at filament speed %3.2f mm/s.")), max_flow / filament_crossection); | ||||
|         out += buf; | ||||
|     } | ||||
| 
 | ||||
|  | @ -242,7 +242,7 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre | |||
|      | ||||
|     std::string out; | ||||
| 	if (layer_height <= 0.f){ | ||||
| 		out += _LC("Recommended object thin wall thickness: Not available due to invalid layer height."); | ||||
| 		out += _CHB(L("Recommended object thin wall thickness: Not available due to invalid layer height.")); | ||||
| 		return out; | ||||
| 	} | ||||
| 
 | ||||
|  | @ -259,14 +259,14 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre | |||
|     if (num_perimeters > 0) { | ||||
|         int num_lines = std::min(num_perimeters * 2, 10); | ||||
|         char buf[256]; | ||||
|         sprintf(buf, _LC("Recommended object thin wall thickness for layer height %.2f and "), layer_height); | ||||
|         sprintf(buf, _CHB(L("Recommended object thin wall thickness for layer height %.2f and ")), layer_height); | ||||
|         out += buf; | ||||
|         // Start with the width of two closely spaced 
 | ||||
|         double width = external_perimeter_flow.width + external_perimeter_flow.spacing(); | ||||
|         for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) { | ||||
|             if (i > 2) | ||||
|                 out += ", "; | ||||
|             sprintf(buf, _LC("%d lines: %.2lf mm"), i, width); | ||||
|             sprintf(buf, _CHB(L("%d lines: %.2lf mm")), i, width); | ||||
|             out += buf; | ||||
|             width += perimeter_flow.spacing() * (thin_walls ? 1.f : 2.f); | ||||
|         } | ||||
|  |  | |||
|  | @ -47,8 +47,8 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) | |||
| 	m_bmp_hide_incompatible_presets = new wxBitmap(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG); | ||||
| 	m_btn_hide_incompatible_presets = new wxBitmapButton(panel, wxID_ANY, *m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); | ||||
| 
 | ||||
| 	m_btn_save_preset->SetToolTip(_L("Save current ") + m_title); | ||||
| 	m_btn_delete_preset->SetToolTip(_L("Delete this preset")); | ||||
| 	m_btn_save_preset->SetToolTip(_(L("Save current ")) + m_title); | ||||
| 	m_btn_delete_preset->SetToolTip(_(L("Delete this preset"))); | ||||
| 	m_btn_delete_preset->Disable(); | ||||
| 
 | ||||
| 	m_hsizer = new wxBoxSizer(wxHORIZONTAL); | ||||
|  | @ -311,12 +311,12 @@ void TabPrint::build() | |||
| 	m_presets = &m_preset_bundle->prints; | ||||
| 	m_config = &m_presets->get_edited_preset().config; | ||||
| 
 | ||||
| 	auto page = add_options_page(_L("Layers and perimeters"), "layers.png"); | ||||
| 		auto optgroup = page->new_optgroup(_L("Layer height")); | ||||
| 	auto page = add_options_page(_(L("Layers and perimeters")), "layers.png"); | ||||
| 		auto optgroup = page->new_optgroup(_(L("Layer height"))); | ||||
| 		optgroup->append_single_option_line("layer_height"); | ||||
| 		optgroup->append_single_option_line("first_layer_height"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Vertical shells")); | ||||
| 		optgroup = page->new_optgroup(_(L("Vertical shells"))); | ||||
| 		optgroup->append_single_option_line("perimeters"); | ||||
| 		optgroup->append_single_option_line("spiral_vase"); | ||||
| 
 | ||||
|  | @ -327,34 +327,34 @@ void TabPrint::build() | |||
| 		}; | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Horizontal shells")); | ||||
| 		line = { _L("Solid layers"), "" }; | ||||
| 		optgroup = page->new_optgroup(_(L("Horizontal shells"))); | ||||
| 		line = { _(L("Solid layers")), "" }; | ||||
| 		line.append_option(optgroup->get_option("top_solid_layers")); | ||||
| 		line.append_option(optgroup->get_option("bottom_solid_layers")); | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Quality (slower slicing)")); | ||||
| 		optgroup = page->new_optgroup(_(L("Quality (slower slicing)"))); | ||||
| 		optgroup->append_single_option_line("extra_perimeters"); | ||||
| 		optgroup->append_single_option_line("ensure_vertical_shell_thickness"); | ||||
| 		optgroup->append_single_option_line("avoid_crossing_perimeters"); | ||||
| 		optgroup->append_single_option_line("thin_walls"); | ||||
| 		optgroup->append_single_option_line("overhangs"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Advanced")); | ||||
| 		optgroup = page->new_optgroup(_(L("Advanced"))); | ||||
| 		optgroup->append_single_option_line("seam_position"); | ||||
| 		optgroup->append_single_option_line("external_perimeters_first"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Infill"), "infill.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Infill")); | ||||
| 	page = add_options_page(_(L("Infill")), "infill.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Infill"))); | ||||
| 		optgroup->append_single_option_line("fill_density"); | ||||
| 		optgroup->append_single_option_line("fill_pattern"); | ||||
| 		optgroup->append_single_option_line("external_fill_pattern"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Reducing printing time")); | ||||
| 		optgroup = page->new_optgroup(_(L("Reducing printing time"))); | ||||
| 		optgroup->append_single_option_line("infill_every_layers"); | ||||
| 		optgroup->append_single_option_line("infill_only_where_needed"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Advanced")); | ||||
| 		optgroup = page->new_optgroup(_(L("Advanced"))); | ||||
| 		optgroup->append_single_option_line("solid_infill_every_layers"); | ||||
| 		optgroup->append_single_option_line("fill_angle"); | ||||
| 		optgroup->append_single_option_line("solid_infill_below_area"); | ||||
|  | @ -362,27 +362,27 @@ void TabPrint::build() | |||
| 		optgroup->append_single_option_line("only_retract_when_crossing_perimeters"); | ||||
| 		optgroup->append_single_option_line("infill_first"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Skirt and brim"), "box.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Skirt")); | ||||
| 	page = add_options_page(_(L("Skirt and brim")), "box.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Skirt"))); | ||||
| 		optgroup->append_single_option_line("skirts"); | ||||
| 		optgroup->append_single_option_line("skirt_distance"); | ||||
| 		optgroup->append_single_option_line("skirt_height"); | ||||
| 		optgroup->append_single_option_line("min_skirt_length"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Brim")); | ||||
| 		optgroup = page->new_optgroup(_(L("Brim"))); | ||||
| 		optgroup->append_single_option_line("brim_width"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Support material"), "building.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Support material")); | ||||
| 	page = add_options_page(_(L("Support material")), "building.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Support material"))); | ||||
| 		optgroup->append_single_option_line("support_material"); | ||||
| 		optgroup->append_single_option_line("support_material_threshold"); | ||||
| 		optgroup->append_single_option_line("support_material_enforce_layers"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Raft")); | ||||
| 		optgroup = page->new_optgroup(_(L("Raft"))); | ||||
| 		optgroup->append_single_option_line("raft_layers"); | ||||
| //		# optgroup->append_single_option_line(get_option_("raft_contact_distance");
 | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Options for support material and raft")); | ||||
| 		optgroup = page->new_optgroup(_(L("Options for support material and raft"))); | ||||
| 		optgroup->append_single_option_line("support_material_contact_distance"); | ||||
| 		optgroup->append_single_option_line("support_material_pattern"); | ||||
| 		optgroup->append_single_option_line("support_material_with_sheath"); | ||||
|  | @ -396,8 +396,8 @@ void TabPrint::build() | |||
| 		optgroup->append_single_option_line("dont_support_bridges"); | ||||
| 		optgroup->append_single_option_line("support_material_synchronize_layers"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Speed"), "time.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Speed for print moves")); | ||||
| 	page = add_options_page(_(L("Speed")), "time.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Speed for print moves"))); | ||||
| 		optgroup->append_single_option_line("perimeter_speed"); | ||||
| 		optgroup->append_single_option_line("small_perimeter_speed"); | ||||
| 		optgroup->append_single_option_line("external_perimeter_speed"); | ||||
|  | @ -409,49 +409,49 @@ void TabPrint::build() | |||
| 		optgroup->append_single_option_line("bridge_speed"); | ||||
| 		optgroup->append_single_option_line("gap_fill_speed"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Speed for non-print moves")); | ||||
| 		optgroup = page->new_optgroup(_(L("Speed for non-print moves"))); | ||||
| 		optgroup->append_single_option_line("travel_speed"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Modifiers")); | ||||
| 		optgroup = page->new_optgroup(_(L("Modifiers"))); | ||||
| 		optgroup->append_single_option_line("first_layer_speed"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Acceleration control (advanced)")); | ||||
| 		optgroup = page->new_optgroup(_(L("Acceleration control (advanced)"))); | ||||
| 		optgroup->append_single_option_line("perimeter_acceleration"); | ||||
| 		optgroup->append_single_option_line("infill_acceleration"); | ||||
| 		optgroup->append_single_option_line("bridge_acceleration"); | ||||
| 		optgroup->append_single_option_line("first_layer_acceleration"); | ||||
| 		optgroup->append_single_option_line("default_acceleration"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Autospeed (advanced)")); | ||||
| 		optgroup = page->new_optgroup(_(L("Autospeed (advanced)"))); | ||||
| 		optgroup->append_single_option_line("max_print_speed"); | ||||
| 		optgroup->append_single_option_line("max_volumetric_speed"); | ||||
| 		optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope_positive"); | ||||
| 		optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope_negative"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Multiple Extruders"), "funnel.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Extruders")); | ||||
| 	page = add_options_page(_(L("Multiple Extruders")), "funnel.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Extruders"))); | ||||
| 		optgroup->append_single_option_line("perimeter_extruder"); | ||||
| 		optgroup->append_single_option_line("infill_extruder"); | ||||
| 		optgroup->append_single_option_line("solid_infill_extruder"); | ||||
| 		optgroup->append_single_option_line("support_material_extruder"); | ||||
| 		optgroup->append_single_option_line("support_material_interface_extruder"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Ooze prevention")); | ||||
| 		optgroup = page->new_optgroup(_(L("Ooze prevention"))); | ||||
| 		optgroup->append_single_option_line("ooze_prevention"); | ||||
| 		optgroup->append_single_option_line("standby_temperature_delta"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Wipe tower")); | ||||
| 		optgroup = page->new_optgroup(_(L("Wipe tower"))); | ||||
| 		optgroup->append_single_option_line("wipe_tower"); | ||||
| 		optgroup->append_single_option_line("wipe_tower_x"); | ||||
| 		optgroup->append_single_option_line("wipe_tower_y"); | ||||
| 		optgroup->append_single_option_line("wipe_tower_width"); | ||||
| 		optgroup->append_single_option_line("wipe_tower_per_color_wipe"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Advanced")); | ||||
| 		optgroup = page->new_optgroup(_(L("Advanced"))); | ||||
| 		optgroup->append_single_option_line("interface_shells"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Advanced"), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Extrusion width"), 180); | ||||
| 	page = add_options_page(_(L("Advanced")), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Extrusion width")), 180); | ||||
| 		optgroup->append_single_option_line("extrusion_width"); | ||||
| 		optgroup->append_single_option_line("first_layer_extrusion_width"); | ||||
| 		optgroup->append_single_option_line("perimeter_extrusion_width"); | ||||
|  | @ -461,23 +461,23 @@ void TabPrint::build() | |||
| 		optgroup->append_single_option_line("top_infill_extrusion_width"); | ||||
| 		optgroup->append_single_option_line("support_material_extrusion_width"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Overlap")); | ||||
| 		optgroup = page->new_optgroup(_(L("Overlap"))); | ||||
| 		optgroup->append_single_option_line("infill_overlap"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Flow")); | ||||
| 		optgroup = page->new_optgroup(_(L("Flow"))); | ||||
| 		optgroup->append_single_option_line("bridge_flow_ratio"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Other")); | ||||
| 		optgroup = page->new_optgroup(_(L("Other"))); | ||||
| 		optgroup->append_single_option_line("clip_multipart_objects"); | ||||
| 		optgroup->append_single_option_line("elefant_foot_compensation"); | ||||
| 		optgroup->append_single_option_line("xy_size_compensation"); | ||||
| //		#            optgroup->append_single_option_line("threads");
 | ||||
| 		optgroup->append_single_option_line("resolution"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Output options"), "page_white_go.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Sequential printing")); | ||||
| 	page = add_options_page(_(L("Output options")), "page_white_go.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Sequential printing"))); | ||||
| 		optgroup->append_single_option_line("complete_objects"); | ||||
| 		line = { _L("Extruder clearance (mm)"), "" }; | ||||
| 		line = { _(L("Extruder clearance (mm)")), "" }; | ||||
| 		Option option = optgroup->get_option("extruder_clearance_radius"); | ||||
| 		option.opt.width = 60; | ||||
| 		line.append_option(option); | ||||
|  | @ -486,28 +486,28 @@ void TabPrint::build() | |||
| 		line.append_option(option); | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Output file")); | ||||
| 		optgroup = page->new_optgroup(_(L("Output file"))); | ||||
| 		optgroup->append_single_option_line("gcode_comments"); | ||||
| 		option = optgroup->get_option("output_filename_format"); | ||||
| 		option.opt.full_width = true; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Post-processing scripts"), 0);	 | ||||
| 		optgroup = page->new_optgroup(_(L("Post-processing scripts")), 0);	 | ||||
| 		option = optgroup->get_option("post_process"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 50; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Notes"), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Notes"), 0);						 | ||||
| 	page = add_options_page(_(L("Notes")), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Notes")), 0);						 | ||||
| 		option = optgroup->get_option("notes"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 250; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Dependencies"), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Profile dependencies")); | ||||
| 		line = { _L("Compatible printers"), "" }; | ||||
| 	page = add_options_page(_(L("Dependencies")), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Profile dependencies"))); | ||||
| 		line = { _(L("Compatible printers")), "" }; | ||||
| 		line.widget = [this](wxWindow* parent){ | ||||
| 			return compatible_printers_widget(parent, &m_compatible_printers_checkbox, &m_compatible_printers_btn); | ||||
| 		}; | ||||
|  | @ -528,19 +528,19 @@ void TabPrint::update() | |||
| { | ||||
| 	Freeze(); | ||||
| 
 | ||||
| 	if ( m_config->opt_bool("spiral_vase") &&  | ||||
| 	if (m_config->opt_bool("spiral_vase") && | ||||
| 		!(m_config->opt_int("perimeters") == 1 && m_config->opt_int("top_solid_layers") == 0 && | ||||
| 			m_config->option<ConfigOptionPercent>("fill_density")->value == 0)) { | ||||
| 		wxString msg_text = _L("The Spiral Vase mode requires:\n" | ||||
| 		m_config->option<ConfigOptionPercent>("fill_density")->value == 0)) { | ||||
| 		wxString msg_text = _(L("The Spiral Vase mode requires:\n" | ||||
| 			"- one perimeter\n" | ||||
|  			"- no top solid layers\n" | ||||
|  			"- 0% fill density\n" | ||||
|  			"- no support material\n" | ||||
|  			"- no ensure_vertical_shell_thickness\n" | ||||
|   			"\nShall I adjust those settings in order to enable Spiral Vase?"); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _L("Spiral Vase"), wxICON_WARNING | wxYES | wxNO); | ||||
| 			"- no top solid layers\n" | ||||
| 			"- 0% fill density\n" | ||||
| 			"- no support material\n" | ||||
| 			"- no ensure_vertical_shell_thickness\n" | ||||
| 			"\nShall I adjust those settings in order to enable Spiral Vase?")); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Spiral Vase")), wxICON_WARNING | wxYES | wxNO); | ||||
| 		DynamicPrintConfig new_conf = *m_config; | ||||
|  		if (dialog->ShowModal() == wxID_YES) { | ||||
| 		if (dialog->ShowModal() == wxID_YES) { | ||||
| 			new_conf.set_key_value("perimeters", new ConfigOptionInt(1)); | ||||
| 			new_conf.set_key_value("top_solid_layers", new ConfigOptionInt(0)); | ||||
| 			new_conf.set_key_value("fill_density", new ConfigOptionPercent(0)); | ||||
|  | @ -551,24 +551,24 @@ void TabPrint::update() | |||
| 		else { | ||||
| 			new_conf.set_key_value("spiral_vase", new ConfigOptionBool(false)); | ||||
| 		} | ||||
|  		load_config(new_conf); | ||||
| 		load_config(new_conf); | ||||
| 	} | ||||
| 
 | ||||
| 	auto first_layer_height = m_config->option<ConfigOptionFloatOrPercent>("first_layer_height")->value; | ||||
| 	auto layer_height = m_config->opt_float("layer_height"); | ||||
| 	if (m_config->opt_bool("wipe_tower") && | ||||
| 		( first_layer_height != 0.2 || layer_height < 0.15 || layer_height > 0.35)) { | ||||
| 		wxString msg_text = _L("The Wipe Tower currently supports only:\n" | ||||
| 		(first_layer_height != 0.2 || layer_height < 0.15 || layer_height > 0.35)) { | ||||
| 		wxString msg_text = _(L("The Wipe Tower currently supports only:\n" | ||||
| 			"- first layer height 0.2mm\n" | ||||
| 			"- layer height from 0.15mm to 0.35mm\n" | ||||
| 			"\nShall I adjust those settings in order to enable the Wipe Tower?"); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _L("Wipe Tower"), wxICON_WARNING | wxYES | wxNO); | ||||
| 			"\nShall I adjust those settings in order to enable the Wipe Tower?")); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Wipe Tower")), wxICON_WARNING | wxYES | wxNO); | ||||
| 		DynamicPrintConfig new_conf = *m_config; | ||||
| 		if (dialog->ShowModal() == wxID_YES) { | ||||
| 			const auto &val = *m_config->option<ConfigOptionFloatOrPercent>("first_layer_height"); | ||||
| 			new_conf.set_key_value("first_layer_height", new ConfigOptionFloatOrPercent(0.2, val.percent)); | ||||
| 
 | ||||
| 			if (m_config->opt_float("layer_height") < 0.15) new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.15)) ; | ||||
| 			if (m_config->opt_float("layer_height") < 0.15) new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.15)); | ||||
| 			if (m_config->opt_float("layer_height") > 0.35) new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.35)); | ||||
| 		} | ||||
| 		else | ||||
|  | @ -579,11 +579,11 @@ void TabPrint::update() | |||
| 	if (m_config->opt_bool("wipe_tower") && m_config->opt_bool("support_material") && | ||||
| 		m_config->opt_float("support_material_contact_distance") > 0. && | ||||
| 		(m_config->opt_int("support_material_extruder") != 0 || m_config->opt_int("support_material_interface_extruder") != 0)) { | ||||
| 		wxString msg_text = _L("The Wipe Tower currently supports the non-soluble supports only\n" | ||||
| 		wxString msg_text = _(L("The Wipe Tower currently supports the non-soluble supports only\n" | ||||
| 			"if they are printed with the current extruder without triggering a tool change.\n" | ||||
| 			"(both support_material_extruder and support_material_interface_extruder need to be set to 0).\n" | ||||
| 			"\nShall I adjust those settings in order to enable the Wipe Tower?"); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _L("Wipe Tower"), wxICON_WARNING | wxYES | wxNO); | ||||
| 			"\nShall I adjust those settings in order to enable the Wipe Tower?")); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Wipe Tower")), wxICON_WARNING | wxYES | wxNO); | ||||
| 		DynamicPrintConfig new_conf = *m_config; | ||||
| 		if (dialog->ShowModal() == wxID_YES) { | ||||
| 			new_conf.set_key_value("support_material_extruder", new ConfigOptionInt(0)); | ||||
|  | @ -597,10 +597,10 @@ void TabPrint::update() | |||
| 	if (m_config->opt_bool("wipe_tower") && m_config->opt_bool("support_material") && | ||||
| 		m_config->opt_float("support_material_contact_distance") == 0 && | ||||
| 		!m_config->opt_bool("support_material_synchronize_layers")) { | ||||
| 		wxString msg_text = _L("For the Wipe Tower to work with the soluble supports, the support layers\n" | ||||
| 		wxString msg_text = _(L("For the Wipe Tower to work with the soluble supports, the support layers\n" | ||||
| 			"need to be synchronized with the object layers.\n" | ||||
| 			"\nShall I synchronize support layers in order to enable the Wipe Tower?"); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _L("Wipe Tower"), wxICON_WARNING | wxYES | wxNO); | ||||
| 			"\nShall I synchronize support layers in order to enable the Wipe Tower?")); | ||||
| 		auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Wipe Tower")), wxICON_WARNING | wxYES | wxNO); | ||||
| 		DynamicPrintConfig new_conf = *m_config; | ||||
| 		if (dialog->ShowModal() == wxID_YES) { | ||||
| 			new_conf.set_key_value("support_material_synchronize_layers", new ConfigOptionBool(true)); | ||||
|  | @ -615,18 +615,18 @@ void TabPrint::update() | |||
| 		if (!m_support_material_overhangs_queried) { | ||||
| 			m_support_material_overhangs_queried = true; | ||||
| 			if (!m_config->opt_bool("overhangs")/* != 1*/) { | ||||
| 				wxString msg_text = _L("Supports work better, if the following feature is enabled:\n" | ||||
| 				wxString msg_text = _(L("Supports work better, if the following feature is enabled:\n" | ||||
| 					"- Detect bridging perimeters\n" | ||||
| 					"\nShall I adjust those settings for supports?"); | ||||
| 				auto dialog = new wxMessageDialog(parent(), msg_text, _L("Support Generator"), wxICON_WARNING | wxYES | wxNO | wxCANCEL); | ||||
| 					"\nShall I adjust those settings for supports?")); | ||||
| 				auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Support Generator")), wxICON_WARNING | wxYES | wxNO | wxCANCEL); | ||||
| 				DynamicPrintConfig new_conf = *m_config; | ||||
| 				auto answer = dialog->ShowModal(); | ||||
| 				if (answer == wxID_YES) { | ||||
| 					// Enable "detect bridging perimeters".
 | ||||
| 					new_conf.set_key_value("overhangs", new ConfigOptionBool(true)); | ||||
| 				} else if(answer == wxID_NO) { | ||||
| 				} else if (answer == wxID_NO) { | ||||
| 					// Do nothing, leave supports on and "detect bridging perimeters" off.
 | ||||
| 				} else if(answer == wxID_CANCEL) { | ||||
| 				} else if (answer == wxID_CANCEL) { | ||||
| 					// Disable supports.
 | ||||
| 					new_conf.set_key_value("support_material", new ConfigOptionBool(false)); | ||||
| 					m_support_material_overhangs_queried = false; | ||||
|  | @ -643,7 +643,7 @@ void TabPrint::update() | |||
| 		auto fill_pattern = m_config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->value; | ||||
| 		std::string str_fill_pattern = ""; | ||||
| 		t_config_enum_values map_names = m_config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->get_enum_values(); | ||||
| 		for (auto it:map_names) { | ||||
| 		for (auto it : map_names) { | ||||
| 			if (fill_pattern == it.second) { | ||||
| 				str_fill_pattern = it.first; | ||||
| 				break; | ||||
|  | @ -660,9 +660,9 @@ void TabPrint::update() | |||
| 			// get fill_pattern name from enum_labels for using this one at dialog_msg
 | ||||
| 			str_fill_pattern = m_config->def()->get("fill_pattern")->enum_labels[fill_pattern]; | ||||
| 			if (!correct_100p_fill){ | ||||
| 				wxString msg_text = _L("The ") + str_fill_pattern + _L(" infill pattern is not supposed to work at 100% density.\n" | ||||
| 					"\nShall I switch to rectilinear fill pattern?"); | ||||
| 				auto dialog = new wxMessageDialog(parent(), msg_text, _L("Infill"), wxICON_WARNING | wxYES | wxNO); | ||||
| 				wxString msg_text = _(L("The ")) + str_fill_pattern + _(L(" infill pattern is not supposed to work at 100% density.\n" | ||||
| 					"\nShall I switch to rectilinear fill pattern?")); | ||||
| 				auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Infill")), wxICON_WARNING | wxYES | wxNO); | ||||
| 				DynamicPrintConfig new_conf = *m_config; | ||||
| 				if (dialog->ShowModal() == wxID_YES) { | ||||
| 					new_conf.set_key_value("fill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear)); | ||||
|  | @ -676,7 +676,7 @@ void TabPrint::update() | |||
| 	} | ||||
| 
 | ||||
| 	bool have_perimeters = m_config->opt_int("perimeters") > 0; | ||||
| 	std::vector<std::string> vec_enable = { "extra_perimeters", "ensure_vertical_shell_thickness", "thin_walls", "overhangs", | ||||
| 	std::vector<std::string> vec_enable = {	"extra_perimeters", "ensure_vertical_shell_thickness", "thin_walls", "overhangs", | ||||
| 											"seam_position", "external_perimeters_first", "external_perimeter_extrusion_width", | ||||
| 											"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed" }; | ||||
| 	for (auto el : vec_enable) | ||||
|  | @ -685,21 +685,21 @@ void TabPrint::update() | |||
| 	bool have_infill = m_config->option<ConfigOptionPercent>("fill_density")->value > 0; | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"fill_pattern", "infill_every_layers", "infill_only_where_needed", | ||||
| 					"solid_infill_every_layers", "solid_infill_below_area", "infill_extruder"}; | ||||
| 					"solid_infill_every_layers", "solid_infill_below_area", "infill_extruder" }; | ||||
| 	// infill_extruder uses the same logic as in Print::extruders()
 | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_infill); | ||||
| 
 | ||||
| 	bool have_solid_infill = m_config->opt_int("top_solid_layers") > 0 || m_config->opt_int("bottom_solid_layers") > 0; | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = { "external_fill_pattern", "infill_first", "solid_infill_extruder", | ||||
| 		"solid_infill_extrusion_width", "solid_infill_speed" }; | ||||
| 	vec_enable = {	"external_fill_pattern", "infill_first", "solid_infill_extruder", | ||||
| 					"solid_infill_extrusion_width", "solid_infill_speed" }; | ||||
| 	// solid_infill_extruder uses the same logic as in Print::extruders()
 | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_solid_infill); | ||||
| 
 | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = { "fill_angle", "bridge_angle", "infill_extrusion_width",  | ||||
| 	vec_enable = {	"fill_angle", "bridge_angle", "infill_extrusion_width", | ||||
| 					"infill_speed", "bridge_speed" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_infill || have_solid_infill); | ||||
|  | @ -715,13 +715,13 @@ void TabPrint::update() | |||
| 	bool have_default_acceleration = m_config->opt_float("default_acceleration") > 0; | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"perimeter_acceleration", "infill_acceleration", | ||||
| 					"bridge_acceleration", "first_layer_acceleration"}; | ||||
| 					"bridge_acceleration", "first_layer_acceleration" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_default_acceleration); | ||||
| 
 | ||||
| 	bool have_skirt = m_config->opt_int("skirts") > 0 || m_config->opt_float("min_skirt_length") > 0; | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"skirt_distance", "skirt_height"}; | ||||
| 	vec_enable = { "skirt_distance", "skirt_height" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_skirt); | ||||
| 
 | ||||
|  | @ -737,13 +737,13 @@ void TabPrint::update() | |||
| 	vec_enable = {	"support_material_threshold", "support_material_pattern", "support_material_with_sheath", | ||||
| 					"support_material_spacing", "support_material_angle", "support_material_interface_layers", | ||||
| 					"dont_support_bridges", "support_material_extrusion_width", "support_material_contact_distance", | ||||
| 					"support_material_xy_spacing"}; | ||||
| 					"support_material_xy_spacing" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_support_material); | ||||
| 
 | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"support_material_interface_spacing", "support_material_interface_extruder", | ||||
| 					"support_material_interface_speed", "support_material_interface_contact_loops"}; | ||||
| 					"support_material_interface_speed", "support_material_interface_contact_loops" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_support_material && have_support_interface); | ||||
| 	get_field("support_material_synchronize_layers")->toggle(have_support_soluble); | ||||
|  | @ -754,7 +754,7 @@ void TabPrint::update() | |||
| 
 | ||||
| 	bool have_sequential_printing = m_config->opt_bool("complete_objects"); | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"extruder_clearance_radius", "extruder_clearance_height"}; | ||||
| 	vec_enable = { "extruder_clearance_radius", "extruder_clearance_height" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_sequential_printing); | ||||
| 
 | ||||
|  | @ -763,7 +763,7 @@ void TabPrint::update() | |||
| 
 | ||||
| 	bool have_wipe_tower = m_config->opt_bool("wipe_tower"); | ||||
| 	vec_enable.resize(0); | ||||
| 	vec_enable = {	"wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_per_color_wipe"}; | ||||
| 	vec_enable = { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_per_color_wipe" }; | ||||
| 	for (auto el : vec_enable) | ||||
| 		get_field(el)->toggle(have_wipe_tower); | ||||
| 
 | ||||
|  | @ -783,27 +783,27 @@ void TabFilament::build() | |||
| 	m_presets = &m_preset_bundle->filaments; | ||||
| 	m_config = &m_preset_bundle->filaments.get_edited_preset().config; | ||||
| 
 | ||||
| 	auto page = add_options_page(_L("Filament"), "spool.png"); | ||||
| 		auto optgroup = page->new_optgroup(_L("Filament")); | ||||
| 	auto page = add_options_page(_(L("Filament")), "spool.png"); | ||||
| 		auto optgroup = page->new_optgroup(_(L("Filament"))); | ||||
| 		optgroup->append_single_option_line("filament_colour"); | ||||
| 		optgroup->append_single_option_line("filament_diameter"); | ||||
| 		optgroup->append_single_option_line("extrusion_multiplier"); | ||||
| 		optgroup->append_single_option_line("filament_density"); | ||||
| 		optgroup->append_single_option_line("filament_cost"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Temperature (°C)")/* +" (\u00B0C)"*/); // degree sign
 | ||||
| 		Line line = { _L("Extruder"), "" }; | ||||
| 		optgroup = page->new_optgroup(_(L("Temperature ")) +" (\u00B0C)"); // degree sign
 | ||||
| 		Line line = { _(L("Extruder")), "" }; | ||||
| 		line.append_option(optgroup->get_option("first_layer_temperature")); | ||||
| 		line.append_option(optgroup->get_option("temperature")); | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 		line = { _L("Bed"), "" }; | ||||
| 		line = { _(L("Bed")), "" }; | ||||
| 		line.append_option(optgroup->get_option("first_layer_bed_temperature")); | ||||
| 		line.append_option(optgroup->get_option("bed_temperature")); | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Cooling"), "hourglass.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Enable")); | ||||
| 	page = add_options_page(_(L("Cooling")), "hourglass.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Enable"))); | ||||
| 		optgroup->append_single_option_line("fan_always_on"); | ||||
| 		optgroup->append_single_option_line("cooling"); | ||||
| 
 | ||||
|  | @ -814,8 +814,8 @@ void TabFilament::build() | |||
| 		}; | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Fan settings")); | ||||
| 		line = {_L("Fan speed"),""}; | ||||
| 		optgroup = page->new_optgroup(_(L("Fan settings"))); | ||||
| 		line = { _(L("Fan speed")), "" }; | ||||
| 		line.append_option(optgroup->get_option("min_fan_speed")); | ||||
| 		line.append_option(optgroup->get_option("max_fan_speed")); | ||||
| 		optgroup->append_line(line); | ||||
|  | @ -823,50 +823,50 @@ void TabFilament::build() | |||
| 		optgroup->append_single_option_line("bridge_fan_speed"); | ||||
| 		optgroup->append_single_option_line("disable_fan_first_layers"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Cooling thresholds"), 250); | ||||
| 		optgroup = page->new_optgroup(_(L("Cooling thresholds")), 250); | ||||
| 		optgroup->append_single_option_line("fan_below_layer_time"); | ||||
| 		optgroup->append_single_option_line("slowdown_below_layer_time"); | ||||
| 		optgroup->append_single_option_line("min_print_speed"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Advanced"), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Filament properties")); | ||||
| 	page = add_options_page(_(L("Advanced")), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Filament properties"))); | ||||
| 		optgroup->append_single_option_line("filament_type"); | ||||
| 		optgroup->append_single_option_line("filament_soluble"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Print speed override")); | ||||
| 		optgroup = page->new_optgroup(_(L("Print speed override"))); | ||||
| 		optgroup->append_single_option_line("filament_max_volumetric_speed"); | ||||
| 
 | ||||
| 		line = {"",""}; | ||||
| 		line = { "", "" }; | ||||
| 		line.full_width = 1; | ||||
| 		line.widget = [this](wxWindow* parent) { | ||||
| 			return description_line_widget(parent, &m_volumetric_speed_description_line); | ||||
| 		}; | ||||
| 		optgroup->append_line(line); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Custom G-code"), "cog.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Start G-code"), 0); | ||||
| 	page = add_options_page(_(L("Custom G-code")), "cog.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Start G-code")), 0); | ||||
| 		Option option = optgroup->get_option("start_filament_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("End G-code"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("End G-code")), 0); | ||||
| 		option = optgroup->get_option("end_filament_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Notes"), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Notes"), 0); | ||||
| 	page = add_options_page(_(L("Notes")), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Notes")), 0); | ||||
| 		optgroup->label_width = 0; | ||||
| 		option = optgroup->get_option("filament_notes"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 250; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Dependencies"), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Profile dependencies")); | ||||
| 		line = {_L("Compatible printers"), ""}; | ||||
| 	page = add_options_page(_(L("Dependencies")), "wrench.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Profile dependencies"))); | ||||
| 		line = { _(L("Compatible printers")), "" }; | ||||
| 		line.widget = [this](wxWindow* parent){ | ||||
| 			return compatible_printers_widget(parent, &m_compatible_printers_checkbox, &m_compatible_printers_btn); | ||||
| 		}; | ||||
|  | @ -934,13 +934,13 @@ void TabPrinter::build() | |||
| 	auto   *nozzle_diameter = dynamic_cast<const ConfigOptionFloats*>(m_config->option("nozzle_diameter")); | ||||
| 	m_extruders_count = nozzle_diameter->values.size(); | ||||
| 
 | ||||
| 	auto page = add_options_page(_L("General"), "printer_empty.png"); | ||||
| 		auto optgroup = page->new_optgroup(_L("Size and coordinates")); | ||||
| 	auto page = add_options_page(_(L("General")), "printer_empty.png"); | ||||
| 		auto optgroup = page->new_optgroup(_(L("Size and coordinates"))); | ||||
| 
 | ||||
| 		Line line{ _L("Bed shape"), "" }; | ||||
| 		Line line{ _(L("Bed shape")), "" }; | ||||
| 		line.widget = [this](wxWindow* parent){ | ||||
| 			auto btn = new wxButton(parent, wxID_ANY, _L(" Set …")/*+"\u2026"*/, wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| //			btn->SetFont(Slic3r::GUI::small_font);
 | ||||
| 	auto btn = new wxButton(parent, wxID_ANY, _(L(" Set "))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| 			//			btn->SetFont(Slic3r::GUI::small_font);
 | ||||
| 			btn->SetBitmap(wxBitmap(from_u8(Slic3r::var("printer_empty.png")), wxBITMAP_TYPE_PNG)); | ||||
| 
 | ||||
| 			auto sizer = new wxBoxSizer(wxHORIZONTAL); | ||||
|  | @ -959,12 +959,12 @@ void TabPrinter::build() | |||
| 		optgroup->append_line(line); | ||||
| 		optgroup->append_single_option_line("z_offset"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Capabilities")); | ||||
| 		optgroup = page->new_optgroup(_(L("Capabilities"))); | ||||
| 		ConfigOptionDef def; | ||||
| 			def.type =  coInt, | ||||
| 			def.default_value = new ConfigOptionInt(1);  | ||||
| 			def.label = _LS("Extruders"); | ||||
| 			def.tooltip = _LS("Number of extruders of the printer."); | ||||
| 			def.label = L("Extruders"); | ||||
| 			def.tooltip = L("Number of extruders of the printer."); | ||||
| 			def.min = 1; | ||||
| 		Option option(def, "extruders_count"); | ||||
| 		optgroup->append_single_option_line(option); | ||||
|  | @ -986,13 +986,13 @@ void TabPrinter::build() | |||
| 
 | ||||
| 		if (!m_no_controller) | ||||
| 		{ | ||||
| 		optgroup = page->new_optgroup(_L("USB/Serial connection")); | ||||
| 			line = {_L("Serial port"), ""}; | ||||
| 		optgroup = page->new_optgroup(_(L("USB/Serial connection"))); | ||||
| 			line = {_(L("Serial port")), ""}; | ||||
| 			Option serial_port = optgroup->get_option("serial_port"); | ||||
| 			serial_port.side_widget = ([this](wxWindow* parent){ | ||||
| 				auto btn = new wxBitmapButton(parent, wxID_ANY, wxBitmap(from_u8(Slic3r::var("arrow_rotate_clockwise.png")), wxBITMAP_TYPE_PNG), | ||||
| 					wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); | ||||
| 				btn->SetToolTip(_L("Rescan serial ports")); | ||||
| 				btn->SetToolTip(_(L("Rescan serial ports"))); | ||||
| 				auto sizer = new wxBoxSizer(wxHORIZONTAL); | ||||
| 				sizer->Add(btn); | ||||
| 
 | ||||
|  | @ -1001,7 +1001,7 @@ void TabPrinter::build() | |||
| 			}); | ||||
| 			auto serial_test = [this](wxWindow* parent){ | ||||
| 				auto btn = m_serial_test_btn = new wxButton(parent, wxID_ANY, | ||||
| 					_L("Test"), wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| 					_(L("Test")), wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| //				btn->SetFont($Slic3r::GUI::small_font);
 | ||||
| 				btn->SetBitmap(wxBitmap(from_u8(Slic3r::var("wrench.png")), wxBITMAP_TYPE_PNG)); | ||||
| 				auto sizer = new wxBoxSizer(wxHORIZONTAL); | ||||
|  | @ -1014,10 +1014,10 @@ void TabPrinter::build() | |||
| 						m_config->opt_int("serial_speed") | ||||
| 						); | ||||
| 					if (res && sender->wait_connected()) { | ||||
| 						show_info(parent, _L("Connection to printer works correctly."), _L("Success!")); | ||||
| 						show_info(parent, _(L("Connection to printer works correctly.")), _(L("Success!"))); | ||||
| 					} | ||||
| 					else { | ||||
| 						show_error(parent, _L("Connection failed.")); | ||||
| 						show_error(parent, _(L("Connection failed."))); | ||||
| 					} | ||||
| 				}); | ||||
| 				return sizer; | ||||
|  | @ -1029,10 +1029,10 @@ void TabPrinter::build() | |||
| 			optgroup->append_line(line); | ||||
| 		} | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("OctoPrint upload")); | ||||
| 		optgroup = page->new_optgroup(_(L("OctoPrint upload"))); | ||||
| 		// # append two buttons to the Host line
 | ||||
| 		auto octoprint_host_browse = [this] (wxWindow* parent) { | ||||
| 			auto btn = new wxButton(parent, wxID_ANY, _L(" Browse …")/*+"\u2026"*/, wxDefaultPosition, wxDefaultSize, wxBU_LEFT); | ||||
| 			auto btn = new wxButton(parent, wxID_ANY, _(L(" Browse "))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT); | ||||
| //			btn->SetFont($Slic3r::GUI::small_font);
 | ||||
| 			btn->SetBitmap(wxBitmap(from_u8(Slic3r::var("zoom.png")), wxBITMAP_TYPE_PNG)); | ||||
| 			auto sizer = new wxBoxSizer(wxHORIZONTAL); | ||||
|  | @ -1044,7 +1044,7 @@ void TabPrinter::build() | |||
| 			btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent e){ | ||||
| 				if (m_event_button_browse > 0){ | ||||
| 					wxCommandEvent event(m_event_button_browse); | ||||
| 					event.SetString(_L("Button BROWSE was clicked!")); | ||||
| 					event.SetString(_(L("Button BROWSE was clicked!"))); | ||||
| 					g_wxMainFrame->ProcessWindowEvent(event); | ||||
| 				} | ||||
| // 				// # look for devices
 | ||||
|  | @ -1069,7 +1069,7 @@ void TabPrinter::build() | |||
| 		}; | ||||
| 
 | ||||
| 		auto octoprint_host_test = [this](wxWindow* parent) { | ||||
| 			auto btn = m_octoprint_host_test_btn = new wxButton(parent, wxID_ANY, _L("Test"),  | ||||
| 			auto btn = m_octoprint_host_test_btn = new wxButton(parent, wxID_ANY, _(L("Test")),  | ||||
| 				wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| //			btn->SetFont($Slic3r::GUI::small_font);
 | ||||
| 			btn->SetBitmap(wxBitmap(from_u8(Slic3r::var("wrench.png")), wxBITMAP_TYPE_PNG)); | ||||
|  | @ -1079,7 +1079,7 @@ void TabPrinter::build() | |||
| 			btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent e) { | ||||
| 				if (m_event_button_test > 0){ | ||||
| 					wxCommandEvent event(m_event_button_test); | ||||
| 					event.SetString(_L("Button TEST was clicked!")); | ||||
| 					event.SetString(_(L("Button TEST was clicked!"))); | ||||
| 					g_wxMainFrame->ProcessWindowEvent(event); | ||||
| 				} | ||||
| // 				my $ua = LWP::UserAgent->new;
 | ||||
|  | @ -1107,54 +1107,54 @@ void TabPrinter::build() | |||
| 		optgroup->append_line(host_line); | ||||
| 		optgroup->append_single_option_line("octoprint_apikey"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Firmware")); | ||||
| 		optgroup = page->new_optgroup(_(L("Firmware"))); | ||||
| 		optgroup->append_single_option_line("gcode_flavor"); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Advanced")); | ||||
| 		optgroup = page->new_optgroup(_(L("Advanced"))); | ||||
| 		optgroup->append_single_option_line("use_relative_e_distances"); | ||||
| 		optgroup->append_single_option_line("use_firmware_retraction"); | ||||
| 		optgroup->append_single_option_line("use_volumetric_e"); | ||||
| 		optgroup->append_single_option_line("variable_layer_height"); | ||||
| 
 | ||||
| 	page = add_options_page(_L("Custom G-code"), "cog.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Start G-code"), 0); | ||||
| 	page = add_options_page(_(L("Custom G-code")), "cog.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Start G-code")), 0); | ||||
| 		option = optgroup->get_option("start_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("End G-code"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("End G-code")), 0); | ||||
| 		option = optgroup->get_option("end_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Before layer change G-code"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("Before layer change G-code")), 0); | ||||
| 		option = optgroup->get_option("before_layer_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("After layer change G-code"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("After layer change G-code")), 0); | ||||
| 		option = optgroup->get_option("layer_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Tool change G-code"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("Tool change G-code")), 0); | ||||
| 		option = optgroup->get_option("toolchange_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 
 | ||||
| 		optgroup = page->new_optgroup(_L("Between objects G-code (for sequential printing)"), 0); | ||||
| 		optgroup = page->new_optgroup(_(L("Between objects G-code (for sequential printing)")), 0); | ||||
| 		option = optgroup->get_option("between_objects_gcode"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 150; | ||||
| 		optgroup->append_single_option_line(option); | ||||
| 	 | ||||
| 	page = add_options_page(_L("Notes"), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_L("Notes"), 0); | ||||
| 	page = add_options_page(_(L("Notes")), "note.png"); | ||||
| 		optgroup = page->new_optgroup(_(L("Notes")), 0); | ||||
| 		option = optgroup->get_option("printer_notes"); | ||||
| 		option.opt.full_width = true; | ||||
| 		option.opt.height = 250; | ||||
|  | @ -1183,24 +1183,24 @@ void TabPrinter::extruders_count_changed(size_t extruders_count){ | |||
| void TabPrinter::build_extruder_pages(){ | ||||
| 	for (auto extruder_idx = m_extruder_pages.size(); extruder_idx < m_extruders_count; ++extruder_idx){ | ||||
| 		//# build page
 | ||||
| 		auto page = add_options_page(_L("Extruder ") + wxString::Format(_T("%i"), extruder_idx + 1), "funnel.png", true); | ||||
| 		auto page = add_options_page(_(L("Extruder ")) + wxString::Format(_T("%i"), extruder_idx + 1), "funnel.png", true); | ||||
| 		m_extruder_pages.push_back(page); | ||||
| 			 | ||||
| 			auto optgroup = page->new_optgroup(_L("Size")); | ||||
| 			auto optgroup = page->new_optgroup(_(L("Size"))); | ||||
| 			optgroup->append_single_option_line("nozzle_diameter", extruder_idx); | ||||
| 		 | ||||
| 			optgroup = page->new_optgroup(_L("Layer height limits")); | ||||
| 			optgroup = page->new_optgroup(_(L("Layer height limits"))); | ||||
| 			optgroup->append_single_option_line("min_layer_height", extruder_idx); | ||||
| 			optgroup->append_single_option_line("max_layer_height", extruder_idx); | ||||
| 				 | ||||
| 		 | ||||
| 			optgroup = page->new_optgroup(_L("Position (for multi-extruder printers)")); | ||||
| 			optgroup = page->new_optgroup(_(L("Position (for multi-extruder printers)"))); | ||||
| 			optgroup->append_single_option_line("extruder_offset", extruder_idx); | ||||
| 		 | ||||
| 			optgroup = page->new_optgroup(_L("Retraction")); | ||||
| 			optgroup = page->new_optgroup(_(L("Retraction"))); | ||||
| 			optgroup->append_single_option_line("retract_length", extruder_idx); | ||||
| 			optgroup->append_single_option_line("retract_lift", extruder_idx); | ||||
| 				Line line = { _L("Only lift Z"), "" }; | ||||
| 				Line line = { _(L("Only lift Z")), "" }; | ||||
| 				line.append_option(optgroup->get_option("retract_lift_above", extruder_idx)); | ||||
| 				line.append_option(optgroup->get_option("retract_lift_below", extruder_idx)); | ||||
| 				optgroup->append_line(line); | ||||
|  | @ -1213,11 +1213,11 @@ void TabPrinter::build_extruder_pages(){ | |||
| 			optgroup->append_single_option_line("wipe", extruder_idx); | ||||
| 			optgroup->append_single_option_line("retract_before_wipe", extruder_idx); | ||||
| 	 | ||||
| 			optgroup = page->new_optgroup(_L("Retraction when tool is disabled (advanced settings for multi-extruder setups)")); | ||||
| 			optgroup = page->new_optgroup(_(L("Retraction when tool is disabled (advanced settings for multi-extruder setups)"))); | ||||
| 			optgroup->append_single_option_line("retract_length_toolchange", extruder_idx); | ||||
| 			optgroup->append_single_option_line("retract_restart_extra_toolchange", extruder_idx); | ||||
| 
 | ||||
| 			optgroup = page->new_optgroup(_L("Preview")); | ||||
| 			optgroup = page->new_optgroup(_(L("Preview"))); | ||||
| 			optgroup->append_single_option_line("extruder_colour", extruder_idx); | ||||
| 	} | ||||
|   | ||||
|  | @ -1229,7 +1229,7 @@ void TabPrinter::build_extruder_pages(){ | |||
| 	// # rebuild page list
 | ||||
| 	PageShp page_note = m_pages.back(); | ||||
| 	m_pages.pop_back(); | ||||
| 	while (m_pages.back()->title().find(_L("Extruder")) != std::string::npos) | ||||
| 	while (m_pages.back()->title().find(_(L("Extruder"))) != std::string::npos) | ||||
| 		m_pages.pop_back(); | ||||
| 	for (auto page_extruder : m_extruder_pages) | ||||
| 		m_pages.push_back(page_extruder); | ||||
|  | @ -1307,9 +1307,9 @@ void TabPrinter::update(){ | |||
| 
 | ||||
| 		if (use_firmware_retraction && wipe) { | ||||
| 			auto dialog = new wxMessageDialog(parent(), | ||||
| 				_L("The Wipe option is not available when using the Firmware Retraction mode.\n" | ||||
| 				"\nShall I disable it in order to enable Firmware Retraction?"), | ||||
| 				_L("Firmware Retraction"), wxICON_WARNING | wxYES | wxNO); | ||||
| 				_(L("The Wipe option is not available when using the Firmware Retraction mode.\n" | ||||
| 				"\nShall I disable it in order to enable Firmware Retraction?")), | ||||
| 				_(L("Firmware Retraction")), wxICON_WARNING | wxYES | wxNO); | ||||
| 
 | ||||
| 			DynamicPrintConfig new_conf = *m_config; | ||||
| 			if (dialog->ShowModal() == wxID_YES) { | ||||
|  | @ -1464,8 +1464,8 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr | |||
| 	auto type_name = presets->name(); | ||||
| 	auto tab = "          "; | ||||
| 	auto name = old_preset.is_default ? | ||||
| 		_L("Default ") + type_name + _L(" preset") : | ||||
| 		(type_name + _L(" preset\n") + tab + old_preset.name); | ||||
| 		_(L("Default ")) + type_name + _(L(" preset")) : | ||||
| 		(type_name + _(L(" preset\n")) + tab + old_preset.name); | ||||
| 	// Collect descriptions of the dirty options.
 | ||||
| 	std::vector<std::string> option_names; | ||||
| 	for(auto opt_key: presets->current_dirty_options()) { | ||||
|  | @ -1483,11 +1483,11 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr | |||
| 	for (auto changed_name : option_names) | ||||
| 		changes += tab + changed_name + "\n"; | ||||
| 	auto message = (!new_printer_name.empty()) ? | ||||
| 		name + _L("\n\nis not compatible with printer\n") +tab + new_printer_name+ _L("\n\nand it has the following unsaved changes:") : | ||||
| 		name + _L("\n\nhas the following unsaved changes:"); | ||||
| 		name + _(L("\n\nis not compatible with printer\n")) +tab + new_printer_name+ _(L("\n\nand it has the following unsaved changes:")) : | ||||
| 		name + _(L("\n\nhas the following unsaved changes:")); | ||||
| 	auto confirm = new wxMessageDialog(parent(), | ||||
| 		message + "\n" +changes +_L("\n\nDiscard changes and continue anyway?"), | ||||
| 		_L("Unsaved Changes"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION); | ||||
| 		message + "\n" +changes +_(L("\n\nDiscard changes and continue anyway?")), | ||||
| 		_(L("Unsaved Changes")), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION); | ||||
| 	return confirm->ShowModal() == wxID_YES; | ||||
| } | ||||
| 
 | ||||
|  | @ -1555,7 +1555,7 @@ void Tab::save_preset(std::string name /*= ""*/) | |||
| 			return; | ||||
| 		name = dlg->get_name(); | ||||
| 		if (name == ""){ | ||||
| 			show_error(this, _L("The supplied name is empty. It can't be saved.")); | ||||
| 			show_error(this, _(L("The supplied name is empty. It can't be saved."))); | ||||
| 			return; | ||||
| 		} | ||||
| 	} | ||||
|  | @ -1575,10 +1575,10 @@ void Tab::delete_preset() | |||
| { | ||||
| 	auto current_preset = m_presets->get_selected_preset(); | ||||
| 	// Don't let the user delete the ' - default - ' configuration.
 | ||||
| 	wxString action = current_preset.is_external ? _L("remove") : _L("delete"); | ||||
| 	wxString msg = _L("Are you sure you want to ") + action + _L(" the selected preset?"); | ||||
| 	action = current_preset.is_external ? _L("Remove") : _L("Delete"); | ||||
| 	wxString title = action + _L(" Preset"); | ||||
| 	wxString action = current_preset.is_external ? _(L("remove")) : _(L("delete")); | ||||
| 	wxString msg = _(L("Are you sure you want to ")) + action + _(L(" the selected preset?")); | ||||
| 	action = current_preset.is_external ? _(L("Remove")) : _(L("Delete")); | ||||
| 	wxString title = action + _(L(" Preset")); | ||||
| 	if (current_preset.is_default || | ||||
| 		wxID_YES != wxMessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal()) | ||||
| 		return; | ||||
|  | @ -1630,8 +1630,8 @@ void Tab::update_ui_from_settings() | |||
| // Return a callback to create a Tab widget to mark the preferences as compatible / incompatible to the current printer.
 | ||||
| wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox, wxButton** btn) | ||||
| { | ||||
| 	*checkbox = new wxCheckBox(parent, wxID_ANY, _L("All")); | ||||
| 	*btn = new wxButton(parent, wxID_ANY, _L(" Set …")/*+"\u2026"*/, wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| 	*checkbox = new wxCheckBox(parent, wxID_ANY, _(L("All"))); | ||||
| 	*btn = new wxButton(parent, wxID_ANY, _(L(" Set "))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); | ||||
| 
 | ||||
| 	(*btn)->SetBitmap(wxBitmap(from_u8(Slic3r::var("printer_empty.png")), wxBITMAP_TYPE_PNG)); | ||||
| 
 | ||||
|  | @ -1661,8 +1661,8 @@ wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox | |||
| 		} | ||||
| 
 | ||||
| 		auto dlg = new wxMultiChoiceDialog(parent, | ||||
| 		_L("Select the printers this profile is compatible with."), | ||||
| 		_L("Compatible printers"),  presets); | ||||
| 		_(L("Select the printers this profile is compatible with.")), | ||||
| 		_(L("Compatible printers")),  presets); | ||||
| 		// # Collect and set indices of printers marked as compatible.
 | ||||
| 		wxArrayInt selections; | ||||
| 		auto *compatible_printers = dynamic_cast<const ConfigOptionStrings*>(m_config->option("compatible_printers")); | ||||
|  | @ -1745,7 +1745,7 @@ ConfigOptionsGroupShp Page::new_optgroup(wxString title, int noncommon_label_wid | |||
| 
 | ||||
| void SavePresetWindow::build(wxString title, std::string default_name, std::vector<std::string> &values) | ||||
| { | ||||
| 	auto text = new wxStaticText(this, wxID_ANY, _L("Save ") + title + _L(" as:"),  | ||||
| 	auto text = new wxStaticText(this, wxID_ANY, _(L("Save ")) + title + _(L(" as:")),  | ||||
| 									wxDefaultPosition, wxDefaultSize); | ||||
| 	m_combo = new wxComboBox(this, wxID_ANY, from_u8(default_name),  | ||||
| 							wxDefaultPosition, wxDefaultSize, 0, 0, wxTE_PROCESS_ENTER); | ||||
|  | @ -1779,10 +1779,10 @@ void SavePresetWindow::accept() | |||
| 			} | ||||
| 		} | ||||
| 		if (is_unusable_symbol) { | ||||
| 			show_error(this, _L("The supplied name is not valid; the following characters are not allowed:")+" <>:/\\|?*\""); | ||||
| 			show_error(this, _(L("The supplied name is not valid; the following characters are not allowed:"))+" <>:/\\|?*\""); | ||||
| 		} | ||||
| 		else if (m_chosen_name.compare("- default -") == 0) { | ||||
| 			show_error(this, _L("The supplied name is not available.")); | ||||
| 			show_error(this, _(L("The supplied name is not available."))); | ||||
| 		} | ||||
| 		else { | ||||
| 			EndModal(wxID_OK); | ||||
|  |  | |||
|  | @ -179,7 +179,7 @@ class TabPrint : public Tab | |||
| public: | ||||
| 	TabPrint() {} | ||||
| 	TabPrint(wxNotebook* parent, bool no_controller) :  | ||||
| 		Tab(parent, _L("Print Settings"), "print", no_controller) {} | ||||
| 		Tab(parent, _(L("Print Settings")), "print", no_controller) {} | ||||
| 	~TabPrint(){} | ||||
| 
 | ||||
| 	ogStaticText*	m_recommended_thin_wall_thickness_description_line; | ||||
|  | @ -199,7 +199,7 @@ class TabFilament : public Tab | |||
| public: | ||||
| 	TabFilament() {} | ||||
| 	TabFilament(wxNotebook* parent, bool no_controller) :  | ||||
| 		Tab(parent, _L("Filament Settings"), "filament", no_controller) {} | ||||
| 		Tab(parent, _(L("Filament Settings")), "filament", no_controller) {} | ||||
| 	~TabFilament(){} | ||||
| 
 | ||||
| 	void		build() override; | ||||
|  | @ -225,7 +225,7 @@ public: | |||
| 
 | ||||
| 	TabPrinter() {} | ||||
| 	TabPrinter(wxNotebook* parent, bool no_controller, bool is_disabled_btn_browse, bool is_user_agent) : | ||||
| 		Tab(parent, _L("Printer Settings"), "printer", no_controller), | ||||
| 		Tab(parent, _(L("Printer Settings")), "printer", no_controller), | ||||
| 		m_is_disabled_button_browse(is_disabled_btn_browse),  | ||||
| 		m_is_user_agent(is_user_agent) {} | ||||
| 	~TabPrinter(){} | ||||
|  | @ -245,7 +245,7 @@ public: | |||
| class SavePresetWindow :public wxDialog | ||||
| { | ||||
| public: | ||||
| 	SavePresetWindow(wxWindow* parent) :wxDialog(parent, wxID_ANY, _L("Save preset")){} | ||||
| 	SavePresetWindow(wxWindow* parent) :wxDialog(parent, wxID_ANY, _(L("Save preset"))){} | ||||
| 	~SavePresetWindow(){} | ||||
| 
 | ||||
| 	std::string		m_chosen_name; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka