Skip to content

Commit

Permalink
Add some missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
rlbxku1r authored and eranif committed Jan 7, 2022
1 parent a551da5 commit 4a1a54c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion HelpPlugin/helpplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CL_PLUGIN_API PluginInfo* GetPluginInfo()
static PluginInfo info;
info.SetAuthor(wxT("Eran Ifrah"));
info.SetName(wxT("HelpPlugin"));
info.SetDescription(wxT("Provide help based on selected words"));
info.SetDescription(_("Provide help based on selected words"));
info.SetVersion(wxT("v1.0"));
return &info;
}
Expand Down
10 changes: 7 additions & 3 deletions LiteEditor/breakpointdlgbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ BreakpointTabBase::BreakpointTabBase(wxWindow* parent, wxWindowID id, const wxPo

SetName(wxT("BreakpointTabBase"));
SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
if(GetSizer()) { GetSizer()->Fit(this); }
if(GetSizer()) {
GetSizer()->Fit(this);
}
// Connect events
m_dvListCtrlBreakpoints->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,
wxDataViewEventHandler(BreakpointTabBase::OnContextMenu), NULL, this);
Expand Down Expand Up @@ -290,7 +292,7 @@ BreakpointPropertiesDlgBase::BreakpointPropertiesDlgBase(wxWindow* parent, wxWin
new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTE_MULTILINE);
m_textCond->SetToolTip(
_("You can add a condition to any breakpoint or watchpoint. The debugger will then stop only if the condition "
"is met.\nThe condition can be any simple or complex expression in your programming language,providing it "
"is met.\nThe condition can be any simple or complex expression in your programming language, providing it "
"returns a bool. However any variables that you use must be in scope.\nIf you've previously set a condition "
"and no longer want it, just clear this textctrl."));

Expand Down Expand Up @@ -376,7 +378,9 @@ BreakpointPropertiesDlgBase::BreakpointPropertiesDlgBase(wxWindow* parent, wxWin

SetName(wxT("BreakpointPropertiesDlgBase"));
SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
if(GetSizer()) { GetSizer()->Fit(this); }
if(GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent();
} else {
Expand Down
3 changes: 3 additions & 0 deletions LiteEditor/breakpointdlgbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef _CODELITE_LITEEDITOR_BREAKPOINTDLG_BASE_CLASSES_H
#define _CODELITE_LITEEDITOR_BREAKPOINTDLG_BASE_CLASSES_H

// clang-format off
#include <wx/settings.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xh_bmp.h>
Expand Down Expand Up @@ -43,6 +44,8 @@
#define WXC_FROM_DIP(x) x
#endif

// clang-format on

class BreakpointTabBase : public wxPanel
{
protected:
Expand Down
44 changes: 21 additions & 23 deletions LiteEditor/breakpointpropertiesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

#include <wx/msgdlg.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include "breakpointpropertiesdlg.h"

#include "windowattrmanager.h"

#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/msgdlg.h>

BreakptPropertiesDlg::BreakptPropertiesDlg(wxWindow* parent)
: BreakpointPropertiesDlgBase(parent)
{
Expand Down Expand Up @@ -79,18 +81,14 @@ void BreakptPropertiesDlg::EnterBPData(const clDebuggerBreakpoint& bp)
// running
// as SetSelection(1) causes a wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING event, which is vetoed
m_choicebook->Disconnect(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING,
wxChoicebookEventHandler(BreakptPropertiesDlg::OnPageChanging),
NULL,
this);
wxChoicebookEventHandler(BreakptPropertiesDlg::OnPageChanging), NULL, this);
if(its_a_breakpt) {
m_choicebook->SetSelection(0);
} else {
m_choicebook->SetSelection(1);
}
m_choicebook->Connect(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING,
wxChoicebookEventHandler(BreakptPropertiesDlg::OnPageChanging),
NULL,
this);
wxChoicebookEventHandler(BreakptPropertiesDlg::OnPageChanging), NULL, this);

m_checkDisable->SetValue(!bp.is_enabled);
m_checkTemp->SetValue(bp.is_temp);
Expand All @@ -115,8 +113,7 @@ void BreakptPropertiesDlg::EndModal(int retCode)
b.watchpt_data = m_textWatchExpression->GetValue();
if(b.watchpt_data.IsEmpty()) {
wxMessageBox(_("You don't seem to have entered a variable for the watchpoint to watch. Please try again."),
wxT(":/"),
wxICON_ERROR);
_(":/"), wxICON_ERROR);
return;
}
} else {
Expand Down Expand Up @@ -144,8 +141,7 @@ void BreakptPropertiesDlg::EndModal(int retCode)
case wbc_function:
b.function_name = m_textFunctionname->GetValue();
if(b.function_name.IsEmpty()) {
wxMessageBox(_("You don't seem to have entered a name for the function. Please try again."),
_(":/"),
wxMessageBox(_("You don't seem to have entered a name for the function. Please try again."), _(":/"),
wxICON_ERROR);
return;
}
Expand Down Expand Up @@ -231,8 +227,7 @@ void BreakptPropertiesDlg::OnPageChanging(wxChoicebookEvent& event)
if(b.debugger_id != -1) {
wxMessageBox(
_("Sorry, you can't change a breakpoint to a watchpoint, or vice versa, while the debugger is running"),
_("Not possible"),
wxICON_ERROR | wxOK);
_("Not possible"), wxICON_ERROR | wxOK);
event.Veto();
}
}
Expand All @@ -241,14 +236,17 @@ void BreakptPropertiesDlg::OnPageChanged(wxChoicebookEvent& event)
{
its_a_breakpt = m_choicebook->GetPageText(m_choicebook->GetSelection()) == _("Breakpoint");
// Watchpoints can't have conditions set direct in MI; they need to be created without, then edited to add
m_textCond->Enable(its_a_breakpt || GetTitle().StartsWith("Properties")); // The dlg title starts with Properties when editing
if (!GetTitle().StartsWith("Properties")) {
wxString tip = (its_a_breakpt ?
"You can add a condition to any breakpoint. The debugger will then stop only if the condition is met.\n \
The condition can be any simple or complex expression in your programming language, providing it returns a bool. However any variables that you use must be in scope.\n \
If you've previously set a condition and no longer want it, just clear this textctrl." :
"It is not possible to Add a conditional watchpoint. Create a normal watchpoint first, then Edit it to add the conditon"
);
m_textCond->Enable(its_a_breakpt ||
GetTitle().StartsWith("Properties")); // The dlg title starts with Properties when editing
if(!GetTitle().StartsWith("Properties")) {
wxString tip =
(its_a_breakpt
? _("You can add a condition to any breakpoint. The debugger will then stop only if the condition is "
"met.\nThe condition can be any simple or complex expression in your programming language, "
"providing it returns a bool. However any variables that you use must be in scope.\nIf you've "
"previously set a condition and no longer want it, just clear this textctrl.")
: _("It is not possible to Add a conditional watchpoint. Create a normal watchpoint first, then Edit "
"it to add the conditon"));
m_textCond->SetToolTip(tip);
}
m_checkTemp->Show(its_a_breakpt); // Watchpoints can't be temporary
Expand Down
2 changes: 1 addition & 1 deletion MacBundler/macbundler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ CL_PLUGIN_API PluginInfo* GetPluginInfo()
static PluginInfo info;
info.SetAuthor(wxT("Auria"));
info.SetName(wxT("MacBundler"));
info.SetDescription(wxT("MacBundler : manage OS X app bundles"));
info.SetDescription(_("MacBundler : manage OS X app bundles"));
info.SetVersion(wxT("v0.1"));
return &info;
}
Expand Down
2 changes: 1 addition & 1 deletion Rust/RustPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void RustPlugin::OnNewWorkspace(clCommandEvent& e)
e.Skip(false);
// Prompt the user for the folder to run 'cargo new'
NewFileSystemWorkspaceDialog dlg(EventNotifier::Get()->TopFrame(), false /* do not auto update the name */);
dlg.SetLabel("Select the folder to run 'cargo new'");
dlg.SetLabel(_("Select the folder to run 'cargo new'"));
if(dlg.ShowModal() != wxID_OK) {
return;
}
Expand Down

0 comments on commit 4a1a54c

Please sign in to comment.