Use wxGetTranslation() instead of _() in the public headers.
This allows the code in them to compile even when WXINTL_NO_GETTEXT_MACRO is defined. Closes #15443. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -583,12 +583,12 @@ public:
|
|||||||
|
|
||||||
// returns the size in a human readable form
|
// returns the size in a human readable form
|
||||||
wxString
|
wxString
|
||||||
GetHumanReadableSize(const wxString& nullsize = _("Not available"),
|
GetHumanReadableSize(const wxString& nullsize = wxGetTranslation("Not available"),
|
||||||
int precision = 1,
|
int precision = 1,
|
||||||
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const;
|
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const;
|
||||||
static wxString
|
static wxString
|
||||||
GetHumanReadableSize(const wxULongLong& sz,
|
GetHumanReadableSize(const wxULongLong& sz,
|
||||||
const wxString& nullsize = _("Not available"),
|
const wxString& nullsize = wxGetTranslation("Not available"),
|
||||||
int precision = 1,
|
int precision = 1,
|
||||||
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL);
|
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL);
|
||||||
#endif // wxUSE_LONGLONG
|
#endif // wxUSE_LONGLONG
|
||||||
|
@@ -49,7 +49,7 @@ inline bool wxOleInitialize()
|
|||||||
// needs non-default mode.
|
// needs non-default mode.
|
||||||
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
|
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
|
||||||
{
|
{
|
||||||
wxLogError(_("Cannot initialize OLE"));
|
wxLogError(wxGetTranslation("Cannot initialize OLE"));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -260,7 +260,7 @@ private:
|
|||||||
class WXDLLIMPEXP_CORE wxPrintout: public wxObject
|
class WXDLLIMPEXP_CORE wxPrintout: public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPrintout(const wxString& title = _("Printout"));
|
wxPrintout(const wxString& title = wxGetTranslation("Printout"));
|
||||||
virtual ~wxPrintout();
|
virtual ~wxPrintout();
|
||||||
|
|
||||||
virtual bool OnBeginDocument(int startPage, int endPage);
|
virtual bool OnBeginDocument(int startPage, int endPage);
|
||||||
@@ -392,7 +392,7 @@ class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame
|
|||||||
public:
|
public:
|
||||||
wxPreviewFrame(wxPrintPreviewBase *preview,
|
wxPreviewFrame(wxPrintPreviewBase *preview,
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
const wxString& title = _("Print Preview"),
|
const wxString& title = wxGetTranslation("Print Preview"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT,
|
long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT,
|
||||||
|
@@ -26,8 +26,8 @@ public:
|
|||||||
const wxString& caption,
|
const wxString& caption,
|
||||||
long style )
|
long style )
|
||||||
: wxGenericMessageDialog( parent, message, caption, style ),
|
: wxGenericMessageDialog( parent, message, caption, style ),
|
||||||
m_detailsExpanderCollapsedLabel( _("&See details") ),
|
m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ),
|
||||||
m_detailsExpanderExpandedLabel( _("&Hide details") ),
|
m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ),
|
||||||
m_checkBoxValue( false )
|
m_checkBoxValue( false )
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@@ -3520,7 +3520,7 @@ public:
|
|||||||
|
|
||||||
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
||||||
|
|
||||||
virtual wxString GetPropertiesMenuLabel() const { return _("&Box"); }
|
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Box"); }
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
||||||
@@ -4645,7 +4645,7 @@ public:
|
|||||||
|
|
||||||
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
||||||
|
|
||||||
virtual wxString GetPropertiesMenuLabel() const { return _("&Picture"); }
|
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Picture"); }
|
||||||
|
|
||||||
virtual bool UsesParagraphAttributes() const { return false; }
|
virtual bool UsesParagraphAttributes() const { return false; }
|
||||||
|
|
||||||
@@ -5575,7 +5575,7 @@ public:
|
|||||||
|
|
||||||
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
||||||
|
|
||||||
virtual wxString GetPropertiesMenuLabel() const { return _("&Cell"); }
|
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Cell"); }
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
||||||
@@ -5665,7 +5665,7 @@ public:
|
|||||||
|
|
||||||
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
|
||||||
|
|
||||||
virtual wxString GetPropertiesMenuLabel() const { return _("&Table"); }
|
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Table"); }
|
||||||
|
|
||||||
// Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject
|
// Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject
|
||||||
// is possible. For example, containers supporting text, such as a text box object, can accept the focus,
|
// is possible. For example, containers supporting text, such as a text box object, can accept the focus,
|
||||||
|
@@ -36,7 +36,7 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
|
|||||||
|
|
||||||
////@begin control identifiers
|
////@begin control identifiers
|
||||||
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL
|
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL
|
||||||
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE _("Object Properties")
|
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE wxGetTranslation("Object Properties")
|
||||||
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME ID_RICHTEXTOBJECTPROPERTIESDIALOG
|
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME ID_RICHTEXTOBJECTPROPERTIESDIALOG
|
||||||
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE wxSize(400, 300)
|
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE wxSize(400, 300)
|
||||||
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION wxDefaultPosition
|
||||||
|
@@ -106,7 +106,7 @@ private:
|
|||||||
class WXDLLIMPEXP_RICHTEXT wxRichTextPrintout : public wxPrintout
|
class WXDLLIMPEXP_RICHTEXT wxRichTextPrintout : public wxPrintout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRichTextPrintout(const wxString& title = _("Printout"));
|
wxRichTextPrintout(const wxString& title = wxGetTranslation("Printout"));
|
||||||
virtual ~wxRichTextPrintout();
|
virtual ~wxRichTextPrintout();
|
||||||
|
|
||||||
/// The buffer to print
|
/// The buffer to print
|
||||||
@@ -160,7 +160,7 @@ private:
|
|||||||
class WXDLLIMPEXP_RICHTEXT wxRichTextPrinting : public wxObject
|
class WXDLLIMPEXP_RICHTEXT wxRichTextPrinting : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRichTextPrinting(const wxString& name = _("Printing"), wxWindow *parentWindow = NULL);
|
wxRichTextPrinting(const wxString& name = wxGetTranslation("Printing"), wxWindow *parentWindow = NULL);
|
||||||
virtual ~wxRichTextPrinting();
|
virtual ~wxRichTextPrinting();
|
||||||
|
|
||||||
/// Preview the file or buffer
|
/// Preview the file or buffer
|
||||||
|
@@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxCheckBox;
|
|||||||
|
|
||||||
////@begin control identifiers
|
////@begin control identifiers
|
||||||
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
||||||
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE _("Style Organiser")
|
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE wxGetTranslation("Style Organiser")
|
||||||
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_IDNAME ID_RICHTEXTSTYLEORGANISERDIALOG
|
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_IDNAME ID_RICHTEXTSTYLEORGANISERDIALOG
|
||||||
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE wxSize(400, 300)
|
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE wxSize(400, 300)
|
||||||
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION wxDefaultPosition
|
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION wxDefaultPosition
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
{
|
{
|
||||||
if ( pipe(m_fds) == -1 )
|
if ( pipe(m_fds) == -1 )
|
||||||
{
|
{
|
||||||
wxLogSysError(_("Pipe creation failed"));
|
wxLogSysError(wxGetTranslation("Pipe creation failed"));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -176,7 +176,7 @@ public:
|
|||||||
if ( m_setter )
|
if ( m_setter )
|
||||||
m_setter->Set( object, value );
|
m_setter->Set( object, value );
|
||||||
else
|
else
|
||||||
wxLogError( _("SetProperty called w/o valid setter") );
|
wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getting a simple property (non-collection)
|
// Getting a simple property (non-collection)
|
||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
if ( m_getter )
|
if ( m_getter )
|
||||||
m_getter->Get( object, result );
|
m_getter->Get( object, result );
|
||||||
else
|
else
|
||||||
wxLogError( _("GetProperty called w/o valid getter") );
|
wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adding an element to a collection property
|
// Adding an element to a collection property
|
||||||
@@ -194,7 +194,7 @@ public:
|
|||||||
if ( m_adder )
|
if ( m_adder )
|
||||||
m_adder->Add( object, value );
|
m_adder->Add( object, value );
|
||||||
else
|
else
|
||||||
wxLogError( _("AddToPropertyCollection called w/o valid adder") );
|
wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getting a collection property
|
// Getting a collection property
|
||||||
@@ -203,7 +203,7 @@ public:
|
|||||||
if ( m_collectionGetter )
|
if ( m_collectionGetter )
|
||||||
m_collectionGetter->Get( obj, result);
|
m_collectionGetter->Get( obj, result);
|
||||||
else
|
else
|
||||||
wxLogError( _("GetPropertyCollection called w/o valid collection getter") );
|
wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") );
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HasSetter() const { return m_setter != NULL; }
|
virtual bool HasSetter() const { return m_setter != NULL; }
|
||||||
@@ -256,14 +256,14 @@ public:
|
|||||||
virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
|
virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
|
||||||
const wxAny &WXUNUSED(value)) const
|
const wxAny &WXUNUSED(value)) const
|
||||||
{
|
{
|
||||||
wxLogError( _("AddToPropertyCollection called on a generic accessor") );
|
wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getting a collection property
|
// Getting a collection property
|
||||||
virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
|
virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
|
||||||
wxAnyList &WXUNUSED(result)) const
|
wxAnyList &WXUNUSED(result)) const
|
||||||
{
|
{
|
||||||
wxLogError ( _("GetPropertyCollection called on a generic accessor") );
|
wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user