From b657b1d20dc01f3f6600562d554857211382038e Mon Sep 17 00:00:00 2001 From: Alexandre Date: Fri, 21 Feb 2025 11:54:18 -0300 Subject: [PATCH] Fix strings missing the localization marker --- src/libslic3r/PrintConfig.cpp | 199 ++++++++++++++++------------------ 1 file changed, 94 insertions(+), 105 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index e8e7096a07..bb6544bfcd 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -465,9 +465,8 @@ void PrintConfigDef::init_common_params() ConfigOptionDef* def; def = this->add("printer_technology", coEnum); - //def->label = L("Printer technology"); - def->label = "Printer technology"; - //def->tooltip = L("Printer technology"); + def->label = L("Printer technology"); + def->tooltip = L("Printer technology"); def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); def->enum_values.push_back("FFF"); def->enum_values.push_back("SLA"); @@ -3111,10 +3110,8 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(100)); def = this->add("inherits", coString); - //def->label = L("Inherits profile"); - def->label = "Inherits profile"; - //def->tooltip = L("Name of parent profile"); - def->tooltip = "Name of parent profile"; + def->label = L("Inherits profile"); + def->tooltip = L("Name of parent profile"); def->full_width = true; def->height = 5; def->set_default_value(new ConfigOptionString()); @@ -3128,7 +3125,6 @@ void PrintConfigDef::init_fff_params() def = this->add("interface_shells", coBool); def->label = L("Interface shells"); - def->label = "Interface shells"; def->tooltip = L("Force the generation of solid shells between adjacent materials/volumes. " "Useful for multi-extruder prints with translucent materials or manual soluble " "support material"); @@ -4290,7 +4286,6 @@ void PrintConfigDef::init_fff_params() def = this->add("skirt_height", coInt); def->label = L("Skirt height"); - //def->label = "Skirt height"; def->tooltip = L("How many layers of skirt. Usually only one layer"); def->sidetext = L("layers"); def->mode = comSimple; @@ -4430,7 +4425,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloatOrPercent(200, true)); def = this->add("spiral_starting_flow_ratio", coFloat); - def->label = "Spiral starting flow ratio"; + def->label = L("Spiral starting flow ratio"); def->tooltip = L("Sets the starting flow ratio while transitioning from the last bottom layer to the spiral. " "Normally the spiral transition scales the flow ratio from 0% to 100% during the first loop " "which can in some cases lead to under extrusion at the start of the spiral."); @@ -4440,7 +4435,7 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def = this->add("spiral_finishing_flow_ratio", coFloat); - def->label = "Spiral finishing flow ratio"; + def->label = L("Spiral finishing flow ratio"); def->tooltip = L("Sets the finishing flow ratio while ending the spiral. " "Normally the spiral transition scales the flow ratio from 100% to 0% during the last loop " "which can in some cases lead to under extrusion at the end of the spiral."); @@ -7214,20 +7209,20 @@ CLIActionsConfigDef::CLIActionsConfigDef() def->set_default_value(new ConfigOptionBool(false));*/ def = this->add("export_3mf", coString); - def->label = "Export 3MF"; - def->tooltip = "Export project as 3MF."; + def->label = L("Export 3MF"); + def->tooltip = L("Export project as 3MF."); def->cli_params = "filename.3mf"; def->set_default_value(new ConfigOptionString("output.3mf")); def = this->add("export_slicedata", coString); - def->label = "Export slicing data"; - def->tooltip = "Export slicing data to a folder."; + def->label = L("Export slicing data"); + def->tooltip = L("Export slicing data to a folder."); def->cli_params = "slicing_data_directory"; def->set_default_value(new ConfigOptionString("cached_data")); def = this->add("load_slicedata", coStrings); - def->label = "Load slicing data"; - def->tooltip = "Load cached slicing data from directory"; + def->label = L("Load slicing data"); + def->tooltip = L("Load cached slicing data from directory"); def->cli_params = "slicing_data_directory"; def->set_default_value(new ConfigOptionString("cached_data")); @@ -7237,13 +7232,13 @@ CLIActionsConfigDef::CLIActionsConfigDef() def->set_default_value(new ConfigOptionBool(false));*/ def = this->add("export_stl", coBool); - def->label = "Export STL"; - def->tooltip = "Export the objects as single STL."; + def->label = L("Export STL"); + def->tooltip = L("Export the objects as single STL."); def->set_default_value(new ConfigOptionBool(false)); def = this->add("export_stls", coString); - def->label = "Export multiple STLs"; - def->tooltip = "Export the objects as multiple STLs to directory"; + def->label = L("Export multiple STLs"); + def->tooltip = L("Export the objects as multiple STLs to directory"); def->set_default_value(new ConfigOptionString("stl_path")); /*def = this->add("export_gcode", coBool); @@ -7254,45 +7249,39 @@ CLIActionsConfigDef::CLIActionsConfigDef() /*def = this->add("gcodeviewer", coBool); // BBS: remove _L() - def->label = ("G-code viewer"); - def->tooltip = ("Visualize an already sliced and saved G-code"); + def->label = L("G-code viewer"); + def->tooltip = L("Visualize an already sliced and saved G-code"); def->cli = "gcodeviewer"; def->set_default_value(new ConfigOptionBool(false));*/ def = this->add("slice", coInt); - def->label = "Slice"; - def->tooltip = "Slice the plates: 0-all plates, i-plate i, others-invalid"; + def->label = L("Slice"); + def->tooltip = L("Slice the plates: 0-all plates, i-plate i, others-invalid"); def->cli = "slice"; def->cli_params = "option"; def->set_default_value(new ConfigOptionInt(0)); def = this->add("help", coBool); - def->label = "Help"; - def->tooltip = "Show command help."; + def->label = L("Help"); + def->tooltip = L("Show command help."); def->cli = "help|h"; def->set_default_value(new ConfigOptionBool(false)); def = this->add("uptodate", coBool); - def->label = "UpToDate"; - def->tooltip = "Update the configs values of 3mf to latest."; + def->label = L("UpToDate"); + def->tooltip = L("Update the configs values of 3mf to latest."); def->cli = "uptodate"; def->set_default_value(new ConfigOptionBool(false)); def = this->add("downward_check", coStrings); - def->label = "downward machines check"; - def->tooltip = "check whether current machine downward compatible with the machines in the list"; + def->label = L("downward machines check"); + def->tooltip = L("check whether current machine downward compatible with the machines in the list"); def->cli_params = "\"machine1.json;machine2.json;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("load_defaultfila", coBool); - def->label = "Load default filaments"; - def->tooltip = "Load first filament as default for those not loaded"; - def->cli_params = "option"; - def->set_default_value(new ConfigOptionBool(false)); - - def = this->add("min_save", coBool); - def->label = "Minimum save"; - def->tooltip = "export 3mf with minimum size."; + def->label = L("Load default filaments"); + def->tooltip = L("Load first filament as default for those not loaded"); def->cli_params = "option"; def->set_default_value(new ConfigOptionBool(false)); @@ -7303,15 +7292,15 @@ CLIActionsConfigDef::CLIActionsConfigDef() def->set_default_value(new ConfigOptionBool(false)); def = this->add("mtcpp", coInt); - def->label = "mtcpp"; - def->tooltip = "max triangle count per plate for slicing."; + def->label = L("mtcpp"); + def->tooltip = L("max triangle count per plate for slicing."); def->cli = "mtcpp"; def->cli_params = "count"; def->set_default_value(new ConfigOptionInt(1000000)); def = this->add("mstpp", coInt); - def->label = "mstpp"; - def->tooltip = "max slicing time per plate in seconds."; + def->label = L("mstpp"); + def->tooltip = L("max slicing time per plate in seconds."); def->cli = "mstpp"; def->cli_params = "time"; def->set_default_value(new ConfigOptionInt(300)); @@ -7323,8 +7312,8 @@ CLIActionsConfigDef::CLIActionsConfigDef() def->set_default_value(new ConfigOptionBool(false)); def = this->add("normative_check", coBool); - def->label = "Normative check"; - def->tooltip = "Check the normative items."; + def->label = L("Normative check"); + def->tooltip = L("Check the normative items."); def->cli_params = "option"; def->set_default_value(new ConfigOptionBool(true)); @@ -7339,19 +7328,19 @@ CLIActionsConfigDef::CLIActionsConfigDef() def->set_default_value(new ConfigOptionBool(false));*/ def = this->add("info", coBool); - def->label = "Output Model Info"; - def->tooltip = "Output the model's information."; + def->label = L("Output Model Info"); + def->tooltip = L("Output the model's information."); def->set_default_value(new ConfigOptionBool(false)); def = this->add("export_settings", coString); - def->label = "Export Settings"; - def->tooltip = "Export settings to a file."; + def->label = L("Export Settings"); + def->tooltip = L("Export settings to a file."); def->cli_params = "settings.json"; def->set_default_value(new ConfigOptionString("output.json")); def = this->add("pipe", coString); - def->label = "Send progress to pipe"; - def->tooltip = "Send progress to pipe."; + def->label = L("Send progress to pipe"); + def->tooltip = L("Send progress to pipe."); def->cli_params = "pipename"; def->set_default_value(new ConfigOptionString("")); } @@ -7395,15 +7384,15 @@ CLITransformConfigDef::CLITransformConfigDef() def->set_default_value(new ConfigOptionPoint(Vec2d(100,100)));*/ def = this->add("arrange", coInt); - def->label = "Arrange Options"; - def->tooltip = "Arrange options: 0-disable, 1-enable, others-auto"; + def->label = L("Arrange Options"); + def->tooltip = L("Arrange options: 0-disable, 1-enable, others-auto"); def->cli_params = "option"; //def->cli = "arrange|a"; def->set_default_value(new ConfigOptionInt(0)); def = this->add("repetitions", coInt); - def->label = "Repetions count"; - def->tooltip = "Repetions count of the whole model"; + def->label = L("Repetions count"); + def->tooltip = L("Repetions count of the whole model"); def->cli_params = "count"; def->set_default_value(new ConfigOptionInt(1)); @@ -7423,14 +7412,14 @@ CLITransformConfigDef::CLITransformConfigDef() def->tooltip = L("Multiply copies by creating a grid.");*/ def = this->add("assemble", coBool); - def->label = "Assemble"; - def->tooltip = "Arrange the supplied models in a plate and merge them in a single model in order to perform actions once."; + def->label = L("Assemble"); + def->tooltip = L("Arrange the supplied models in a plate and merge them in a single model in order to perform actions once."); //def->cli = "merge|m"; def->set_default_value(new ConfigOptionBool(false)); def = this->add("convert_unit", coBool); - def->label = "Convert Unit"; - def->tooltip = "Convert the units of model"; + def->label = L("Convert Unit"); + def->tooltip = L("Convert the units of model"); def->set_default_value(new ConfigOptionBool(false)); def = this->add("orient", coInt); @@ -7460,8 +7449,8 @@ CLITransformConfigDef::CLITransformConfigDef() def->set_default_value(new ConfigOptionFloat(0)); def = this->add("scale", coFloat); - def->label = "Scale"; - def->tooltip = "Scale the model by a float factor"; + def->label = L("Scale"); + def->tooltip = L("Scale the model by a float factor"); def->cli_params = "factor"; def->set_default_value(new ConfigOptionFloat(1.f)); @@ -7502,55 +7491,55 @@ CLIMiscConfigDef::CLIMiscConfigDef() def->tooltip = L("Load configuration from the specified file. It can be used more than once to load options from multiple files.");*/ def = this->add("load_settings", coStrings); - def->label = "Load General Settings"; - def->tooltip = "Load process/machine settings from the specified file"; + def->label = L("Load General Settings"); + def->tooltip = L("Load process/machine settings from the specified file"); def->cli_params = "\"setting1.json;setting2.json\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("load_filaments", coStrings); - def->label = "Load Filament Settings"; - def->tooltip = "Load filament settings from the specified file list"; + def->label = L("Load Filament Settings"); + def->tooltip = L("Load filament settings from the specified file list"); def->cli_params = "\"filament1.json;filament2.json;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("skip_objects", coInts); - def->label = "Skip Objects"; - def->tooltip = "Skip some objects in this print"; + def->label = L("Skip Objects"); + def->tooltip = L("Skip some objects in this print"); def->cli_params = "\"3,5,10,77\""; def->set_default_value(new ConfigOptionInts()); def = this->add("clone_objects", coInts); - def->label = "Clone Objects"; - def->tooltip = "Clone objects in the load list"; + def->label = L("Clone Objects"); + def->tooltip = L("Clone objects in the load list"); def->cli_params = "\"1,3,1,10\""; def->set_default_value(new ConfigOptionInts()); def = this->add("uptodate_settings", coStrings); - def->label = "load uptodate process/machine settings when using uptodate"; - def->tooltip = "load uptodate process/machine settings from the specified file when using uptodate"; + def->label = L("load uptodate process/machine settings when using uptodate"); + def->tooltip = L("load uptodate process/machine settings from the specified file when using uptodate"); def->cli_params = "\"setting1.json;setting2.json\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("uptodate_filaments", coStrings); - def->label = "load uptodate filament settings when using uptodate"; - def->tooltip = "load uptodate filament settings from the specified file when using uptodate"; + def->label = L("load uptodate filament settings when using uptodate"); + def->tooltip = L("load uptodate filament settings from the specified file when using uptodate"); def->cli_params = "\"filament1.json;filament2.json;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("downward_check", coBool); - def->label = "downward machines check"; - def->tooltip = "if enabled, check whether current machine downward compatible with the machines in the list"; + def->label = L("downward machines check"); + def->tooltip = L("if enabled, check whether current machine downward compatible with the machines in the list"); def->set_default_value(new ConfigOptionBool(false)); def = this->add("downward_settings", coStrings); - def->label = "downward machines settings"; - def->tooltip = "the machine settings list need to do downward checking"; + def->label = L("downward machines settings"); + def->tooltip = L("the machine settings list need to do downward checking"); def->cli_params = "\"machine1.json;machine2.json;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("load_assemble_list", coString); - def->label = "Load assemble list"; - def->tooltip = "Load assemble object list from config file"; + def->label = L("Load assemble list"); + def->tooltip = L("Load assemble object list from config file"); def->cli_params = "assemble_list.json"; def->set_default_value(new ConfigOptionString()); @@ -7577,21 +7566,21 @@ CLIMiscConfigDef::CLIMiscConfigDef() def = this->add("outputdir", coString); - def->label = "Output directory"; - def->tooltip = "Output directory for the exported files."; + def->label = L("Output directory"); + def->tooltip = L("Output directory for the exported files."); def->cli_params = "dir"; def->set_default_value(new ConfigOptionString()); def = this->add("debug", coInt); - def->label = "Debug level"; - def->tooltip = "Sets debug logging level. 0:fatal, 1:error, 2:warning, 3:info, 4:debug, 5:trace\n"; + def->label = L("Debug level"); + def->tooltip = L("Sets debug logging level. 0:fatal, 1:error, 2:warning, 3:info, 4:debug, 5:trace\n"); def->min = 0; def->cli_params = "level"; def->set_default_value(new ConfigOptionInt(1)); def = this->add("enable_timelapse", coBool); - def->label = "Enable timeplapse for print"; - def->tooltip = "If enabled, this slicing will be considered using timelapse"; + def->label = L("Enable timeplapse for print"); + def->tooltip = L("If enabled, this slicing will be considered using timelapse"); def->set_default_value(new ConfigOptionBool(false)); #if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI) @@ -7608,59 +7597,59 @@ CLIMiscConfigDef::CLIMiscConfigDef() def->set_default_value(new ConfigOptionString()); def = this->add("load_filament_ids", coInts); - def->label = "Load filament ids"; - def->tooltip = "Load filament ids for each object"; + def->label = L("Load filament ids"); + def->tooltip = L("Load filament ids for each object"); def->cli_params = "\"1,2,3,1\""; def->set_default_value(new ConfigOptionInts()); def = this->add("allow_multicolor_oneplate", coBool); - def->label = "Allow multiple color on one plate"; - def->tooltip = "If enabled, the arrange will allow multiple color on one plate"; + def->label = L("Allow multiple color on one plate"); + def->tooltip = L("If enabled, the arrange will allow multiple color on one plate"); def->set_default_value(new ConfigOptionBool(true)); def = this->add("allow_rotations", coBool); - def->label = "Allow rotatations when arrange"; - def->tooltip = "If enabled, the arrange will allow rotations when place object"; + def->label = L("Allow rotatations when arrange"); + def->tooltip = L("If enabled, the arrange will allow rotations when place object"); def->set_default_value(new ConfigOptionBool(true)); def = this->add("avoid_extrusion_cali_region", coBool); - def->label = "Avoid extrusion calibrate region when doing arrange"; - def->tooltip = "If enabled, the arrange will avoid extrusion calibrate region when place object"; + def->label = L("Avoid extrusion calibrate region when doing arrange"); + def->tooltip = L("If enabled, the arrange will avoid extrusion calibrate region when place object"); def->set_default_value(new ConfigOptionBool(false)); def = this->add("skip_modified_gcodes", coBool); - def->label = "Skip modified gcodes in 3mf"; - def->tooltip = "Skip the modified gcodes in 3mf from Printer or filament Presets"; + def->label = L("Skip modified gcodes in 3mf"); + def->tooltip = L("Skip the modified gcodes in 3mf from Printer or filament Presets"); def->cli_params = "option"; def->set_default_value(new ConfigOptionBool(false)); def = this->add("makerlab_name", coString); - def->label = "MakerLab name"; - def->tooltip = "MakerLab name to generate this 3mf"; + def->label = L("MakerLab name"); + def->tooltip = L("MakerLab name to generate this 3mf"); def->cli_params = "name"; def->set_default_value(new ConfigOptionString()); def = this->add("makerlab_version", coString); - def->label = "MakerLab version"; - def->tooltip = "MakerLab version to generate this 3mf"; + def->label = L("MakerLab version"); + def->tooltip = L("MakerLab version to generate this 3mf"); def->cli_params = "version"; def->set_default_value(new ConfigOptionString()); def = this->add("metadata_name", coStrings); - def->label = "metadata name list"; - def->tooltip = "matadata name list added into 3mf"; + def->label = L("metadata name list"); + def->tooltip = L("metadata name list added into 3mf"); def->cli_params = "\"name1;name2;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("metadata_value", coStrings); - def->label = "metadata value list"; - def->tooltip = "matadata value list added into 3mf"; + def->label = L("metadata value list"); + def->tooltip = L("metadata value list added into 3mf"); def->cli_params = "\"value1;value2;...\""; def->set_default_value(new ConfigOptionStrings()); def = this->add("allow_newer_file", coBool); - def->label = "Allow 3mf with newer version to be sliced"; - def->tooltip = "Allow 3mf with newer version to be sliced"; + def->label = L("Allow 3mf with newer version to be sliced"); + def->tooltip = L("Allow 3mf with newer version to be sliced"); def->cli_params = "option"; def->set_default_value(new ConfigOptionBool(false)); }