Localization: Fixes for some phrases

+ Added/Fixed comments where it's needed
This commit is contained in:
YuSanka 2023-03-20 10:40:42 +01:00 committed by Lukas Matena
parent f9de995f9e
commit 18e56c3d53
32 changed files with 149 additions and 124 deletions

View File

@ -29,6 +29,7 @@ namespace I18N {
#endif
namespace {
const char* L(const char* s) { return s; }
const char* L_CONTEXT(const char* s, const char* context) { return s; }
std::string _u8L(const char* s) { return Slic3r::I18N::translate(s); }
}
#endif

View File

@ -399,6 +399,7 @@ void PrintConfigDef::init_fff_params()
const int max_temp = 1500;
def = this->add("avoid_crossing_curled_overhangs", coBool);
def->label = L("Avoid crossing curled overhangs (Experimental)");
// TRN PrintSettings: "Avoid crossing curled overhangs (Experimental)"
def->tooltip = L("Plan travel moves such that the extruder avoids areas where the filament may be curled up. "
"This is mostly happening on steeper rounded overhangs and may cause a crash with the nozzle. "
"This feature slows down both the print and the G-code generation.");
@ -456,8 +457,8 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionString(""));
def = this->add("bottom_solid_layers", coInt);
//TRN To be shown in Print Settings "Bottom solid layers"
def->label = L("Bottom");
//TRN Print Settings: "Bottom solid layers"
def->label = L_CONTEXT("Bottom", "Layers");
def->category = L("Layers and Perimeters");
def->tooltip = L("Number of solid layers to generate on bottom surfaces.");
def->full_label = L("Bottom solid layers");
@ -465,8 +466,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInt(3));
def = this->add("bottom_solid_min_thickness", coFloat);
//TRN To be shown in Print Settings "Top solid layers"
def->label = L("Bottom");
def->label = L_CONTEXT("Bottom", "Layers");
def->category = L("Layers and Perimeters");
def->tooltip = L("The number of bottom solid layers is increased above bottom_solid_layers if necessary to satisfy "
"minimum thickness of bottom shell.");
@ -533,6 +533,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionBool(false));
// TRN PrintSettings : "Dynamic overhang speed"
auto overhang_speed_setting_description = L("Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: "
"100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). "
"Speeds for overhang sizes in between are calculated via linear interpolation. "
@ -580,10 +581,11 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionBools{false});
// TRN FilamentSettings : "Dynamic fan speeds"
auto fan_speed_setting_description = L(
"Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: "
"100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). "
"Fan speeds for overhang sizes in between are calculated via linear interpolation. ");
"Fan speeds for overhang sizes in between are calculated via linear interpolation.");
def = this->add("overhang_fan_speed_0", coInts);
def->label = L("speed for 0% overlap (bridge)");
@ -1961,7 +1963,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("ooze_prevention", coBool);
def->label = L("Enable");
def->tooltip = L("This option will drop the temperature of the inactive extruders to prevent oozing. ");
// TRN PrintSettings: Enable ooze prevention
def->tooltip = L("This option will drop the temperature of the inactive extruders to prevent oozing.");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBool(false));
@ -2299,6 +2302,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("staggered_inner_seams", coBool);
def->label = L("Staggered inner seams");
// TRN PrintSettings: "Staggered inner seams"
def->tooltip = L("This option causes the inner seams to be shifted backwards based on their depth, forming a zigzag pattern.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
@ -2464,6 +2468,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("standby_temperature_delta", coInt);
def->label = L("Temperature variation");
// TRN PrintSettings : "Ooze prevention" > "Temperature variation"
def->tooltip = L("Temperature difference to be applied when an extruder is not active. "
"The value is not used when 'idle_temperature' in filament settings "
"is defined.");
@ -2641,8 +2646,8 @@ void PrintConfigDef::init_fff_params()
"If set to zero, support_material_contact_distance will be used for both top and bottom contact Z distances.");
def->sidetext = L("mm");
// def->min = 0;
//TRN To be shown in Print Settings "Bottom contact Z distance". Have to be as short as possible
def->set_enum_values(ConfigOptionDef::GUIType::f_enum_open, {
//TRN Print Settings: "Bottom contact Z distance". Have to be as short as possible
{ "0", L("Same as top") },
{ "0.1", "0.1" },
{ "0.2", "0.2" }
@ -2722,8 +2727,8 @@ void PrintConfigDef::init_fff_params()
"Set to -1 to use support_material_interface_layers");
def->sidetext = L("layers");
def->min = -1;
//TRN To be shown in Print Settings "Bottom interface layers". Have to be as short as possible
def->set_enum_values(ConfigOptionDef::GUIType::i_enum_open, {
//TRN Print Settings: "Bottom interface layers". Have to be as short as possible
{ "-1", L("Same as top") },
{ "0", L("0 (off)") },
{ "1", L("1 (light)") },
@ -2824,6 +2829,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_material_synchronize_layers", coBool);
def->label = L("Synchronize with object layers");
def->category = L("Support material");
// TRN PrintSettings : "Synchronize with object layers"
def->tooltip = L("Synchronize support layers with the object print layers. This is useful "
"with multi-material printers, where the extruder switch is expensive. "
"This option is only available when top contact Z distance is set to zero.");
@ -2855,6 +2861,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_tree_angle", coFloat);
def->label = L("Maximum Branch Angle");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Maximum Branch Angle"
def->tooltip = L("The maximum angle of the branches, when the branches have to avoid the model. "
"Use a lower angle to make them more vertical and more stable. Use a higher angle to be able to have more reach.");
def->sidetext = L("°");
@ -2866,6 +2873,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_tree_angle_slow", coFloat);
def->label = L("Preferred Branch Angle");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Preferred Branch Angle"
def->tooltip = L("The preferred angle of the branches, when they do not have to avoid the model. "
"Use a lower angle to make them more vertical and more stable. Use a higher angle for branches to merge faster.");
def->sidetext = L("°");
@ -2877,6 +2885,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_tree_tip_diameter", coFloat);
def->label = L("Tip Diameter");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Tip Diameter"
def->tooltip = L("The diameter of the top of the tip of the branches of organic support.");
def->sidetext = L("mm");
def->min = 0;
@ -2886,6 +2895,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_tree_branch_diameter", coFloat);
def->label = L("Branch Diameter");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Branch Diameter"
def->tooltip = L("The diameter of the thinnest branches of organic support. Thicker branches are more sturdy. "
"Branches towards the base will be thicker than this.");
def->sidetext = L("mm");
@ -2894,8 +2904,10 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(2));
def = this->add("support_tree_branch_diameter_angle", coFloat);
// TRN PrintSettings: #lmFIXME
def->label = L("Branch Diameter Angle");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Branch Diameter Angle"
def->tooltip = L("The angle of the branches' diameter as they gradually become thicker towards the bottom. "
"An angle of 0 will cause the branches to have uniform thickness over their length. "
"A bit of an angle can increase stability of the organic support.");
@ -2909,8 +2921,10 @@ void PrintConfigDef::init_fff_params()
// How far apart the branches need to be when they touch the model. Making this distance small will cause
// the tree support to touch the model at more points, causing better overhang but making support harder to remove.
def = this->add("support_tree_branch_distance", coFloat);
// TRN PrintSettings: #lmFIXME
def->label = L("Branch Distance");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Branch Distance"
def->tooltip = L("How far apart the branches need to be when they touch the model. "
"Making this distance small will cause the tree support to touch the model at more points, "
"causing better overhang but making support harder to remove.");
@ -2920,6 +2934,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("support_tree_top_rate", coPercent);
def->label = L("Branch Density");
def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Branch Density"
def->tooltip = L("Adjusts the density of the support structure used to generate the tips of the branches. "
"A higher value results in better overhangs but the supports are harder to remove, "
"thus it is recommended to enable top support interfaces instead of a high branch density value "
@ -3008,8 +3023,8 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloatOrPercent(15, false));
def = this->add("top_solid_layers", coInt);
//TRN To be shown in Print Settings "Top solid layers"
def->label = L("Top");
//TRN Print Settings: "Top solid layers"
def->label = L_CONTEXT("Top", "Layers");
def->category = L("Layers and Perimeters");
def->tooltip = L("Number of solid layers to generate on top surfaces.");
def->full_label = L("Top solid layers");
@ -3017,8 +3032,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInt(3));
def = this->add("top_solid_min_thickness", coFloat);
//TRN To be shown in Print Settings "Top solid layers"
def->label = L("Top");
def->label = L_CONTEXT("Top", "Layers");
def->category = L("Layers and Perimeters");
def->tooltip = L("The number of top solid layers is increased above top_solid_layers if necessary to satisfy "
"minimum thickness of top shell."
@ -3874,7 +3888,9 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Support tree building strategy");
def->set_enum<sla::SupportTreeType>(
ConfigOptionEnum<sla::SupportTreeType>::get_enum_names(),
{ L("Default"), L("Branching (experimental)") });
{ L("Default"),
// TRN One of the "Support tree type"s on SLAPrintSettings : Supports
L("Branching (experimental)") });
// TODO: def->enum_def->labels[2] = L("Organic");
def->mode = comSimple;
def->set_default_value(new ConfigOptionEnum(sla::SupportTreeType::Default));

View File

@ -399,7 +399,8 @@ void PrintObject::infill()
this->prepare_infill();
if (this->set_started(posInfill)) {
m_print->set_status(45, _u8L("making infill"));
// TRN Status for the Print calculation
m_print->set_status(45, _u8L("Making infill"));
const auto& adaptive_fill_octree = this->m_adaptive_fill_octrees.first;
const auto& support_fill_octree = this->m_adaptive_fill_octrees.second;

View File

@ -51,6 +51,7 @@ const std::array<unsigned, slaposCount> OBJ_STEP_LEVELS = {
std::string OBJ_STEP_LABELS(size_t idx)
{
switch (idx) {
// TRN Status of the SLA print calculation
case slaposAssembly: return _u8L("Assembling model from parts");
case slaposHollowing: return _u8L("Hollowing model");
case slaposDrillHoles: return _u8L("Drilling holes into model.");

View File

@ -141,7 +141,6 @@ wxString CopyrightsDialog::get_html_text()
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
const wxString copyright_str = _L("Copyright") + "&copy; ";
// TRN "Slic3r _is licensed under the_ License"
const wxString header_str = _L("License agreements of all following programs (libraries) are part of application license agreement");
wxString text = wxString::Format(
@ -268,7 +267,7 @@ AboutDialog::AboutDialog()
m_html->SetFonts(font.GetFaceName(), font.GetFaceName(), size);
m_html->SetBorders(2);
const wxString copyright_str = _L("Copyright");
// TRN "Slic3r _is licensed under the_ License"
// TRN AboutDialog: "Slic3r %1% GNU Affero General Public License"
const wxString is_lecensed_str = _L("is licensed under the");
const wxString license_str = _L("GNU Affero General Public License, version 3");
const wxString based_on_str = _L("PrusaSlicer is based on Slic3r by Alessandro Ranellucci and the RepRap community.");

View File

@ -160,7 +160,7 @@ void FillSizerWithModeColorDescriptions(
wxFlexGridSizer* grid_sizer = new wxFlexGridSizer(9, 5, 5);
sizer->Add(grid_sizer, 0, wxEXPAND);
const std::vector<wxString> names = { _L("Simple"), _CTX(L_CONTEXT("Advanced", "Mode"), "Mode"), _L("Expert") };
const std::vector<wxString> names = { _L("Simple"), _CTX("Advanced", "Mode"), _L("Expert") };
for (size_t mode = 0; mode < names.size(); ++mode) {
wxColour& color = mode_palette[mode];

View File

@ -787,11 +787,14 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector<std::s
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
wxString text;
if (materials->technology == T_FFF && template_shown) {
// TRN ConfigWizard: Materials : "%1%" = "Filaments"/"SLA materials"
text = format_wxstr(_L("%1% visible for <b>(\"Template\")</b> printer are universal profiles available for all printers. These might not be compatible with your printer."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials"));
} else {
// TRN ConfigWizard: Materials : "%1%" = "Filaments"/"SLA materials"
wxString first_line = format_wxstr(_L("%1% marked with <b>*</b> are <b>not</b> compatible with some installed printers."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials"));
if (all_printers) {
// TRN ConfigWizard: Materials : "%1%" = "filament"/"SLA material"
wxString second_line = format_wxstr(_L("All installed printers are compatible with the selected %1%."), materials->technology == T_FFF ? _L("filament") : _L("SLA material"));
text = wxString::Format(
"<html>"
@ -1369,7 +1372,7 @@ Worker::Worker(wxWindow* parent)
button_path->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) {
boost::filesystem::path chosen_dest(boost::nowide::narrow(m_input_path->GetValue()));
wxDirDialog dialog(m_parent, L("Choose folder:"), chosen_dest.string() );
wxDirDialog dialog(m_parent, _L("Choose folder") + ":", chosen_dest.string() );
if (dialog.ShowModal() == wxID_OK)
this->m_input_path->SetValue(dialog.GetPath());
});
@ -1421,11 +1424,12 @@ PageDownloader::PageDownloader(ConfigWizard* parent)
box_allow_downloads->SetValue(box_allow_value);
append(box_allow_downloads);
append_text(wxString::Format(_L(
"If enabled, %s registers to start on custom URL on www.printables.com."
" You will be able to use button with %s logo to open models in this %s."
// TRN ConfigWizard : Downloader : %1% = "PrusaSlicer"
append_text(format_wxstr(_L(
"If enabled, %1% registers to start on custom URL on www.printables.com."
" You will be able to use button with %1% logo to open models in this %1%."
" The model will be downloaded into folder you choose bellow."
), SLIC3R_APP_NAME, SLIC3R_APP_NAME, SLIC3R_APP_NAME));
), SLIC3R_APP_NAME));
#ifdef __linux__
append_text(wxString::Format(_L(
@ -1456,7 +1460,7 @@ bool DownloaderUtils::Worker::perform_register(const std::string& path_override/
chosen_dest = aux_dest;
ec.clear();
if (chosen_dest.empty() || !boost::filesystem::is_directory(chosen_dest, ec) || ec) {
std::string err_msg = GUI::format("%1%\n\n%2%",_L("Chosen directory for downloads does not Exists.") ,chosen_dest.string());
std::string err_msg = GUI::format("%1%\n\n%2%",_L("Chosen directory for downloads does not exist.") ,chosen_dest.string());
BOOST_LOG_TRIVIAL(error) << err_msg;
show_error(m_parent, err_msg);
return false;
@ -1753,6 +1757,7 @@ void PageBedShape::apply_custom_config(DynamicPrintConfig &config)
}
PageBuildVolume::PageBuildVolume(ConfigWizard* parent)
// TRN ConfigWizard : Size of possible print, related on printer size
: ConfigWizardPage(parent, _L("Build Volume"), _L("Build Volume"), 1)
, build_volume(new DiamTextCtrl(this))
{
@ -1793,7 +1798,7 @@ PageBuildVolume::PageBuildVolume(ConfigWizard* parent)
}, build_volume->GetId());
auto* sizer_volume = new wxFlexGridSizer(3, 5, 5);
auto* text_volume = new wxStaticText(this, wxID_ANY, _L("Max print height:"));
auto* text_volume = new wxStaticText(this, wxID_ANY, _L("Max print height") + ":");
auto* unit_volume = new wxStaticText(this, wxID_ANY, _L("mm"));
sizer_volume->AddGrowableCol(0, 1);
sizer_volume->Add(text_volume, 0, wxALIGN_CENTRE_VERTICAL);
@ -1829,7 +1834,7 @@ PageDiameters::PageDiameters(ConfigWizard *parent)
append_text(_L("Enter the diameter of your printer's hot end nozzle."));
auto *sizer_nozzle = new wxFlexGridSizer(3, 5, 5);
auto *text_nozzle = new wxStaticText(this, wxID_ANY, _L("Nozzle Diameter:"));
auto *text_nozzle = new wxStaticText(this, wxID_ANY, _L("Nozzle Diameter") + ":");
auto *unit_nozzle = new wxStaticText(this, wxID_ANY, _L("mm"));
sizer_nozzle->AddGrowableCol(0, 1);
sizer_nozzle->Add(text_nozzle, 0, wxALIGN_CENTRE_VERTICAL);
@ -1843,7 +1848,7 @@ PageDiameters::PageDiameters(ConfigWizard *parent)
append_text(_L("Good precision is required, so use a caliper and do multiple measurements along the filament, then compute the average."));
auto *sizer_filam = new wxFlexGridSizer(3, 5, 5);
auto *text_filam = new wxStaticText(this, wxID_ANY, _L("Filament Diameter:"));
auto *text_filam = new wxStaticText(this, wxID_ANY, _L("Filament Diameter") + ":");
auto *unit_filam = new wxStaticText(this, wxID_ANY, _L("mm"));
sizer_filam->AddGrowableCol(0, 1);
sizer_filam->Add(text_filam, 0, wxALIGN_CENTRE_VERTICAL);
@ -1935,7 +1940,7 @@ PageTemperatures::PageTemperatures(ConfigWizard *parent)
append_text(_L("A rule of thumb is 60 °C for PLA and 110 °C for ABS. Leave zero if you have no heated bed."));
auto *sizer_bed = new wxFlexGridSizer(3, 5, 5);
auto *text_bed = new wxStaticText(this, wxID_ANY, _L("Bed Temperature:"));
auto *text_bed = new wxStaticText(this, wxID_ANY, _L("Bed Temperature") + ":");
auto *unit_bed = new wxStaticText(this, wxID_ANY, _L("°C"));
sizer_bed->AddGrowableCol(0, 1);
sizer_bed->Add(text_bed, 0, wxALIGN_CENTRE_VERTICAL);

View File

@ -178,7 +178,7 @@ void Downloader::on_error(wxCommandEvent& event)
BOOST_LOG_TRIVIAL(error) << "Download error: " << event.GetString();
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
ntf_mngr->set_download_URL_error(id, boost::nowide::narrow(event.GetString()));
show_error(nullptr, format_wxstr(L"%1%\n%2%", _L("The download has failed:"), event.GetString()));
show_error(nullptr, format_wxstr(L"%1%\n%2%", _L("The download has failed") + ":", event.GetString()));
}
void Downloader::on_complete(wxCommandEvent& event)
{

View File

@ -190,6 +190,7 @@ void FileGet::priv::get_perform()
//assert(file != NULL);
if (file == NULL) {
wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_ERROR);
// TRN %1% = file path
evt->SetString(GUI::format_wxstr(_L("Can't create file at %1%."), temp_path_wstring));
evt->SetInt(m_id);
m_evt_handler->QueueEvent(evt);

View File

@ -1988,7 +1988,7 @@ void GUI_App::import_model(wxWindow *parent, wxArrayString& input_files) const
void GUI_App::import_zip(wxWindow* parent, wxString& input_file) const
{
wxFileDialog dialog(parent ? parent : GetTopWindow(),
_L("Choose ZIP file:"),
_L("Choose ZIP file") + ":",
from_u8(app_config->get_last_dir()), "",
file_wildcards(FT_ZIP), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
@ -2416,7 +2416,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
mode_menu = new wxMenu();
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _L("Simple"), _L("Simple View Mode"));
// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _L("Advanced"), _L("Advanced View Mode"));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _CTX(L_CONTEXT("Advanced", "Mode"), "Mode"), _L("Advanced View Mode"));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _CTX("Advanced", "Mode"), _L("Advanced View Mode"));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeExpert, _L("Expert"), _L("Expert View Mode"));
Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple);
Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced);

View File

@ -420,7 +420,7 @@ MeshErrorsInfo ObjectList::get_mesh_errors_info(const int obj_idx, const int vol
const ModelObject* object = (*m_objects)[obj_idx];
if (vol_idx != -1 && vol_idx >= int(object->volumes.size())) {
if (sidebar_info)
*sidebar_info = _L("Wrong volume index ");
*sidebar_info = _L("Wrong volume index") + " ";
return { {}, {} }; // hide tooltip
}
@ -2063,9 +2063,8 @@ bool ObjectList::del_from_cut_object(bool is_cut_connector, bool is_model_part/*
InfoDialog dialog(wxGetApp().plater(), title,
_L("This action will break a cut information.\n"
"After that PrusaSlicer can't guarantee model consistency.\n"
"\n"
"To manipulate with solid parts or negative volumes you have to invalidate cut infornation first." + msg_end ),
"After that PrusaSlicer can't guarantee model consistency.") + "\n\n" +
_L("To manipulate with solid parts or negative volumes you have to invalidate cut infornation first." + msg_end ),
false, buttons_style | wxCANCEL_DEFAULT | wxICON_WARNING);
dialog.SetButtonLabel(wxID_YES, _L("Invalidate cut info"));

View File

@ -272,11 +272,10 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
// We will add a button to toggle mirroring to each axis:
auto btn = new ScalableButton(parent, wxID_ANY, "mirroring_off", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER | wxTRANSPARENT_WINDOW);
#if ENABLE_WORLD_COORDINATE
btn->SetToolTip(_L("Mirror along") + wxString::Format(_L(" %c "), (int)label) + _L("axis"));
btn->SetToolTip(format_wxstr(_L("Mirror along %1% axis"), label));
m_mirror_buttons[axis_idx] = btn;
#else
btn->SetToolTip(wxString::Format(_L("Toggle %c axis mirroring"), (int)label));
btn->SetToolTip(format_wxstr(_L("Toggle %1% axis mirroring"), label));
btn->SetBitmapDisabled_(m_mirror_bitmap_hidden);
m_mirror_buttons[axis_idx].first = btn;

View File

@ -182,9 +182,9 @@ GLGizmoCut3D::GLGizmoCut3D(GLCanvas3D& parent, const std::string& icon_filename,
, m_connector_style (size_t(CutConnectorStyle::Prism))
, m_connector_shape_id (size_t(CutConnectorShape::Circle))
{
m_modes = { _u8L("Planar")//, _u8L("Grid")
// m_modes = { _u8L("Planar"), _u8L("Grid")
// , _u8L("Radial"), _u8L("Modular")
};
// };
m_connector_modes = { _u8L("Auto"), _u8L("Manual") };
@ -231,7 +231,7 @@ std::string GLGizmoCut3D::get_tooltip() const
std::string tooltip;
if (m_hover_id == Z || (m_dragging && m_hover_id == CutPlane)) {
double koef = m_imperial_units ? ObjectManipulation::mm_to_in : 1.0;
std::string unit_str = " " + (m_imperial_units ? _u8L("inch") : _u8L("mm"));
std::string unit_str = " " + (m_imperial_units ? _u8L("in") : _u8L("mm"));
const BoundingBoxf3& tbb = m_transformed_bounding_box;
const std::string name = m_keep_as_parts ? _u8L("Part") : _u8L("Object");
@ -1671,7 +1671,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
render_build_size();
ImGui::AlignTextToFramePadding();
ImGuiWrapper::text(_L("Cut position: "));
ImGuiWrapper::text(_L("Cut position") + ": ");
ImGui::SameLine();
render_move_center_input(Z);
ImGui::SameLine();
@ -1778,9 +1778,11 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
ImGuiWrapper::text(_L("Cut to") + ":");
add_horizontal_scaled_interval(1.2f);
// TRN CutGizmo: RadioButton Cut to ...
if (m_imgui->radio_button(_L("Objects"), !m_keep_as_parts))
m_keep_as_parts = false;
ImGui::SameLine();
// TRN CutGizmo: RadioButton Cut to ...
if (m_imgui->radio_button(_L("Parts"), m_keep_as_parts))
m_keep_as_parts = true;

View File

@ -151,7 +151,7 @@ class GLGizmoCut3D : public GLGizmoBase
, Manual
};
std::vector<std::string> m_modes;
// std::vector<std::string> m_modes;
size_t m_mode{ size_t(CutMode::cutPlanar) };
std::vector<std::string> m_connector_modes;

View File

@ -1329,6 +1329,7 @@ void GLGizmoEmboss::draw_text_input()
warning_tool_tip += "\n";
warning_tool_tip += t;
};
if (priv::is_text_empty(m_text))
append_warning(_u8L("Embossed text can NOT contain only white spaces."));
if (m_text_contain_unknown_glyph)
@ -1650,9 +1651,9 @@ void GLGizmoEmboss::draw_font_preview(FaceName& face, bool is_visible)
// Not finished preview
if (is_visible) {
// when not canceled still loading
state_text = (face.cancel->load())?
_u8L(" No symbol"):
_u8L(" ... Loading");
state_text = std::string(" ") + (face.cancel->load() ?
_u8L("No symbol") :
(dots.ToStdString() + _u8L("Loading")));
} else {
// not finished and not visible cancel job
face.is_created = nullptr;
@ -1702,7 +1703,7 @@ void GLGizmoEmboss::draw_font_preview(FaceName& face, bool is_visible)
queue_job(worker, std::move(job));
} else {
// cant start new thread at this moment so wait in queue
state_text = _u8L(" ... In queue");
state_text = " " + dots.ToStdString() + " " + _u8L("Queue");
}
if (!state_text.empty()) {
@ -1936,7 +1937,7 @@ void GLGizmoEmboss::draw_font_list()
process();
}
} else if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", _u8L("add file with font(.ttf, .ttc)").c_str());
ImGui::SetTooltip("Add file with font(.ttf, .ttc)");
#endif // ALLOW_ADD_FONT_BY_FILE
#ifdef ALLOW_ADD_FONT_BY_OS_SELECTOR
@ -1946,7 +1947,7 @@ void GLGizmoEmboss::draw_font_list()
process();
}
} else if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", _u8L("Open dialog for choose from fonts.").c_str());
ImGui::SetTooltip("Open dialog for choose from fonts.");
#endif // ALLOW_ADD_FONT_BY_OS_SELECTOR
}
@ -2031,7 +2032,7 @@ void GLGizmoEmboss::draw_model_type()
void GLGizmoEmboss::draw_style_rename_popup() {
std::string& new_name = m_style_manager.get_style().name;
const std::string &old_name = m_style_manager.get_stored_style()->name;
std::string text_in_popup = GUI::format(_L("Rename style(%1%) for embossing text: "), old_name);
std::string text_in_popup = GUI::format(_L("Rename style(%1%) for embossing text"), old_name) + ": ";
ImGui::Text("%s", text_in_popup.c_str());
bool is_unique = true;
@ -2054,9 +2055,9 @@ void GLGizmoEmboss::draw_style_rename_popup() {
bool store = false;
ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue;
if (ImGui::InputText("##rename style", &new_name, flags) && allow_change) store = true;
if (m_imgui->button(_L("ok"), ImVec2(0.f, 0.f), allow_change)) store = true;
if (m_imgui->button(_L("OK"), ImVec2(0.f, 0.f), allow_change)) store = true;
ImGui::SameLine();
if (ImGui::Button(_u8L("cancel").c_str())) {
if (ImGui::Button(_u8L("Cancel").c_str())) {
new_name = old_name;
ImGui::CloseCurrentPopup();
}
@ -2117,7 +2118,7 @@ void GLGizmoEmboss::draw_style_save_button(bool is_modified)
}
void GLGizmoEmboss::draw_style_save_as_popup() {
ImGui::Text("%s", _u8L("New name of style: ").c_str());
ImGui::Text("%s", (_u8L("New name of style") +": ").c_str());
// use name inside of volume configuration as temporary new name
std::string &new_name = m_volume->text_configuration->style.name;
@ -2141,11 +2142,11 @@ void GLGizmoEmboss::draw_style_save_as_popup() {
if (ImGui::InputText("##save as style", &new_name, flags))
save_style = true;
if (m_imgui->button(_L("ok"), ImVec2(0.f, 0.f), allow_change))
if (m_imgui->button(_L("OK"), ImVec2(0.f, 0.f), allow_change))
save_style = true;
ImGui::SameLine();
if (ImGui::Button(_u8L("cancel").c_str())){
if (ImGui::Button(_u8L("Cancel").c_str())){
// write original name to volume TextConfiguration
new_name = m_style_manager.get_style().name;
ImGui::CloseCurrentPopup();
@ -2388,7 +2389,7 @@ void GLGizmoEmboss::draw_style_list() {
process();
} else {
wxString title = _L("Not valid style.");
wxString message = GUI::format_wxstr(_L("Style '%1%' can't be used and will be removed from list."), style.name);
wxString message = GUI::format_wxstr(_L("Style '%1%' can't be used and will be removed from a list."), style.name);
MessageDialog not_loaded_style_message(nullptr, message, title, wxOK);
not_loaded_style_message.ShowModal();
m_style_manager.erase(*selected_style_index);
@ -2840,7 +2841,7 @@ void GLGizmoEmboss::draw_advanced()
process();
}
m_imgui->disabled_end(); // !can_use_surface
// TRN EmbossGizmo: font units
std::string units = _u8L("font points");
std::string units_fmt = "%.0f " + units;
@ -3111,9 +3112,9 @@ bool GLGizmoEmboss::choose_font_by_wxdialog()
(!use_deserialized_font && !m_style_manager.load_style(emboss_style, wx_font))) {
m_style_manager.erase(font_index);
wxString message = GUI::format_wxstr(
_L("Font '%1%' can't be used. Please select another."),
"Font '%1%' can't be used. Please select another.",
emboss_style.name);
wxString title = _L("Selected font is NOT True-type.");
wxString title = "Selected font is NOT True-type.";
MessageDialog not_loaded_font_message(nullptr, message, title, wxOK);
not_loaded_font_message.ShowModal();
return choose_font_by_wxdialog();
@ -3150,7 +3151,7 @@ bool GLGizmoEmboss::choose_true_type_file()
wxArrayString input_files;
wxString fontDir = wxEmptyString;
wxString selectedFile = wxEmptyString;
wxFileDialog dialog(nullptr, _L("Choose one or more files (TTF, TTC):"),
wxFileDialog dialog(nullptr, "Choose one or more files (TTF, TTC):",
fontDir, selectedFile, file_wildcards(FT_FONTS),
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dialog.ShowModal() == wxID_OK) dialog.GetPaths(input_files);
@ -3178,7 +3179,7 @@ bool GLGizmoEmboss::choose_svg_file()
wxArrayString input_files;
wxString fontDir = wxEmptyString;
wxString selectedFile = wxEmptyString;
wxFileDialog dialog(nullptr, _L("Choose SVG file:"), fontDir,
wxFileDialog dialog(nullptr, _L("Choose SVG file")+":", fontDir,
selectedFile, file_wildcards(FT_SVG),
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dialog.ShowModal() == wxID_OK) dialog.GetPaths(input_files);
@ -3226,7 +3227,7 @@ void GLGizmoEmboss::create_notification_not_valid_font(
}
const std::string &face_name = face_name_opt.value_or(face_name_by_wx.value_or(es.path));
std::string text =
GUI::format(_L("Can't load exactly same font(\"%1%\"), "
GUI::format(_L("Can't load exactly same font(\"%1%\"). "
"Aplication selected a similar one(\"%2%\"). "
"You have to specify font for enable edit text."),
face_name_3mf, face_name);

View File

@ -44,7 +44,8 @@ bool GLGizmoFdmSupports::on_init()
m_shortcut_key = WXK_CONTROL_L;
m_desc["autopaint"] = _L("Automatic painting");
m_desc["painting"] = _L("painting...");
// TRN GizmoFdmSupports : message line during the waiting for autogenerated supports
m_desc["painting"] = _L("painting") + dots;
m_desc["clipping_of_view"] = _L("Clipping of view") + ": ";
m_desc["reset_direction"] = _L("Reset direction");
m_desc["cursor_size"] = _L("Brush size") + ": ";

View File

@ -1537,7 +1537,7 @@ void GLGizmoMeasure::render_dimensioning()
m_imgui->set_next_window_pos(label_position_ss.x(), viewport[3] - label_position_ss.y(), ImGuiCond_Always, 0.0f, 1.0f);
m_imgui->set_next_window_bg_alpha(0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
m_imgui->begin(_L("##angle"), ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
m_imgui->begin(wxString("##angle"), ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
ImGui::AlignTextToFramePadding();
ImDrawList* draw_list = ImGui::GetWindowDrawList();
@ -1736,7 +1736,7 @@ void GLGizmoMeasure::render_debug_dialog()
add_strings_row_to_table(*m_imgui, "m_pt3", ImGuiWrapper::COL_ORANGE_LIGHT, format_vec3(*extra_point), ImGui::GetStyleColorVec4(ImGuiCol_Text));
};
m_imgui->begin(_L("Measure tool debug"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
m_imgui->begin("Measure tool debug", ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
if (ImGui::BeginTable("Mode", 2)) {
std::string txt;
switch (m_mode)

View File

@ -318,6 +318,7 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
m_configuration.use_count = !m_configuration.use_count;
start_process = true;
} else if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && is_multipart)
// TRN %1% = "Detail level", %2% = "Decimate ratio"
ImGui::SetTooltip("%s", GUI::format(_L(
"Multipart object can be simplified only by %1%. "
"If you want specify %2% process it separately."),
@ -539,7 +540,8 @@ void GLGizmoSimplify::apply_simplify() {
const Selection& selection = m_parent.get_selection();
auto plater = wxGetApp().plater();
plater->take_snapshot(_u8L("Simplify ") + create_volumes_name(m_volume_ids, selection));
// TRN %1% = volumes name
plater->take_snapshot(Slic3r::format(_u8L("Simplify %1%"), create_volumes_name(m_volume_ids, selection)));
plater->clear_before_change_mesh(selection.get_object_idx(), _u8L("Custom supports, seams and multimaterial painting were "
"removed after simplifying the mesh."));
// After removing custom supports, seams, and multimaterial painting, we have to update info about the object to remove information about

View File

@ -145,7 +145,7 @@ void CreateVolumeJob::finalize(bool canceled, std::exception_ptr &eptr) {
if (!priv::finalize(canceled, eptr, m_input))
return;
if (m_result.its.empty())
return priv::create_message(_u8L("Can't create empty volume."));
return priv::create_message("Can't create empty volume.");
priv::create_volume(std::move(m_result), m_input.object_id, m_input.volume_type, m_input.trmat, m_input);
}
@ -198,7 +198,7 @@ void CreateObjectJob::finalize(bool canceled, std::exception_ptr &eptr)
// only for sure
if (m_result.empty())
return priv::create_message(_u8L("Can't create empty object."));
return priv::create_message("Can't create empty object.");
GUI_App &app = wxGetApp();
Plater *plater = app.plater();
@ -462,8 +462,8 @@ TriangleMesh priv::create_mesh(DataBase &input, Fnc was_canceled, Job::Ctl& ctl)
if (was_canceled()) return {};
// only info
ctl.call_on_main_thread([]() {
create_message(_u8L("It is used default volume for embossed "
"text, try to change text or font to fix it."));
create_message("It is used default volume for embossed "
"text, try to change text or font to fix it.");
});
}
@ -593,10 +593,10 @@ void priv::create_volume(
// Parent object for text volume was propably removed.
// Assumption: User know what he does, so text volume is no more needed.
if (obj == nullptr)
return priv::create_message(_u8L("Bad object to create volume."));
return priv::create_message("Bad object to create volume.");
if (mesh.its.empty())
return priv::create_message(_u8L("Can't create empty volume."));
return priv::create_message("Can't create empty volume.");
plater->take_snapshot(_L("Add Emboss text Volume"));
@ -823,10 +823,6 @@ bool priv::finalize(bool canceled, std::exception_ptr &eptr, const DataBase &inp
return !process(eptr);
}
#include <wx/msgdlg.h>
void priv::create_message(const std::string &message) {
wxMessageBox(wxString(message), _L("Issue during embossing the text."),
wxOK | wxICON_WARNING);
show_error(nullptr, message.c_str());
}

View File

@ -163,7 +163,7 @@ void SLAImportJob::finalize(bool canceled, std::exception_ptr &eptr)
p->plater->get_notification_manager()->push_notification(
NotificationType::CustomNotification,
NotificationManager::NotificationLevel::WarningNotificationLevel,
_u8L("The profile in the imported archive is corrupt and will not be loaded."));
_u8L("The profile in the imported archive is corrupted and will not be loaded."));
}
}

View File

@ -1198,10 +1198,10 @@ static void add_common_view_menu_items(wxMenu* view_menu, MainFrame* mainFrame,
append_menu_item(view_menu, wxID_ANY, _L("Iso") + sep + "&0", _L("Iso View"), [mainFrame](wxCommandEvent&) { mainFrame->select_view("iso"); },
"", nullptr, [can_change_view]() { return can_change_view(); }, mainFrame);
view_menu->AppendSeparator();
//TRN To be shown in the main menu View->Top
//TRN Main menu: View->Top
append_menu_item(view_menu, wxID_ANY, _L("Top") + sep + "&1", _L("Top View"), [mainFrame](wxCommandEvent&) { mainFrame->select_view("top"); },
"", nullptr, [can_change_view]() { return can_change_view(); }, mainFrame);
//TRN To be shown in the main menu View->Bottom
//TRN Main menu: View->Bottom
append_menu_item(view_menu, wxID_ANY, _L("Bottom") + sep + "&2", _L("Bottom View"), [mainFrame](wxCommandEvent&) { mainFrame->select_view("bottom"); },
"", nullptr, [can_change_view]() { return can_change_view(); }, mainFrame);
append_menu_item(view_menu, wxID_ANY, _L("Front") + sep + "&3", _L("Front View"), [mainFrame](wxCommandEvent&) { mainFrame->select_view("front"); },
@ -1638,7 +1638,7 @@ void MainFrame::init_menubar_as_gcodeviewer()
viewMenu = new wxMenu();
add_common_view_menu_items(viewMenu, this, std::bind(&MainFrame::can_change_view, this));
viewMenu->AppendSeparator();
append_menu_check_item(viewMenu, wxID_ANY, _L("Show legen&d") + sep + "L", _L("Show legend"),
append_menu_check_item(viewMenu, wxID_ANY, _L("Show Legen&d") + sep + "L", _L("Show legend"),
[this](wxCommandEvent&) { m_plater->show_legend(!m_plater->is_legend_shown()); }, this,
[this]() { return m_plater->is_preview_shown(); }, [this]() { return m_plater->is_legend_shown(); }, this);
}
@ -1777,7 +1777,7 @@ void MainFrame::quick_slice(const int qs)
// show processbar dialog
m_progress_dialog = new wxProgressDialog(_L("Slicing") + dots,
// TRN "Processing input_file_basename"
// TRN ProgressDialog on reslicing: "input file basename"
format_wxstr(_L("Processing %s"), (input_file_basename + dots)),
100, nullptr, wxPD_AUTO_HIDE);
m_progress_dialog->Pulse();

View File

@ -2447,7 +2447,7 @@ void NotificationManager::push_download_URL_progress_notification(size_t id, con
}
}
// push new one
NotificationData data{ NotificationType::URLDownload, NotificationLevel::ProgressBarNotificationLevel, 5, _u8L("Download:") + " " + text };
NotificationData data{ NotificationType::URLDownload, NotificationLevel::ProgressBarNotificationLevel, 5, _u8L("Download") + ": " + text };
push_notification_data(std::make_unique<NotificationManager::URLDownloadNotification>(data, m_id_provider, m_evt_handler, id, user_action_callback), 0);
}

View File

@ -173,8 +173,8 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
ConfigOptionDef option = opt.opt;
// add label if any
if (is_multioption_line && !option.label.empty()) {
//! To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1
label = (option.label == L_CONTEXT("Top", "Layers") || option.label == L_CONTEXT("Bottom", "Layers")) ?
// those two parameter names require localization with context
label = (option.label == "Top" || option.label == "Bottom") ?
_CTX(option.label, "Layers") : _(option.label);
label += ":";
@ -622,9 +622,9 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord v_pos)
ConfigOptionDef option = opt.opt;
// add label if any
if (is_multioption_line && !option.label.empty()) {
//! To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1
label = (option.label == L_CONTEXT("Top", "Layers") || option.label == L_CONTEXT("Bottom", "Layers")) ?
_CTX(option.label, "Layers") : _(option.label);
// those two parameter names require localization with context
label = (option.label == "Top" || option.label == "Bottom") ?
_CTX(option.label, "Layers") : _(option.label);
label += ":";
if (is_url_string)

View File

@ -384,8 +384,8 @@ void OptionsGroup::activate_line(Line& line)
ConfigOptionDef option = opt.opt;
// add label if any
if ((option_set.size() > 1 || line.label.IsEmpty()) && !option.label.empty()) {
// To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1
wxString str_label = (option.label == L_CONTEXT("Top", "Layers") || option.label == L_CONTEXT("Bottom", "Layers")) ?
// those two parameter names require localization with context
wxString str_label = (option.label == "Top" || option.label == "Bottom") ?
_CTX(option.label, "Layers") :
_(option.label);
label = new wxStaticText(this->ctrl_parent(), wxID_ANY, str_label + ": ", wxDefaultPosition, //wxDefaultSize);

View File

@ -3033,8 +3033,8 @@ bool Plater::priv::delete_object_from_model(size_t obj_idx)
ModelObject* obj = model.objects[obj_idx];
if (obj->is_cut()) {
InfoDialog dialog(q, _L("Delete object which is a part of cut object"),
_L("You try to delete an object which is a part of a cut object.\n"
"This action will break a cut correspondence.\n"
_L("You try to delete an object which is a part of a cut object.") + "\n" +
_L("This action will break a cut information.\n"
"After that PrusaSlicer can't guarantee model consistency"),
false, wxYES | wxCANCEL | wxCANCEL_DEFAULT | wxICON_WARNING);
dialog.SetButtonLabel(wxID_YES, _L("Delete object"));
@ -5437,7 +5437,7 @@ protected:
LoadProjectsDialog::LoadProjectsDialog(const std::vector<fs::path>& paths)
: DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY,
format_wxstr(_L("%s - Multiple projects file"), SLIC3R_APP_NAME), wxDefaultPosition,
format_wxstr(_L("%1% - Multiple projects file"), SLIC3R_APP_NAME), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{
SetFont(wxGetApp().normal_font());
@ -5826,7 +5826,7 @@ protected:
ProjectDropDialog::ProjectDropDialog(const std::string& filename)
: DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY,
format_wxstr(_L("%s - Load project file"), SLIC3R_APP_NAME), wxDefaultPosition,
format_wxstr("%1% - %2%", SLIC3R_APP_NAME, _L("Load project file")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{
SetFont(wxGetApp().normal_font());
@ -5934,7 +5934,7 @@ bool Plater::load_files(const wxArrayString& filenames, bool delete_after_load/*
std::string filename = (*it).filename().string();
if (boost::algorithm::iends_with(filename, ".3mf") || boost::algorithm::iends_with(filename, ".amf")) {
ProjectDropDialog::LoadType load_type = ProjectDropDialog::LoadType::Unknown;
// if (!model().objects.empty()) { // #ysFIXME_delete_after_test_of_6377
{
if ((boost::algorithm::iends_with(filename, ".3mf") && !is_project_3mf(it->string())) ||
(boost::algorithm::iends_with(filename, ".amf") && !boost::algorithm::iends_with(filename, ".zip.amf")))
load_type = ProjectDropDialog::LoadType::LoadGeometry;
@ -5951,11 +5951,7 @@ bool Plater::load_files(const wxArrayString& filenames, bool delete_after_load/*
load_type = static_cast<ProjectDropDialog::LoadType>(std::clamp(std::stoi(wxGetApp().app_config->get("drop_project_action")),
static_cast<int>(ProjectDropDialog::LoadType::OpenProject), static_cast<int>(ProjectDropDialog::LoadType::LoadConfig)));
}
/* // #ysFIXME_delete_after_test_of_6377
}
else
load_type = ProjectDropDialog::LoadType::OpenProject;
*/
if (load_type == ProjectDropDialog::LoadType::Unknown)
return false;

View File

@ -308,14 +308,9 @@ void PreferencesDialog::build()
m_optgroup_general->append_separator();
append_bool_option(m_optgroup_general, "show_drop_project_dialog",
#if 1 // #ysFIXME_delete_after_test_of_6377
L("Show load project dialog"),
L("When checked, whenever dragging and dropping a project file on the application or open it from a browser, "
"shows a dialog asking to select the action to take on the file to load."),
#else
L("Show drop project dialog"),
L("When checked, whenever dragging and dropping a project file on the application, shows a dialog asking to select the action to take on the file to load."),
#endif
app_config->get_bool("show_drop_project_dialog"));
append_bool_option(m_optgroup_general, "single_instance",
@ -471,7 +466,7 @@ void PreferencesDialog::build()
append_bool_option(m_optgroup_gui, "seq_top_layer_only",
L("Sequential slider applied only to top layer"),
L("If enabled, changes made using the sequential slider, in preview, apply only to gcode top layer."
L("If enabled, changes made using the sequential slider, in preview, apply only to gcode top layer. "
"If disabled, changes made using the sequential slider, in preview, apply to the whole gcode."),
app_config->get_bool("seq_top_layer_only"));
@ -627,7 +622,7 @@ void PreferencesDialog::build()
append_bool_option(m_optgroup_dark_mode, "sys_menu_enabled",
L("Use system menu for application"),
L("If enabled, application will use the standard Windows system menu,\n"
"but on some combination od display scales it can look ugly. If disabled, old UI will be used."),
"but on some combination of display scales it can look ugly. If disabled, old UI will be used."),
app_config->get_bool("sys_menu_enabled"));
}

View File

@ -71,7 +71,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
if (combo_storage != nullptr) {
// PrusaLink specific: User needs to choose a storage
auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage:"));
auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage") + ":");
content_sizer->Add(label_group);
content_sizer->Add(combo_storage, 0, wxBOTTOM, 2 * VERT_SPACING);
combo_storage->SetValue(storage_names.front());
@ -80,7 +80,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
combo_storage->SetValue(recent_storage);
} else if (storage_names.GetCount() == 1){
// PrusaLink specific: Show which storage has been detected.
auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage: ") + storage_names.front());
auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage") + ": " + storage_names.front());
content_sizer->Add(label_group);
m_preselected_storage = storage_paths.front();
}

View File

@ -87,9 +87,13 @@ void SavePresetDialog::Item::init_input_name_ctrl(wxBoxSizer *input_name_sizer,
wxString SavePresetDialog::Item::get_top_label_text() const
{
const std::string label_str = m_use_text_ctrl ?_u8L("Rename %s to:") : _u8L("Save %s as:");
const std::string label_str = m_use_text_ctrl ?
// TRN %1% = "Preset"
L("Rename %1% to") :
// TRN %1% = "Preset"
L("Save %1% as");
Tab* tab = wxGetApp().get_tab(m_type);
return from_u8((boost::format(label_str) % into_u8(tab->title())).str());
return format_wxstr(_(label_str) + ":", tab->title());
}
SavePresetDialog::Item::Item(Preset::Type type, const std::string& suffix, wxBoxSizer* sizer, SavePresetDialog* parent):
@ -324,6 +328,7 @@ void SavePresetDialog::build(std::vector<Preset::Type> types, std::string suffix
#endif // __WXMSW__
if (suffix.empty())
// TRN Suffix for the preset name. Have to be a noun.
suffix = _CTX_utf8(L_CONTEXT("Copy", "PresetName"), "PresetName");
wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -5,6 +5,7 @@
#include "slic3r/Utils/RaycastManager.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/CameraUtils.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "libslic3r/Emboss.hpp"
namespace Slic3r::GUI {

View File

@ -163,9 +163,10 @@ void Tab::create_preset_tab()
add_scaled_button(panel, &m_btn_hide_incompatible_presets, "flag_green");
m_btn_compare_preset->SetToolTip(_L("Compare this preset with some another"));
// TRN "Save current Settings"
// TRN Settings Tabs: Tooltip for save button: "Settings"
m_btn_save_preset->SetToolTip(format_wxstr(_L("Save current %s"), m_title));
m_btn_rename_preset->SetToolTip(format_wxstr(_L("Rename current %s"), m_title));
// TRN Settings Tabs: Tooltip for rename button: "Settings"
m_btn_rename_preset->SetToolTip(format_wxstr(_L("Rename current %1%"), m_title));
m_btn_rename_preset->Hide();
m_btn_delete_preset->SetToolTip(_(L("Delete this preset")));
m_btn_delete_preset->Hide();
@ -3925,7 +3926,6 @@ 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");
// TRN remove/delete
PhysicalPrinterCollection& physical_printers = m_preset_bundle->physical_printers;
wxString msg;
@ -3969,12 +3969,13 @@ void Tab::delete_preset()
"Note, that these printers will be deleted after deleting the selected preset.", ph_printers_only.size()) + "\n\n";
}
}
// TRN "remove/delete"
msg += from_u8((boost::format(_u8L("Are you sure you want to %1% the selected preset?")) % action).str());
}
action = current_preset.is_external ? _L("Remove") : _L("Delete");
// TRN Remove/Delete
// TRN Settings Tabs: Button in toolbar: "Remove/Delete"
wxString title = format_wxstr(_L("%1% Preset"), action);
if (current_preset.is_default ||
//wxID_YES != wxMessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal())

View File

@ -135,10 +135,10 @@ bool AppUpdateAvailableDialog::disable_version_check() const
// AppUpdateDownloadDialog
AppUpdateDownloadDialog::AppUpdateDownloadDialog( const Semver& ver_online, boost::filesystem::path& path)
: MsgDialog(nullptr, _(L("App Update download")), wxString::Format(_(L("New version of %s is available.")), SLIC3R_APP_NAME))
: MsgDialog(nullptr, _L("App Update download"), format_wxstr(_L("New version of %1% is available."), SLIC3R_APP_NAME))
{
auto* versions = new wxFlexGridSizer(2, 0, VERT_SPACING);
versions->Add(new wxStaticText(this, wxID_ANY, _(L("New version:"))));
versions->Add(new wxStaticText(this, wxID_ANY, _L("New version") + ":"));
versions->Add(new wxStaticText(this, wxID_ANY, ver_online.to_string()));
content_sizer->Add(versions);
content_sizer->AddSpacer(VERT_SPACING);
@ -148,7 +148,7 @@ AppUpdateDownloadDialog::AppUpdateDownloadDialog( const Semver& ver_online, boos
#endif
content_sizer->AddSpacer(VERT_SPACING);
content_sizer->AddSpacer(VERT_SPACING);
content_sizer->Add(new wxStaticText(this, wxID_ANY, _(L("Target directory:"))));
content_sizer->Add(new wxStaticText(this, wxID_ANY, _L("Target directory") + ":"));
content_sizer->AddSpacer(VERT_SPACING);
txtctrl_path = new wxTextCtrl(this, wxID_ANY, GUI::format_wxstr(path.parent_path().string()));
filename = GUI::format_wxstr(path.filename().string());
@ -173,7 +173,7 @@ AppUpdateDownloadDialog::AppUpdateDownloadDialog( const Semver& ver_online, boos
dir = GUI::format(txtctrl_path->GetValue());
wxDirDialog save_dlg(
this
, _L("Select directory:")
, _L("Select directory") + ":"
, GUI::format_wxstr(dir.string())
/*
, filename //boost::nowide::widen(AppUpdater::get_filename_from_url(txtctrl_path->GetValue().ToUTF8().data()))

View File

@ -769,12 +769,17 @@ bool PrusaLink::get_storage(wxArrayString& storage_path, wxArrayString& storage_
if (res && storage_path.empty()) {
if (!storage.empty()) { // otherwise error_msg is already filled
error_msg = L"\n\n" + _L("Storages found:") + L" \n";
error_msg = L"\n\n" + _L("Storages found") + L": \n";
for (const auto& si : storage) {
error_msg += si.path + L" : " + (si.read_only ? _L("read only") : _L("no free space")) + L"\n";
error_msg += GUI::format_wxstr(si.read_only ?
// TRN %1% = storage path
_L("%1% : read only") :
// TRN %1% = storage path
_L("%1% : no free space"), si.path) + L"\n";
}
}
std::string message = GUI::format(_L("Upload has failed. There is no suitable storage found at %1%.%2%"), m_host, error_msg);
// TRN %1% = host
std::string message = GUI::format(_L("Upload has failed. There is no suitable storage found at %1%."), m_host) + GUI::into_u8(error_msg);
BOOST_LOG_TRIVIAL(error) << message;
throw Slic3r::IOError(message);
}
@ -1138,9 +1143,7 @@ wxString PrusaConnect::get_test_ok_msg() const
wxString PrusaConnect::get_test_failed_msg(wxString& msg) const
{
return GUI::from_u8((boost::format("%s: %s")
% _utf8(L("Could not connect to PrusaConnect"))
% std::string(msg.ToUTF8())).str());
return GUI::format_wxstr("%s: %s", _L("Could not connect to PrusaConnect"), msg);
}
}