Some more localization improvmenets.

This commit is contained in:
bubnikv 2019-05-09 18:18:21 +02:00
parent 5757728f2b
commit b6837112df
6 changed files with 27 additions and 19 deletions

View File

@ -291,7 +291,13 @@ void ConfigWizardPage::append_spacer(int space)
// Wizard pages
PageWelcome::PageWelcome(ConfigWizard *parent)
: ConfigWizardPage(parent, wxString::Format(_(L("Welcome to the %s %s")), SLIC3R_APP_NAME, ConfigWizard::name()), _(L("Welcome")))
: ConfigWizardPage(parent, wxString::Format(
#ifdef __APPLE__
_(L("Welcome to the %s Configuration Assistant"))
#else
_(L("Welcome to the %s Configuration Wizard"))
#endif
, SLIC3R_APP_NAME), _(L("Welcome")))
, cbox_reset(nullptr)
{
if (wizard_p()->run_reason == ConfigWizard::RR_DATA_EMPTY) {
@ -488,7 +494,7 @@ PageFirmware::PageFirmware(ConfigWizard *parent)
, gcode_picker(nullptr)
{
append_text(_(L("Choose the type of firmware used by your printer.")));
append_text(gcode_opt.tooltip);
append_text(_(gcode_opt.tooltip));
wxArrayString choices;
choices.Alloc(gcode_opt.enum_labels.size());
@ -1175,12 +1181,12 @@ bool ConfigWizard::run(PresetBundle *preset_bundle, const PresetUpdater *updater
const wxString& ConfigWizard::name(const bool from_menu/* = false*/)
{
// A different naming convention is used for the Wizard on Windows vs. OSX & GTK.
#if WIN32
static const wxString config_wizard_name = L("Configuration Wizard");
static const wxString config_wizard_name_menu = L("Configuration &Wizard");
#if __APPLE__
static const wxString config_wizard_name = _(L("Configuration Assistant"));
static const wxString config_wizard_name_menu = _(L("Configuration &Assistant"));
#else
static const wxString config_wizard_name = L("Configuration Assistant");
static const wxString config_wizard_name_menu = L("Configuration &Assistant");
static const wxString config_wizard_name = _(L("Configuration Wizard"));
static const wxString config_wizard_name_menu = _(L("Configuration &Wizard"));
#endif
return from_menu ? config_wizard_name_menu : config_wizard_name;
}

View File

@ -765,6 +765,7 @@ FirmwareDialog::FirmwareDialog(wxWindow *parent) :
auto *label_hex_picker = new wxStaticText(panel, wxID_ANY, _(L("Firmware image:")));
p->hex_picker = new wxFilePickerCtrl(panel, wxID_ANY, wxEmptyString, wxFileSelectorPromptStr,
"Hex files (*.hex)|*.hex|All files|*.*");
p->hex_picker->GetPickerCtrl()->SetLabelText(_(L("Browse")));
auto *label_port_picker = new wxStaticText(panel, wxID_ANY, _(L("Serial port:")));
p->port_picker = new wxComboBox(panel, wxID_ANY);

View File

@ -112,7 +112,7 @@ void KBShortcutsDialog::fill_shortcuts()
// main_shortcuts.push_back(Shortcut(ctrl+"U" ,L("Quick slice")));
// main_shortcuts.push_back(Shortcut(ctrl+"Shift+U" ,L("Repeat last quick slice")));
main_shortcuts.push_back(Shortcut(ctrl+"1" ,L("Select Plater Tab")));
main_shortcuts.push_back(Shortcut(ctrl+alt+"U" ,L("Quick slice and Save as")));
// main_shortcuts.push_back(Shortcut(ctrl+alt+"U" ,L("Quick slice and Save as")));
main_shortcuts.push_back(Shortcut(ctrl+"2" ,L("Select Print Settings Tab")));
main_shortcuts.push_back(Shortcut(ctrl+"3" ,L("Select Filament Settings Tab")));
main_shortcuts.push_back(Shortcut(ctrl+"4" ,L("Select Printer Settings Tab")));

View File

@ -2101,7 +2101,7 @@ void Plater::priv::arrange()
event.SetString(msg);
wxQueueEvent(this->q, event.Clone()); */
statusbar()->set_progress(count - st);
statusbar()->set_status_text(msg);
statusbar()->set_status_text(_(msg));
// ok, this is dangerous, but we are protected by the flag
// 'arranging' and the arrange button is also disabled.

View File

@ -404,7 +404,7 @@ ObjectDataViewModelNode::ObjectDataViewModelNode(ObjectDataViewModelNode* parent
}
else if (type == itInstance) {
m_idx = parent->GetChildCount();
m_name = wxString::Format(_(L("Instance_%d")), m_idx + 1);
m_name = wxString::Format(_(L("Instance %d")), m_idx + 1);
set_action_icon();
}
@ -466,6 +466,14 @@ void ObjectDataViewModelNode::msw_rescale()
update_settings_digest_bitmaps();
}
void ObjectDataViewModelNode::SetIdx(const int& idx)
{
m_idx = idx;
// update name if this node is instance
if (m_type == itInstance)
m_name = wxString::Format(_(L("Instance %d")), m_idx + 1);
}
// *****************************************************************************
// ----------------------------------------------------------------------------
// ObjectDataViewModel

View File

@ -312,14 +312,7 @@ public:
const wxBitmap& GetBitmap() const { return m_bmp; }
const wxString& GetName() const { return m_name; }
ItemType GetType() const { return m_type; }
void SetIdx(const int& idx) {
m_idx = idx;
// update name if this node is instance
if (m_type == itInstance)
m_name = wxString::Format("Instance_%d", m_idx + 1);
}
void SetIdx(const int& idx);
int GetIdx() const { return m_idx; }
// use this function only for childrens