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:
Vadim Zeitlin
2013-09-15 00:15:02 +00:00
parent 5fff51b517
commit e91e1e3d5c
10 changed files with 22 additions and 22 deletions

View File

@@ -583,12 +583,12 @@ public:
// returns the size in a human readable form
wxString
GetHumanReadableSize(const wxString& nullsize = _("Not available"),
GetHumanReadableSize(const wxString& nullsize = wxGetTranslation("Not available"),
int precision = 1,
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const;
static wxString
GetHumanReadableSize(const wxULongLong& sz,
const wxString& nullsize = _("Not available"),
const wxString& nullsize = wxGetTranslation("Not available"),
int precision = 1,
wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL);
#endif // wxUSE_LONGLONG

View File

@@ -49,7 +49,7 @@ inline bool wxOleInitialize()
// needs non-default mode.
if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) )
{
wxLogError(_("Cannot initialize OLE"));
wxLogError(wxGetTranslation("Cannot initialize OLE"));
return false;
}

View File

@@ -260,7 +260,7 @@ private:
class WXDLLIMPEXP_CORE wxPrintout: public wxObject
{
public:
wxPrintout(const wxString& title = _("Printout"));
wxPrintout(const wxString& title = wxGetTranslation("Printout"));
virtual ~wxPrintout();
virtual bool OnBeginDocument(int startPage, int endPage);
@@ -392,7 +392,7 @@ class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame
public:
wxPreviewFrame(wxPrintPreviewBase *preview,
wxWindow *parent,
const wxString& title = _("Print Preview"),
const wxString& title = wxGetTranslation("Print Preview"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT,

View File

@@ -26,8 +26,8 @@ public:
const wxString& caption,
long style )
: wxGenericMessageDialog( parent, message, caption, style ),
m_detailsExpanderCollapsedLabel( _("&See details") ),
m_detailsExpanderExpandedLabel( _("&Hide details") ),
m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ),
m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ),
m_checkBoxValue( false )
{ }

View File

@@ -3520,7 +3520,7 @@ public:
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
virtual wxString GetPropertiesMenuLabel() const { return _("&Box"); }
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Box"); }
// Accessors
@@ -4645,7 +4645,7 @@ public:
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; }
@@ -5575,7 +5575,7 @@ public:
virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer);
virtual wxString GetPropertiesMenuLabel() const { return _("&Cell"); }
virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Cell"); }
// Accessors
@@ -5665,7 +5665,7 @@ public:
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
// is possible. For example, containers supporting text, such as a text box object, can accept the focus,

View File

@@ -36,7 +36,7 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
////@begin control identifiers
#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_SIZE wxSize(400, 300)
#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION wxDefaultPosition

View File

@@ -106,7 +106,7 @@ private:
class WXDLLIMPEXP_RICHTEXT wxRichTextPrintout : public wxPrintout
{
public:
wxRichTextPrintout(const wxString& title = _("Printout"));
wxRichTextPrintout(const wxString& title = wxGetTranslation("Printout"));
virtual ~wxRichTextPrintout();
/// The buffer to print
@@ -160,7 +160,7 @@ private:
class WXDLLIMPEXP_RICHTEXT wxRichTextPrinting : public wxObject
{
public:
wxRichTextPrinting(const wxString& name = _("Printing"), wxWindow *parentWindow = NULL);
wxRichTextPrinting(const wxString& name = wxGetTranslation("Printing"), wxWindow *parentWindow = NULL);
virtual ~wxRichTextPrinting();
/// Preview the file or buffer

View File

@@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxCheckBox;
////@begin control identifiers
#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_SIZE wxSize(400, 300)
#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION wxDefaultPosition

View File

@@ -44,7 +44,7 @@ public:
{
if ( pipe(m_fds) == -1 )
{
wxLogSysError(_("Pipe creation failed"));
wxLogSysError(wxGetTranslation("Pipe creation failed"));
return false;
}

View File

@@ -176,7 +176,7 @@ public:
if ( m_setter )
m_setter->Set( object, value );
else
wxLogError( _("SetProperty called w/o valid setter") );
wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
}
// Getting a simple property (non-collection)
@@ -185,7 +185,7 @@ public:
if ( m_getter )
m_getter->Get( object, result );
else
wxLogError( _("GetProperty called w/o valid getter") );
wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
}
// Adding an element to a collection property
@@ -194,7 +194,7 @@ public:
if ( m_adder )
m_adder->Add( object, value );
else
wxLogError( _("AddToPropertyCollection called w/o valid adder") );
wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
}
// Getting a collection property
@@ -203,7 +203,7 @@ public:
if ( m_collectionGetter )
m_collectionGetter->Get( obj, result);
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; }
@@ -256,14 +256,14 @@ public:
virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
const wxAny &WXUNUSED(value)) const
{
wxLogError( _("AddToPropertyCollection called on a generic accessor") );
wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
}
// Getting a collection property
virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
wxAnyList &WXUNUSED(result)) const
{
wxLogError ( _("GetPropertyCollection called on a generic accessor") );
wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
}
private: