update to localization & move reprap to reprapfirmware to avoid collision with prusaslicer

supermerill/SuperSlicer#1261
supermerill/SuperSlicer#1265
This commit is contained in:
supermerill 2021-06-07 21:24:31 +02:00
parent 6008f0cef5
commit 78151c14fc
14 changed files with 2755 additions and 2635 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,16 +26,16 @@ group:Quality
end_line
setting:ensure_vertical_shell_thickness
line:Avoid crossing perimeters
setting:label$:avoid_crossing_perimeters
setting:label$_:avoid_crossing_perimeters
setting:label$Not on first layer:avoid_crossing_not_first_layer
setting:avoid_crossing_perimeters_max_detour
end_line
line:Overlapping external perimeter
setting:label$:thin_perimeters
setting:label$_:thin_perimeters
setting:label$Also for all perimeters:thin_perimeters_all
end_line
line:Thin walls
setting:thin_walls
setting:label$_:thin_walls
setting:width$5:thin_walls_min_width
setting:width$5:thin_walls_overlap
setting:thin_walls_merge
@ -52,7 +52,7 @@ group:label_width$12:Overhangs
group:Advanced
setting:width$25:no_perimeter_unsupported_algo
line:Gap Fill
setting:gap_fill
setting:label$_:gap_fill
setting:width$5:gap_fill_min_area
end_line
line:Seam
@ -61,7 +61,7 @@ group:Advanced
setting:width$3:sidetext_width$0:seam_travel_cost
end_line
line:One-loop perimeters
setting:sidetext_width$0:perimeter_loop
setting:sidetext_width$0:label$_:perimeter_loop
setting:label_width$5:label$Seam:perimeter_loop_seam
end_line
setting:perimeter_round_corners
@ -99,7 +99,7 @@ group:Modifying slices
setting:width$6:hole_size_threshold
end_line
line:Convert round vertical holes to polyholes
setting:label$:hole_to_polyhole
setting:label$_:hole_to_polyhole
setting:hole_to_polyhole_threshold
end_line
group:Other
@ -133,7 +133,7 @@ group:Reducing printing time
setting:infill_every_layers
setting:infill_only_where_needed
line:Supporting dense layer
setting:sidetext_width$0:infill_dense
setting:sidetext_width$0:label$_:infill_dense
setting:width$20:infill_dense_algo
end_line
group:sidetext_width$3:Advanced
@ -178,7 +178,7 @@ group:Brim
setting:brim_inside_holes
setting:brim_width_interior
line:Brim ears
setting:brim_ears
setting:label$_:brim_ears
setting:width$3:brim_ears_max_angle
setting:width$3:brim_ears_detection_length
setting:brim_ears_pattern

View File

@ -439,7 +439,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("brim_ears", coBool);
def->label = ("");
def->label = L("Brim ears");
def->full_label = L("Brim ears");
def->category = OptionCategory::skirtBrim;
def->tooltip = L("Only draw brim over the sharp edges of the model.");
@ -975,7 +975,7 @@ void PrintConfigDef::init_fff_params()
ConfigOptionBool external_perimeters_hole;
def = this->add("perimeter_loop", coBool);
def->label = L("");
def->label = L("Perimeters loop");
def->full_label = L("Perimeters loop");
def->category = OptionCategory::perimeter;
def->tooltip = L("Join the perimeters to create only one continuous extrusion without any z-hop."
@ -1836,8 +1836,8 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInts { 0 });
def = this->add("gap_fill", coBool);
def->label = L("");
def->full_label = L("Enable Gap Fill");
def->label = L("Gap fill");
def->full_label = L("Enable Gap fill");
def->category = OptionCategory::perimeter;
def->tooltip = L("Enable gap fill algorithm. It will extrude small lines between perimeters "
"when there is not enough space for another perimeter or an infill.");
@ -1846,7 +1846,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("gap_fill_min_area", coFloatOrPercent);
def->label = L("Min surface");
def->full_label = ("Min gap-fill surface");
def->full_label = L("Min gap-fill surface");
def->category = OptionCategory::perimeter;
def->tooltip = L("This setting represents the minimum mm² for a gapfill extrusion to be created.\nCan be a % of (perimeter width)²");
def->ratio_over = "perimeter_width_square";
@ -1894,7 +1894,7 @@ void PrintConfigDef::init_fff_params()
"Set this option to your printer's firmware to get a compatible output. "
"The \"No extrusion\" flavor prevents Slic3r from exporting any extrusion value at all.");
def->enum_keys_map = &ConfigOptionEnum<GCodeFlavor>::get_enum_values();
def->enum_values.push_back("reprap");
def->enum_values.push_back("reprapfirmware");
def->enum_values.push_back("repetier");
def->enum_values.push_back("teacup");
def->enum_values.push_back("makerware");
@ -2029,8 +2029,8 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("infill_dense", coBool);
def->label = ("");
def->full_label = ("Dense infill layer");
def->label = L("Dense infill layer");
def->full_label = L("Dense infill layer");
def->category = OptionCategory::infill;
def->tooltip = L("Enables the creation of a support layer under the first solid layer. This allows you to use a lower infill ratio without compromising the top quality."
" The dense infill is laid out with a 50% infill density.");
@ -2111,7 +2111,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("infill_dense_algo", coEnum);
def->label = L("Algorithm");
def->full_label = ("Dense infill algorithm");
def->full_label = L("Dense infill algorithm");
def->category = OptionCategory::infill;
def->tooltip = L("Choose the way the dense layer is lay out."
" The automatic option let it try to draw the smallest surface with only strait lines inside the sparse infill."
@ -2196,7 +2196,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("infill_speed", coFloat);
def->label = L("Sparse");
def->full_label = ("Sparse infill speed");
def->full_label = L("Sparse infill speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for printing the internal fill. Set to zero for auto.");
def->sidetext = L("mm/s");
@ -2508,7 +2508,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("max_fan_speed", coInts);
def->label = L("Max");
def->full_label = ("Max fan speed");
def->full_label = L("Max fan speed");
def->category = OptionCategory::cooling;
def->tooltip = L("This setting represents the maximum speed of your fan, used when the layer print time is Very short.");
def->sidetext = L("%");
@ -2519,7 +2519,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("max_layer_height", coFloats);
def->label = L("Max");
def->full_label = ("Max layer height");
def->full_label = L("Max layer height");
def->category = OptionCategory::general;
def->tooltip = L("This is the highest printable layer height for this extruder, used to cap "
"the variable layer height and support layer height. Maximum recommended layer height "
@ -2589,7 +2589,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("min_fan_speed", coInts);
def->label = L("Default fan speed");
def->full_label = ("Default fan speed");
def->full_label = L("Default fan speed");
def->category = OptionCategory::cooling;
def->tooltip = L("This setting represents the base fan speed this filament needs, or at least the minimum PWM your fan needs to work.");
def->sidetext = L("%");
@ -2608,7 +2608,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("min_layer_height", coFloats);
def->label = L("Min");
def->full_label = ("Min layer height");
def->full_label = L("Min layer height");
def->category = OptionCategory::extruders;
def->tooltip = L("This is the lowest printable layer height for this extruder and limits "
"the resolution for variable layer height. Typical values are between 0.05 mm and 0.1 mm.");
@ -2848,7 +2848,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeter_acceleration", coFloatOrPercent);
def->label = L("Perimeters");
def->full_label = ("Perimeter acceleration");
def->full_label = L("Perimeter acceleration");
def->category = OptionCategory::speed;
def->tooltip = L("This is the acceleration your printer will use for perimeters. "
"\nCan be a % of the default acceleration"
@ -2859,7 +2859,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeter_round_corners", coBool);
def->label = L("Round corners");
def->full_label = ("Round corners for perimeters");
def->full_label = L("Round corners for perimeters");
def->category = OptionCategory::perimeter;
def->tooltip = L("Internal periemters will go around sharp corners by tunring around isntead of making the same sharp corner."
" This can help when there is visible holes in sharp corners on perimeters");
@ -2877,7 +2877,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeter_extrusion_width", coFloatOrPercent);
def->label = L("Perimeters");
def->full_label = ("Perimeter width");
def->full_label = L("Perimeter width");
def->category = OptionCategory::width;
def->tooltip = L("Set this to a non-zero value to set a manual extrusion width for perimeters. "
"You may want to use thinner extrudates to get more accurate surfaces. "
@ -2894,7 +2894,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeter_extrusion_spacing", coFloatOrPercent);
def->label = L("Perimeters");
def->full_label = ("Perimeter spacing");
def->full_label = L("Perimeter spacing");
def->category = OptionCategory::width;
def->tooltip = L("Like Perimeter width but spacing is the distance between two perimeter lines (as they overlap a bit, it's not the same).") + std::string("\n") +
L("You can set either 'Spacing', or 'Width'; the other will be calculated, using the perimeter 'Overlap' percentages and default layer height.");
@ -2908,7 +2908,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeter_speed", coFloat);
def->label = L("Default");
def->full_label = ("Default speed");
def->full_label = L("Default speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for perimeters (contours, aka vertical shells). Set to zero for auto.");
def->sidetext = L("mm/s");
@ -2919,7 +2919,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("perimeters", coInt);
def->label = L("Perimeters");
def->full_label = ("Perimeters count");
def->full_label = L("Perimeters count");
def->category = OptionCategory::perimeter;
def->tooltip = L("This option sets the number of perimeters to generate for each layer. "
"Note that Slic3r may increase this number automatically when it detects "
@ -3282,7 +3282,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("small_perimeter_speed", coFloatOrPercent);
def->label = L("Speed");
def->full_label = ("Small perimeters speed");
def->full_label = L("Small perimeters speed");
def->category = OptionCategory::speed;
def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= 6.5mm "
"(usually holes). If expressed as percentage (for example: 80%) it will be calculated "
@ -3295,7 +3295,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("small_perimeter_min_length", coFloatOrPercent);
def->label = L("Min length");
def->full_label = ("Min small perimeters length");
def->full_label = L("Min small perimeters length");
def->category = OptionCategory::speed;
def->tooltip = L("This set the threshold for small periemter length. Every loop with a length lower than that will be printed at small perimeter speed"
"\nCan be a mm or a % of the nozzle diameter.");
@ -3308,7 +3308,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("small_perimeter_max_length", coFloatOrPercent);
def->label = L("Max length");
def->full_label = ("Max small perimeters length");
def->full_label = L("Max small perimeters length");
def->category = OptionCategory::speed;
def->tooltip = L("This set the end of the threshold for small periemter length."
" Every periemter loop lower than that will see their speed reduced a bit, from their normal spee at this length down to small perimeter speed."
@ -3405,7 +3405,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("solid_infill_extrusion_width", coFloatOrPercent);
def->label = L("Solid infill");
def->full_label = ("Solid infill width");
def->full_label = L("Solid infill width");
def->category = OptionCategory::width;
def->tooltip = L("Set this to a non-zero value to set a manual extrusion width for infill for solid surfaces. "
"If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
@ -3421,7 +3421,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("solid_infill_extrusion_spacing", coFloatOrPercent);
def->label = L("Solid spacing");
def->full_label = ("Solid infill spacing");
def->full_label = L("Solid infill spacing");
def->category = OptionCategory::width;
def->tooltip = L("Like Solid infill width but spacing is the distance between two lines (as they overlap a bit, it's not the same).") + std::string("\n") +
L("You can set either 'Spacing', or 'Width'; the other will be calculated, using default layer height.");
@ -3435,7 +3435,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("solid_infill_speed", coFloatOrPercent);
def->label = L("Solid");
def->full_label = ("Solid infill speed");
def->full_label = L("Solid infill speed");
def->category = OptionCategory::speed;
def->tooltip = L("Speed for printing solid regions (top/bottom/internal horizontal shells). "
"This can be expressed as a percentage (for example: 80%) over the default infill speed."
@ -3509,7 +3509,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("start_filament_gcode", coStrings);
def->label = L("Start G-code");
def->full_label = ("Filament start G-code");
def->full_label = L("Filament start G-code");
def->category = OptionCategory::customgcode;
def->tooltip = L("This start procedure is inserted at the beginning, after any printer start gcode (and "
"after any toolchange to this filament in case of multi-material printers). "
@ -3616,7 +3616,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_material_angle", coFloat);
def->label = L("Pattern angle");
def->full_label = ("Support pattern angle");
def->full_label = L("Support pattern angle");
def->category = OptionCategory::support;
def->tooltip = L("Use this setting to rotate the support material pattern on the horizontal plane.");
def->sidetext = L("°");
@ -3634,7 +3634,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_material_contact_distance_type", coEnum);
def->label = L("Type");
def->full_label = ("Support contact distance type");
def->full_label = L("Support contact distance type");
def->category = OptionCategory::support;
def->tooltip = L("How to compute the vertical z-distance.\n"
"From filament: it use the nearest bit of the filament. When a bridge is extruded, it goes below the current plane.\n"
@ -3644,15 +3644,15 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("filament");
def->enum_values.push_back("plane");
def->enum_values.push_back("none");
def->enum_labels.push_back("From filament");
def->enum_labels.push_back("From plane");
def->enum_labels.push_back("None");
def->enum_labels.push_back(L("From filament"));
def->enum_labels.push_back(L("From plane"));
def->enum_labels.push_back(L("None (soluble)"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<SupportZDistanceType>(zdPlane));
def = this->add("support_material_contact_distance_top", coFloatOrPercent);
def->label = L("Top");
def->full_label = ("Contact distance on top of supports");
def->full_label = L("Contact distance on top of supports");
def->category = OptionCategory::support;
def->tooltip = L("The vertical distance between support material interface and the object"
"(when the object is printed on top of the support). "
@ -3667,7 +3667,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_material_contact_distance_bottom", coFloatOrPercent);
def->label = L("Bottom");
def->full_label = ("Contact distance under the bottom of supports");
def->full_label = L("Contact distance under the bottom of supports");
def->category = OptionCategory::support;
def->tooltip = L("The vertical distance between object and support material interface"
"(when the support is printed on top of the object). Can be a % of the extruding width used for the interface layers.");
@ -3890,7 +3890,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(false));
def = this->add("thin_walls", coBool);
def->label = L("");
def->label = L("Thin walls");
def->full_label = L("Thin walls");
def->category = OptionCategory::perimeter;
def->tooltip = L("Detect single-width walls (parts where two extrusions don't fit and we need "
@ -4572,13 +4572,13 @@ void PrintConfigDef::init_sla_params()
def = this->add("display_pixels_x", coInt);
def->full_label = L("Number of pixels in");
def->label = ("X");
def->label = L("X");
def->tooltip = L("Number of pixels in X");
def->min = 100;
def->set_default_value(new ConfigOptionInt(2560));
def = this->add("display_pixels_y", coInt);
def->label = ("Y");
def->label = L("Y");
def->tooltip = L("Number of pixels in Y");
def->min = 100;
def->set_default_value(new ConfigOptionInt(1440));
@ -5332,8 +5332,6 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
if ("gcode_flavor" == opt_key) {
if ("reprap" == value)
value = "sprinter";
else if ("reprapfirmware" == value)
value = "reprap";
}
}
@ -5553,7 +5551,7 @@ void PrintConfigDef::to_prusa(t_config_option_key& opt_key, std::string& value,
else if ("lerdge" == value)
value = "marlin";
else if ("klipper" == value)
value = "reprap";
value = "sprinter";
} else if (opt_key.find("extrusion_width") != std::string::npos) {
if (std::set<std::string>{"extrusion_width", "first_layer_extrusion_width", "perimeter_extrusion_width", "external_perimeter_extrusion_width",
"infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width"}.count(opt_key) > 0) {

View File

@ -81,6 +81,7 @@ CopyrightsDialog::CopyrightsDialog()
void CopyrightsDialog::fill_entries()
{
m_entries = {
{ "SuperSlicer" , "2021 SuperSlicer" , "https://github.com/supermerill/SuperSlicer" },
{ "Slic3r" , "2021 Slic3r" , "https://github.com/slic3r/slic3r" },
{ "Prusaslicer" , "2021 PrusaResearch" , "https://github.com/prusa3d/PrusaSlicer" },
{ "wxWidgets" , "2019 wxWidgets" , "https://www.wxwidgets.org/" },
@ -268,7 +269,7 @@ AboutDialog::AboutDialog()
// TRN "Slic3r _is licensed under the_ License"
const std::string is_lecensed_str = _utf8(L("is licensed under the"));
const std::string license_str = _utf8(L("GNU Affero General Public License, version 3"));
const std::string based_on_str = _utf8(L(SLIC3R_INTRO));
const std::string based_on_str = _utf8(L("Slic3r contains sizable contributions from Prusa Research. Original work by Alessandro Ranellucci and the RepRap community."));
const std::string contributors_str = _utf8(L("Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Joseph Lenox, Y. Sapir, Mike Sheldrake, Vojtech Bubnik, Durand Rémi and numerous others."));
const std::string manual_str = _utf8(L("Manual by Gary Hodgson. Inspired by the RepRap community."));
const std::string icon_str = _utf8(L("Slic3r logo designed by Corey Daniels."));

View File

@ -193,7 +193,7 @@ wxString Field::get_tooltip_text(const wxString& default_string)
{
wxString tooltip_text("");
wxString tooltip = _(m_opt.tooltip);
edit_tooltip(tooltip);
update_Slic3r_string(tooltip);
std::string opt_id = m_opt_id;
auto hash_pos = opt_id.find("#");

View File

@ -261,7 +261,7 @@ private:
version = _L("Version") + " " + std::string(SLIC3R_VERSION_FULL);
// credits infornation
credits = _L(SLIC3R_INTRO) + "\n\n" +
credits = _L("Slic3r contains sizable contributions from Prusa Research. Original work by Alessandro Ranellucci and the RepRap community.") + "\n\n" +
title + " " + _L("is licensed under the") + " " + _L("GNU Affero General Public License, version 3") + "\n\n" +
_L("Contributions by Vojtech Bubnik, Enrico Turri, Durand Remi, Oleksandra Iushchenko, Tamas Meszaros, Lukas Matena, Vojtech Kral, David Kocik and numerous others.");

View File

@ -1605,15 +1605,16 @@ wxMenu* ObjectList::append_submenu_add_generic(wxMenu* menu, const ModelVolumeTy
std::vector<std::string> items = { "Box", "Cylinder", "Sphere", "Slab" };
if(type == ModelVolumeType::SEAM_POSITION) items = { "Sphere" };
// only to trigger slab tranlation (the other three should be translated by append_menu_items_add_volume)
wxString slabStr = _L("Slab");
// add items to menu
for (std::string& item : items)
{
if (type == ModelVolumeType::INVALID && item == "Slab")
continue;
append_menu_item(sub_menu, wxID_ANY, _(L(item)), "",
[this, type, item](wxCommandEvent&) { load_generic_subobject(L(item), type); }, "", menu);
append_menu_item(sub_menu, wxID_ANY, _L(item), "",
[this, type, item](wxCommandEvent&) { load_generic_subobject(item, type); }, "", menu);
}
return sub_menu;
}
@ -1642,7 +1643,7 @@ void ObjectList::append_menu_items_add_volume(wxMenu* menu)
ADD_VOLUME_MENU_ITEMS[int(ModelVolumeType::SUPPORT_ENFORCER)].second, nullptr,
[this]() { return is_instance_or_object_selected(); }, parent);
append_menu_item(menu, wxID_ANY, _(ADD_VOLUME_MENU_ITEMS[int(ModelVolumeType::SUPPORT_BLOCKER)].first), "",
[this](wxCommandEvent&) { load_generic_subobject(L("Box"), ModelVolumeType::SUPPORT_BLOCKER); },
[this](wxCommandEvent&) { load_generic_subobject(L("Cylinder"), ModelVolumeType::SUPPORT_BLOCKER); },
ADD_VOLUME_MENU_ITEMS[int(ModelVolumeType::SUPPORT_BLOCKER)].second, nullptr,
[this]() { return is_instance_or_object_selected(); }, parent);
append_menu_item(menu, wxID_ANY, _(ADD_VOLUME_MENU_ITEMS[int(ModelVolumeType::SEAM_POSITION)].first), "",
@ -2319,7 +2320,7 @@ void ObjectList::load_shape_object(const std::string& type_name)
// Create mesh
BoundingBoxf3 bb;
TriangleMesh mesh = create_mesh(type_name, bb);
load_mesh_object(mesh, _(L("Shape")) + "-" + _(type_name));
load_mesh_object(mesh, _L("Shape") + "-" + _L(type_name));
}
void ObjectList::load_mesh_object(const TriangleMesh &mesh, const wxString &name, bool center)

View File

@ -63,7 +63,7 @@ public:
if(wxGetApp().app_config->get("single_instance") == "0") {
// Only allow opening a new Slic3r instance on OSX if "single_instance" is disabled,
// as starting new instances would interfere with the locking mechanism of "single_instance" support.
append_menu_item(menu, wxID_ANY, _L("Open new instance"), _L("Open a new Slic3r instance"),
append_menu_item(menu, wxID_ANY, _L("Open new instance"), wxString::Format(_L("Open a new %s instance"), SLIC3R_APP_NAME),
[this](wxCommandEvent&) { start_new_slicer(); }, "", nullptr);
}
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open G-code viewer"),
@ -77,7 +77,7 @@ public:
GCodeViewerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
wxMenu *CreatePopupMenu() override {
wxMenu *menu = new wxMenu;
append_menu_item(menu, wxID_ANY, _L("Open Slic3r"), _L("Open a new Slic3r instance"),
append_menu_item(menu, wxID_ANY, wxString::Format(_L("Open %s"), SLIC3R_APP_NAME), wxString::Format(_L("Open a new %s instance"), SLIC3R_APP_NAME),
[this](wxCommandEvent&) { start_new_slicer(nullptr, true); }, "", nullptr);
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open new G-code viewer"),
[this](wxCommandEvent&) { start_new_gcodeviewer_open_file(); }, "", nullptr);
@ -97,10 +97,10 @@ static wxIcon main_frame_icon(GUI_App::EAppMode app_mode)
if (app_mode == GUI_App::EAppMode::GCodeViewer) {
// Only in case the slicer was started with --gcodeviewer parameter try to load the icon from gcodeviewer.exe
// Otherwise load it from the exe.
for (const std::wstring_view exe_name : { std::wstring_view(SLIC3R_APP_WCMD L".exe"), std::wstring_view(SLIC3R_APP_WCMD L"_console.exe") })
for (const std::wstring_view exe_name : { std::wstring_view(SLIC3R_APP_WCMD ".exe"), std::wstring_view(SLIC3R_APP_WCMD "_console.exe") })
if (boost::iends_with(path, exe_name)) {
path.erase(path.end() - exe_name.size(), path.end());
path += GCODEVIEWER_APP_WCMD L".exe";
path += GCODEVIEWER_APP_WCMD ".exe";
break;
}
}
@ -150,8 +150,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
if (wxGetApp().is_editor())
m_statusbar->embed(this);
m_statusbar->set_status_text(_L("Version") + " " +
SLIC3R_VERSION + " " +
_L("Remember to check for updates at") + " " + SLIC3R_DOWNLOAD);
SLIC3R_VERSION + ". " +
wxString::Format(_L("Remember to check for updates at %s"), SLIC3R_DOWNLOAD));
// initialize tabpanel and menubar
init_tabpanel();
@ -1083,9 +1083,9 @@ static const wxString sep_space = "";
static wxMenu* generate_help_menu()
{
wxMenu* helpMenu = new wxMenu();
append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " Releases"), _L("Open the " SLIC3R_APP_NAME " releases page in your browser"),
append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " Releases"), wxString::Format(_L("Open the %s releases page in your browser"), SLIC3R_APP_NAME),
[](wxCommandEvent&) { wxLaunchDefaultBrowser(SLIC3R_DOWNLOAD); });
append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " wiki"), _L("Open the " SLIC3R_APP_NAME " wiki in your browser"),
append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " wiki"), wxString::Format(_L("Open the %s wiki in your browser"), SLIC3R_APP_NAME),
[](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/" SLIC3R_GITHUB "/wiki"); });
append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " website"), _L("Open the Slic3r website in your browser"),
[](wxCommandEvent&) { wxLaunchDefaultBrowser("http://slic3r.org"); });

View File

@ -524,7 +524,7 @@ void OptionsGroup::clear(bool destroy_custom_ctrl)
Line OptionsGroup::create_single_option_line(const Option& option, const wxString& path/* = wxEmptyString*/) const {
// Line retval{ _(option.opt.label), _(option.opt.tooltip) };
wxString tooltip = _(option.opt.tooltip);
edit_tooltip(tooltip);
update_Slic3r_string(tooltip);
Line retval{ _(option.opt.label), tooltip };
retval.label_path = path;
Option tmp(option);

View File

@ -112,16 +112,16 @@ void PreferencesDialog::build()
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
#ifdef _WIN32
// Please keep in sync with ConfigWizard
def.label = L("Associate .3mf files to " SLIC3R_APP_NAME);
def.label = (boost::format(L("Associate .3mf files to %1%")) % SLIC3R_APP_NAME).str();
def.type = coBool;
def.tooltip = L("If enabled, sets " SLIC3R_APP_NAME " as default application to open .3mf files.");
def.tooltip = L("If enabled, sets Slic3r as default application to open .3mf files.");
def.set_default_value(new ConfigOptionBool(app_config->get("associate_3mf") == "1"));
option = Option(def, "associate_3mf");
m_optgroup_general->append_single_option_line(option);
def.label = L("Associate .stl files to " SLIC3R_APP_NAME);
def.label = (boost::format(L("Associate .stl files to %1%")) % SLIC3R_APP_NAME).str();
def.type = coBool;
def.tooltip = L("If enabled, sets " SLIC3R_APP_NAME " as default application to open .stl files.");
def.tooltip = L("If enabled, sets Slic3r as default application to open .stl files.");
def.set_default_value(new ConfigOptionBool(app_config->get("associate_stl") == "1"));
option = Option(def, "associate_stl");
m_optgroup_general->append_single_option_line(option);
@ -168,11 +168,11 @@ void PreferencesDialog::build()
#if __APPLE__
def.label = L("Allow just a single Slic3r instance");
def.label = (L("Allow just a single Slic3r instance")) % SLIC3R_APP_NAME).str();
def.type = coBool;
def.tooltip = L("On OSX there is always only one instance of app running by default. However it is allowed to run multiple instances of same app from the command line. In such case this settings will allow only one instance.");
#else
def.label = L("Allow just a single Slic3r instance");
def.label = (boost::format(L("Allow just a single Slic3r instance")) % SLIC3R_APP_NAME).str();
def.type = coBool;
def.tooltip = L("If this is enabled, when starting Slic3r and another instance of the same Slic3r is already running, that instance will be reactivated instead.");
#endif
@ -211,7 +211,7 @@ void PreferencesDialog::build()
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
#ifdef _WIN32
else {
def.label = L("Associate .gcode files to Slic3r G-code Viewer");
def.label = (boost::format(L("Associate .gcode files to Slic3r G-code Viewer")) % SLIC3R_APP_NAME).str();
def.type = coBool;
def.tooltip = L("If enabled, sets Slic3r G-code Viewer as default application to open .gcode files.");
def.set_default_value(new ConfigOptionBool(app_config->get("associate_gcode") == "1"));

View File

@ -1571,7 +1571,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
}
}
current_group = current_page->new_optgroup(_(L(params.back())), nolabel?0:-1);
current_group = current_page->new_optgroup(_L(params.back()), nolabel?0:-1);
for (int i = 1; i < params.size() - 1; i++) {
if (boost::starts_with(params[i], "title_width$")) {
current_group->title_width = atoi(params[i].substr(12, params[i].size() - 12).c_str());
@ -1606,10 +1606,10 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
for (auto cur_diam : nozzle_diameters) {
// if value is differs from first nozzle diameter value
if (fabs(cur_diam - frst_diam) > EPSILON) {
const wxString msg_text = _(L("Single Extruder Multi Material is selected, \n"
const wxString msg_text = _L("Single Extruder Multi Material is selected, \n"
"and all extruders must have the same diameter.\n"
"Do you want to change the diameter for all extruders to first extruder nozzle diameter value?"));
wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
"Do you want to change the diameter for all extruders to first extruder nozzle diameter value?");
wxMessageDialog dialog(parent(), msg_text, _L("Nozzle diameter"), wxICON_WARNING | wxYES_NO);
DynamicPrintConfig new_conf = *m_config;
if (dialog.ShowModal() == wxID_YES) {
@ -1789,13 +1789,18 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
option.opt.mode = ConfigOptionMode::comExpert;
}
else if (params[i] == "full_label")
{
option.opt.full_label = L(params[i].substr(11, params[i].size() - 11));
need_to_notified_search = true;
}
else if (params[i] == "full_label")
{
option.opt.label = option.opt.full_label;
need_to_notified_search = true;
}
else if (params[i].find("label$") != std::string::npos)
{
option.opt.label = params[i].substr(6, params[i].size() - 6);
option.opt.label = L(params[i].substr(6, params[i].size() - 6));
need_to_notified_search = true;
}
else if (boost::starts_with(params[i], "label_width$")) {
@ -1803,7 +1808,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
}
else if (params[i].find("sidetext$") != std::string::npos)
{
option.opt.sidetext = params[i].substr(9, params[i].size() - 9);
option.opt.sidetext = L(params[i].substr(9, params[i].size() - 9));
}
else if (params[i].find("sidetext_width$") != std::string::npos)
{
@ -1824,6 +1829,11 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
else if (boost::starts_with(params[i], "url$")) { // only on line
label_path = params[i].substr(4, params[i].size() - 4);
}
else if (params[i].find("tooltip$") != std::string::npos)
{
option.opt.tooltip = L(params[i].substr(8, params[i].size() - 8));
need_to_notified_search = true;
}
}
if (need_to_notified_search)
@ -2028,9 +2038,9 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
// if value was changed
if (fabs(nozzle_diameters[idx_page == 0 ? 1 : 0] - new_nd) > EPSILON)
{
const wxString msg_text = _(L("This is a single extruder multimaterial printer, diameters of all extruders "
"will be set to the new value. Do you want to proceed?"));
wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
const wxString msg_text = _L("This is a single extruder multimaterial printer, diameters of all extruders "
"will be set to the new value. Do you want to proceed?");
wxMessageDialog dialog(parent(), msg_text, _L("Nozzle diameter"), wxICON_WARNING | wxYES_NO);
DynamicPrintConfig new_conf = *m_config;
if (dialog.ShowModal() == wxID_YES) {

View File

@ -382,7 +382,7 @@ void wxDataViewTreeCtrlComboPopup::OnDataViewTreeCtrlSelection(wxCommandEvent& e
// edit tooltip : change Slic3r to SLIC3R_APP_KEY
// Temporary workaround for localization
void edit_tooltip(wxString& tooltip)
void update_Slic3r_string(wxString& tooltip)
{
tooltip.Replace("Slic3r", SLIC3R_APP_NAME, true);
}

View File

@ -47,7 +47,7 @@ uint32_t color_from_hex(std::string hex);
class wxDialog;
void edit_tooltip(wxString& tooltip);
void update_Slic3r_string(wxString& tooltip);
void msw_buttons_rescale(wxDialog* dlg, const int em_unit, const std::vector<int>& btn_ids);
int em_unit(wxWindow* win);
int mode_icon_px_size();

View File

@ -25,6 +25,3 @@ set(SLIC3R_BASED_ON "")
set(SLIC3R_GITHUB "slic3r/Slic3r")
# download url
set(SLIC3R_DOWNLOAD "https://slic3r.org/download")
# string to display in the spalshscreen
set(SLIC3R_INTRO "Slic3r contains sizable contributions from Prusa Research. Original work by Alessandro Ranellucci and the RepRap community.")