]> git.saurik.com Git - wxWidgets.git/commitdiff
DP:
authorDenis Pershin <dyp@inetlab.com>
Sat, 8 Aug 1998 05:20:46 +0000 (05:20 +0000)
committerDenis Pershin <dyp@inetlab.com>
Sat, 8 Aug 1998 05:20:46 +0000 (05:20 +0000)
1. _() calls added where needed.
2. const added in params in postscrp.[h,cpp] in order to compile with
_().
3. Some .cvsignore added. (I did not found any .cvsignore in repository,
it is rather hard to compile something without them...)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

50 files changed:
include/wx/postscrp.h
install/unix/.cvsignore [new file with mode: 0644]
install/unix/setup/.cvsignore [new file with mode: 0644]
src/common/date.cpp
src/common/docview.cpp
src/common/dynarray.cpp
src/common/file.cpp
src/common/fileconf.cpp
src/common/filefn.cpp
src/common/intl.cpp
src/common/layout.cpp
src/common/list.cpp
src/common/log.cpp
src/common/postscrp.cpp
src/common/prntbase.cpp
src/common/resource.cpp
src/common/string.cpp
src/common/textfile.cpp
src/common/time.cpp
src/common/valtext.cpp
src/common/zstream.cpp
src/generic/colrdlgg.cpp
src/generic/fontdlgg.cpp
src/generic/listctrl.cpp
src/generic/printps.cpp
src/generic/prntdlgg.cpp
src/generic/tabg.cpp
src/generic/treectrl.cpp
src/gtk/app.cpp
src/gtk/combobox.cpp
src/gtk/dnd.cpp
src/gtk/filedlg.cpp
src/gtk/listbox.cpp
src/gtk/mdi.cpp
src/gtk/menu.cpp
src/gtk/notebook.cpp
src/gtk/tbargtk.cpp
src/gtk/textctrl.cpp
src/gtk/window.cpp
src/gtk1/app.cpp
src/gtk1/combobox.cpp
src/gtk1/dnd.cpp
src/gtk1/filedlg.cpp
src/gtk1/listbox.cpp
src/gtk1/mdi.cpp
src/gtk1/menu.cpp
src/gtk1/notebook.cpp
src/gtk1/tbargtk.cpp
src/gtk1/textctrl.cpp
src/gtk1/window.cpp

index 3c8a2e39afee251b78481828482938eb7231f482..fb6cc90850f7be9ec57517e0ce405a0246697ab8 100644 (file)
@@ -171,15 +171,15 @@ enum {
 };// ps_action = PS_PREVIEW;
 
 // PostScript printer settings
-void WXDLLEXPORT wxSetPrinterCommand(char *cmd);
-void WXDLLEXPORT wxSetPrintPreviewCommand(char *cmd);
-void WXDLLEXPORT wxSetPrinterOptions(char *flags);
+void WXDLLEXPORT wxSetPrinterCommand(const char *cmd);
+void WXDLLEXPORT wxSetPrintPreviewCommand(const char *cmd);
+void WXDLLEXPORT wxSetPrinterOptions(const char *flags);
 void WXDLLEXPORT wxSetPrinterOrientation(int orientation);
 void WXDLLEXPORT wxSetPrinterScaling(double x, double y);
 void WXDLLEXPORT wxSetPrinterTranslation(long x, long y);
 void WXDLLEXPORT wxSetPrinterMode(int mode);
-void WXDLLEXPORT wxSetPrinterFile(char *f);
-void WXDLLEXPORT wxSetAFMPath(char *f);
+void WXDLLEXPORT wxSetPrinterFile(const char *f);
+void WXDLLEXPORT wxSetAFMPath(const char *f);
 
 // Get current values
 char* WXDLLEXPORT wxGetPrinterCommand(void);
@@ -220,17 +220,17 @@ class WXDLLEXPORT wxPrintSetupData: public wxObject
   wxPrintSetupData(void);
   ~wxPrintSetupData(void);
 
-  void SetPrinterCommand(char *cmd);
-  void SetPaperName(char *paper);
-  void SetPrintPreviewCommand(char *cmd);
-  void SetPrinterOptions(char *flags);
-  void SetPrinterFile(char *f);
+  void SetPrinterCommand(const char *cmd);
+  void SetPaperName(const char *paper);
+  void SetPrintPreviewCommand(const char *cmd);
+  void SetPrinterOptions(const char *flags);
+  void SetPrinterFile(const char *f);
   void SetPrinterOrientation(int orient);
   void SetPrinterScaling(double x, double y);
   void SetPrinterTranslation(long x, long y);
   // 1 = Preview, 2 = print to file, 3 = send to printer
   void SetPrinterMode(int mode);
-  void SetAFMPath(char *f);
+  void SetAFMPath(const char *f);
   void SetColour(bool col);
 
   // Get current values
@@ -268,7 +268,7 @@ class WXDLLEXPORT wxPrintPaperType: public wxObject
   int heightPixels;
   char *pageName;
 
-  wxPrintPaperType(char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
+  wxPrintPaperType(const char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
   ~wxPrintPaperType(void);
 };
 
@@ -283,7 +283,7 @@ class WXDLLEXPORT wxPrintPaperDatabase: public wxList
   void CreateDatabase(void);
   void ClearDatabase(void);
 
-  void AddPaperType(char *name, int wmm, int hmm, int wp, int hp);
+  void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
   wxPrintPaperType *FindPaperType(const char *name);
 };
 
diff --git a/install/unix/.cvsignore b/install/unix/.cvsignore
new file mode 100644 (file)
index 0000000..1374b6d
--- /dev/null
@@ -0,0 +1,5 @@
+configure
+config.cache
+config.status
+Linux.system.cache
+system.list
diff --git a/install/unix/setup/.cvsignore b/install/unix/setup/.cvsignore
new file mode 100644 (file)
index 0000000..ad577e1
--- /dev/null
@@ -0,0 +1,2 @@
+setup.h
+substit
index 158aca78c8af65e81044bd9779d91c0cd728ae10..441a8c7e253d022f533f056da40074fbbea33a21 100644 (file)
@@ -31,6 +31,7 @@
 #if USE_TIMEDATE
 
 #include "wx/date.h"
+#include <wx/intl.h>
 
 #include <stdio.h>
 #include <string.h>
 
 #define ABBR_LENGTH 3
 
-static const char *dayname[] = {"Sunday","Monday","Tuesday","Wednesday",
-          "Thursday","Friday","Saturday"} ;
+static const char *dayname[] = {
+  "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+};
 
-static const char *mname[] = {"January","February","March","April","May",
-          "June","July","August","September","October","November","December"};
+static const char *mname[] = {
+  "January", "February", "March", "April", "May", "June", "July", "August",
+  "September", "October", "November", "December"
+};
 
 static int GauDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
 
@@ -346,17 +350,17 @@ wxString wxDate::FormatDate (int type) const
        {
                case wxDAY:
                        if ( (day_of_week < 1) || (day_of_week > 7) )
-                               strcpy(buf,"invalid day");
+                               strcpy(buf, _("invalid day"));
                        else
-                               strncpy( buf, dayname[day_of_week-1],
+                               strncpy( buf, _(dayname[day_of_week-1]),
                                        (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
                        return wxString(buf);
 
                case wxMONTH:
                        if ( (month < 1) || (month > 12) )
-                               strcpy(buf,"invalid month");
+                               strcpy(buf, _("invalid month"));
                        else
-                               strncpy( buf, mname[month-1],
+                               strncpy( buf, _(mname[month-1]),
                                        (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
                        return wxString(buf);
 
@@ -364,39 +368,39 @@ wxString wxDate::FormatDate (int type) const
                        if ( (month < 1) || (month > 12) || (day_of_week < 0) ||
                                 (day_of_week > 7) )
                        {
-                               strcpy(buf,"invalid date");
+                               strcpy(buf, _("invalid date"));
                                return wxString(buf);
                        }
-                       strncpy( buf, dayname[day_of_week-1],
+                       strncpy( buf, _(dayname[day_of_week-1]),
                                (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
                        strcat( buf, ", ");
-                       strncat( buf, mname[month-1],
+                       strncat( buf, _(mname[month-1]),
                                (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
                        strcat( buf, " ");
                        sprintf( buf+strlen(buf), "%d, %d", day, abs(year) );
                        if (year < 0)
-                               strcat(buf," B.C.");
+                               strcat(buf,_(" B.C."));
                        return wxString(buf);
 
                case wxEUROPEAN:
                        if ( (month < 1) || (month > 12) || (day_of_week < 0) ||
                                 (day_of_week > 7) )
                        {
-                               strcpy(buf,"invalid date");
+                               strcpy(buf, _("invalid date"));
                                return wxString(buf);
                        }
                        sprintf(buf,"%d ",      day);
-                       strncat(buf, mname[month-1],
+                       strncat(buf, _(mname[month-1]),
                                (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9);
                        sprintf( buf+strlen(buf), " %d", abs(year) );
                        if (year < 0)
-                               strcat(buf," B.C.");
+                               strcat(buf, _(" B.C."));
                        return wxString(buf);
 
                case wxMDY:
                default:
                        if (day==0 || month==0 || year==0)
-                               strcpy(buf,"invalid date");
+                               strcpy(buf, _("invalid date"));
                        else
                                sprintf( buf+strlen(buf), "%1d/%1d/%02d", month, day,
                                        (DisplayOptions & wxNO_CENTURY) && (abs(year) > 1899)
index 876c51c9cb21cf806fb38ca0e2f74dda699ae0be..bcf1f64bb3055788a48e65a1ba1a7620d5d35e8e 100644 (file)
@@ -34,6 +34,7 @@
 #include "wx/menu.h"
 #include "wx/list.h"
 #include "wx/filedlg.h"
+#include <wx/intl.h>
 #endif
 
 #ifdef __WXGTK__
@@ -194,7 +195,7 @@ bool wxDocument::SaveAs(void)
   if (!docTemplate)
     return FALSE;
   
-  char *tmp = wxFileSelector("Save as", docTemplate->GetDirectory(), GetFilename(),
+  char *tmp = wxFileSelector(_("Save as"), docTemplate->GetDirectory(), GetFilename(),
     docTemplate->GetDefaultExtension(), docTemplate->GetFileFilter(),
     wxSAVE|wxOVERWRITE_PROMPT, GetDocumentWindow());
     
@@ -240,19 +241,19 @@ bool wxDocument::OnSaveDocument(const wxString& file)
   if (wxTheApp->GetAppName() != "")
     msgTitle = wxTheApp->GetAppName();
   else
-    msgTitle = wxString("File error");
+    msgTitle = wxString(_("File error"));
 
   ofstream store(file);
   if (store.fail() || store.bad())
   {
-    (void)wxMessageBox("Sorry, could not open this file for saving.", msgTitle, wxOK | wxICON_EXCLAMATION,
+    (void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
       GetDocumentWindow());
     // Saving error
     return FALSE;
   }
   if (SaveObject(store)==FALSE)
   {
-    (void)wxMessageBox("Sorry, could not save this file.", msgTitle, wxOK | wxICON_EXCLAMATION,
+    (void)wxMessageBox(_("Sorry, could not save this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
       GetDocumentWindow());
     // Saving error
     return FALSE;
@@ -271,18 +272,18 @@ bool wxDocument::OnOpenDocument(const wxString& file)
   if (wxTheApp->GetAppName() != "")
     msgTitle = wxTheApp->GetAppName();
   else
-    msgTitle = wxString("File error");
+    msgTitle = wxString(_("File error"));
 
   ifstream store(file);
   if (store.fail() || store.bad())
   {
-    (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
+    (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
      GetDocumentWindow());
     return FALSE;
   }
   if (LoadObject(store)==FALSE)
   {
-    (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
+    (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
       GetDocumentWindow());
     return FALSE;
   }
@@ -329,7 +330,7 @@ bool wxDocument::GetPrintableName(wxString& buf) const
   }
   else
   {
-    buf = "unnamed";
+    buf = _("unnamed");
     return TRUE;
   }
 }
@@ -361,9 +362,9 @@ bool wxDocument::OnSaveModified(void)
     if (wxTheApp->GetAppName() != "")
       msgTitle = wxTheApp->GetAppName();
     else
-      msgTitle = wxString("Warning");
+      msgTitle = wxString(_("Warning"));
 
-    sprintf(buf, "Do you want to save changes to document %s?", (const char *)title);
+    sprintf(buf, _("Do you want to save changes to document %s?"), (const char *)title);
     int res = wxMessageBox(buf, msgTitle, wxYES_NO|wxCANCEL|wxICON_QUESTION,
       GetDocumentWindow());
     if (res == wxNO)
@@ -802,7 +803,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
 #endif
        preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout());
 
-    wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), "Print Preview",
+    wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), _("Print Preview"),
                wxPoint(100, 100), wxSize(600, 650));
     frame->Centre(wxBOTH);
     frame->Initialize();
@@ -1027,7 +1028,7 @@ wxDocument *wxDocManager::GetCurrentDocument(void) const
 bool wxDocManager::MakeDefaultName(wxString& name)
 {
   char buf[256];
-  sprintf(buf, "unnamed%d", m_defaultDocumentNameCounter);
+  sprintf(buf, _("unnamed%d"), m_defaultDocumentNameCounter);
   m_defaultDocumentNameCounter ++;
   name = buf;
   return TRUE;
@@ -1161,7 +1162,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
     // Omit final "|"
     descrBuf[len-1] = 0;
 
-  char *pathTmp = wxFileSelector("Select a file", "", "", "", descrBuf, 0, wxTheApp->GetTopWindow());
+  char *pathTmp = wxFileSelector(_("Select a file"), "", "", "", descrBuf, 0, wxTheApp->GetTopWindow());
   delete[] descrBuf;
   if (pathTmp)
   {
@@ -1190,7 +1191,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
   if (!temp)
     return NULL;
 
-  char *pathTmp = wxFileSelector("Select a file", "", "",
+  char *pathTmp = wxFileSelector(_("Select a file"), "", "",
      temp->GetDefaultExtension(),
      temp->GetFileFilter(),
      0, wxTheApp->GetTopWindow());
@@ -1235,7 +1236,7 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
     return temp;
   }
   
-  wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData("Select a document template", "Templates", n,
+  wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n,
     strings, data);
   delete[] strings;
   delete[] data;
@@ -1258,7 +1259,7 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
       n ++;
     }
   }
-  wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData("Select a document view", "Views", n,
+  wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n,
     strings, data);
   delete[] strings;
   delete[] data;
@@ -1630,12 +1631,12 @@ void wxCommandProcessor::SetMenuStrings(void)
     {
       wxCommand *command = (wxCommand *)m_currentCommand->Data();
       wxString commandName(command->GetName());
-      if (commandName == "") commandName = "Unnamed command";
+      if (commandName == "") commandName = _("Unnamed command");
       bool canUndo = command->CanUndo();
       if (canUndo)
-        buf = wxString("&Undo ") + commandName;
+        buf = wxString(_("&Undo ")) + commandName;
       else
-        buf = wxString("Can't &Undo ") + commandName;
+        buf = wxString(_("Can't &Undo ")) + commandName;
         
       m_commandEditMenu->SetLabel(wxID_UNDO, buf);
       m_commandEditMenu->Enable(wxID_UNDO, canUndo);
@@ -1645,25 +1646,25 @@ void wxCommandProcessor::SetMenuStrings(void)
       {
         wxCommand *redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
         wxString redoCommandName(redoCommand->GetName());
-        if (redoCommandName == "") redoCommandName = "Unnamed command";
-        buf = wxString("&Redo ") + redoCommandName;
+        if (redoCommandName == "") redoCommandName = _("Unnamed command");
+        buf = wxString(_("&Redo ")) + redoCommandName;
         m_commandEditMenu->SetLabel(wxID_REDO, buf);
         m_commandEditMenu->Enable(wxID_REDO, TRUE);
       }
       else
       {
-        m_commandEditMenu->SetLabel(wxID_REDO, "&Redo");
+        m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo"));
         m_commandEditMenu->Enable(wxID_REDO, FALSE);
       }
     }
     else
     {
-      m_commandEditMenu->SetLabel(wxID_UNDO, "&Undo");
+      m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo"));
       m_commandEditMenu->Enable(wxID_UNDO, FALSE);
 
       if (m_commands.Number() == 0)
       {
-        m_commandEditMenu->SetLabel(wxID_REDO, "&Redo");
+        m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo"));
         m_commandEditMenu->Enable(wxID_REDO, FALSE);
       }
       else
@@ -1672,8 +1673,8 @@ void wxCommandProcessor::SetMenuStrings(void)
         // we've undone to the start of the list, but can redo the first.
         wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data();
         wxString redoCommandName(redoCommand->GetName());
-        if (!redoCommandName) redoCommandName = "Unnamed command";
-        buf = wxString("&Redo ") + redoCommandName;
+        if (!redoCommandName) redoCommandName = _("Unnamed command");
+        buf = wxString(_("&Redo ")) + redoCommandName;
         m_commandEditMenu->SetLabel(wxID_REDO, buf);
         m_commandEditMenu->Enable(wxID_REDO, TRUE);
       }
@@ -1743,7 +1744,7 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
   {
     if (m_fileHistoryN == 0)
       m_fileMenu->AppendSeparator();
-    m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, "[EMPTY]");
+    m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
     m_fileHistoryN ++;
   }
   // Shuffle filenames down
index db5396e0ad28bd5a8096c719572f7952810bd768..40ada21b23988c2c63758363feb936696363c136 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 
 #include "wx/dynarray.h"
+#include <wx/intl.h>
 
 #include <stdlib.h>
 #include <string.h> // for memmove
@@ -227,7 +228,7 @@ void wxBaseArray::Add(long lItem, CMPFUNC fnCompare)
 // add item at the given position
 void wxBaseArray::Insert(long lItem, uint uiIndex)
 {
-  wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Insert" );
+  wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Insert") );
 
   Grow();
 
@@ -240,7 +241,7 @@ void wxBaseArray::Insert(long lItem, uint uiIndex)
 // removes item from array (by index)
 void wxBaseArray::Remove(uint uiIndex)
 {
-  wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Remove" );
+  wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Remove") );
 
   memmove(&m_pItems[uiIndex], &m_pItems[uiIndex + 1],
           (m_uiCount - uiIndex - 1)*sizeof(long));
@@ -253,7 +254,7 @@ void wxBaseArray::Remove(long lItem)
   int iIndex = Index(lItem);
 
   wxCHECK_RET( iIndex != NOT_FOUND,
-               "removing inexistent item in wxArray::Remove" );
+               _("removing inexistent item in wxArray::Remove") );
 
   Remove((uint)iIndex);
 }
index 1e3734b5d6d6c5e4fdf8267a6c3d77af12e067a7..1cdd2bd0fcaa1ce5eb92673dea9a9e7efad91783 100644 (file)
@@ -146,7 +146,7 @@ bool wxFile::Create(const char *szFileName, bool bOverwrite, int access)
   int fd = open(szFileName, O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access);
 
   if ( fd == -1 ) {
-    wxLogSysError("can't create file '%s'", szFileName);
+    wxLogSysError(_("can't create file '%s'"), szFileName);
     return FALSE;
   }
   else {
@@ -181,7 +181,7 @@ bool wxFile::Open(const char *szFileName, OpenMode mode, int access)
   int fd = open(szFileName, flags, access);
 
   if ( fd == -1 ) {
-    wxLogSysError("can't open file '%s'", szFileName);
+    wxLogSysError(_("can't open file '%s'"), szFileName);
     return FALSE;
   }
   else {
@@ -195,7 +195,7 @@ bool wxFile::Close()
 {
   if ( IsOpened() ) {
     if ( close(m_fd) == -1 ) {
-      wxLogSysError("can't close file descriptor %d", m_fd);
+      wxLogSysError(_("can't close file descriptor %d"), m_fd);
       m_fd = fd_invalid;
       return FALSE;
     }
@@ -217,7 +217,7 @@ off_t wxFile::Read(void *pBuf, off_t nCount)
 
   int iRc = ::read(m_fd, pBuf, nCount);
   if ( iRc == -1 ) {
-    wxLogSysError("can't read from file descriptor %d", m_fd);
+    wxLogSysError(_("can't read from file descriptor %d"), m_fd);
     return wxInvalidOffset;
   }
   else
@@ -231,7 +231,7 @@ uint wxFile::Write(const void *pBuf, uint nCount)
 
   int iRc = ::write(m_fd, pBuf, nCount);
   if ( iRc == -1 ) {
-    wxLogSysError("can't write to file descriptor %d", m_fd);
+    wxLogSysError(_("can't write to file descriptor %d"), m_fd);
     m_error = TRUE;
     return 0;
   }
@@ -246,7 +246,7 @@ bool wxFile::Flush()
                // @@@ fsync() is not ANSI (BSDish)
 //    if ( fsync(m_fd) == -1 ) { // TODO
       if (TRUE) {
-      wxLogSysError("can't flush file descriptor %d", m_fd);
+      wxLogSysError(_("can't flush file descriptor %d"), m_fd);
       return FALSE;
     }
   }
@@ -278,12 +278,12 @@ off_t wxFile::Seek(off_t ofs, wxSeekMode mode)
       break;
 
     default:
-      wxFAIL_MSG("unknown seek origin");
+      wxFAIL_MSG(_("unknown seek origin"));
   }
 
   int iRc = lseek(m_fd, ofs, flag);
   if ( iRc == -1 ) {
-    wxLogSysError("can't seek on file descriptor %d", m_fd);
+    wxLogSysError(_("can't seek on file descriptor %d"), m_fd);
     return wxInvalidOffset;
   }
   else
@@ -297,7 +297,7 @@ off_t wxFile::Tell() const
 
   int iRc = tell(m_fd);
   if ( iRc == -1 ) {
-    wxLogSysError("can't get seek position on file descriptor %d", m_fd);
+    wxLogSysError(_("can't get seek position on file descriptor %d"), m_fd);
     return wxInvalidOffset;
   }
   else
@@ -330,7 +330,7 @@ off_t wxFile::Length() const
   #endif  //_MSC_VER
 
   if ( iRc == -1 ) {
-    wxLogSysError("can't find length of file on file descriptor %d", m_fd);
+    wxLogSysError(_("can't find length of file on file descriptor %d"), m_fd);
     return wxInvalidOffset;
   }
   else
@@ -364,12 +364,12 @@ bool wxFile::Eof() const
       return FALSE;
 
     case -1:
-      wxLogSysError("can't determine if the end of file is reached on "
-                    "descriptor %d", m_fd);
+      wxLogSysError(_("can't determine if the end of file is reached on \
+descriptor %d"), m_fd);
       break;
 
     default:
-      wxFAIL_MSG("invalid eof() return value.");
+      wxFAIL_MSG(_("invalid eof() return value."));
   }
 
   return TRUE;
@@ -432,12 +432,12 @@ bool wxTempFile::Commit()
   m_file.Close();
 
   if ( wxFile::Exists(m_strName) && remove(m_strName) != 0 ) {
-    wxLogSysError("can't remove file '%s'", m_strName.c_str());
+    wxLogSysError(_("can't remove file '%s'"), m_strName.c_str());
     return FALSE;
   }
 
   if ( rename(m_strTemp, m_strName) != 0 ) {
-    wxLogSysError("can't commit changes to file '%s'", m_strName.c_str());
+    wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str());
     return FALSE;
   }
 
@@ -448,5 +448,5 @@ void wxTempFile::Discard()
 {
   m_file.Close();
   if ( remove(m_strTemp) != 0 )
-    wxLogSysError("can't remove temporary file '%s'", m_strTemp.c_str());
+    wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str());
 }
index 7cc86f423d7e151bf5bd30c6fe887eed8319b02d..24d10b9833054977f866c2928537af6b676d4334 100644 (file)
@@ -572,7 +572,7 @@ bool wxFileConfig::Write(const char *szKey, const char *szValue)
   wxString strName = path.Name();
   if ( strName.IsEmpty() ) {
     // setting the value of a group is an error
-    wxASSERT_MSG( IsEmpty(szValue), "can't set value of a group!" );
+    wxASSERT_MSG( IsEmpty(szValue), _("can't set value of a group!") );
 
     // ... except if it's empty in which case it's a way to force it's creation
     m_pCurrentGroup->SetDirty();
index 793407485233ae5df8677a48df633bd9247426d4..90b49c111d04b1ac6dd5cf708f972a910db11f56 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 #include <ctype.h>
 #include <stdio.h>
@@ -960,7 +961,7 @@ char *wxGetTempFileName(const wxString& prefix, char *buf)
          return buf;
        }
     }
-  cerr << "wxWindows: error finding temporary file name.\n";
+  cerr << _("wxWindows: error finding temporary file name.\n");
   if (buf) buf[0] = 0;
   return NULL;
 #endif
@@ -1304,7 +1305,7 @@ bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile)
 {
   // we assume that it's not empty
   wxCHECK_MSG( !IsEmpty(pszFile), FALSE, 
-               "empty file name in wxFindFileInPath");
+               _("empty file name in wxFindFileInPath"));
 
   // skip path separator in the beginning of the file name if present
   if ( wxIsPathSeparator(*pszFile) )
@@ -1339,7 +1340,7 @@ void WXDLLEXPORT wxSplitPath(const char *pszFileName,
                              wxString *pstrName,
                              wxString *pstrExt)
 {
-  wxCHECK_RET( pszFileName, "NULL file name in wxSplitPath" );
+  wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") );
 
   const char *pDot = strrchr(pszFileName, FILE_SEP_EXT);
   const char *pSepUnix = strrchr(pszFileName, FILE_SEP_PATH_UNIX);
index a0df0794d6e523819268b8d79df799f97c278da4..8943f155186d9076f651b5009886591f0ba8c570 100644 (file)
@@ -243,17 +243,17 @@ bool wxMsgCatalog::Load(const char *szDirPrefix, const char *szName)
   // (we're using an object because we have several return paths)
   NoTransErr noTransErr;
 
-  wxLogVerbose("looking for catalog '%s' in path '%s'.",
+  wxLogVerbose(_("looking for catalog '%s' in path '%s'."),
              szName, strPath.c_str());
 
   wxString strFullName;
   if ( !wxFindFileInPath(&strFullName, strPath, strFile) ) {
-    wxLogWarning("catalog file for domain '%s' not found.", szName);
+    wxLogWarning(_("catalog file for domain '%s' not found."), szName);
     return FALSE;
   }
 
   // open file
-  wxLogVerbose("using catalog '%s' from '%s'.",
+  wxLogVerbose(_("using catalog '%s' from '%s'."),
              szName, strFullName.c_str());
   
   wxFile fileMsg(strFullName);
@@ -288,7 +288,7 @@ bool wxMsgCatalog::Load(const char *szDirPrefix, const char *szName)
   
   if ( !bValid ) {
     // it's either too short or has incorrect magic number
-    wxLogWarning("'%s' is not a valid message catalog.", strFullName.c_str());
+    wxLogWarning(_("'%s' is not a valid message catalog."), strFullName.c_str());
     
     wxDELETEA(m_pData);
     return FALSE;
@@ -381,7 +381,7 @@ bool wxLocale::Init(const char *szName,
     szLocale = szName;
   m_pszOldLocale = setlocale(LC_ALL, szLocale);
   if ( m_pszOldLocale == NULL )
-    wxLogError("locale '%s' can not be set.", szLocale);
+    wxLogError(_("locale '%s' can not be set."), szLocale);
 
   // the short name will be used to look for catalog files as well,
   // so we need something here
@@ -451,10 +451,10 @@ const char *wxLocale::GetString(const char *szOrigString,
       wxSuppressTransErrors();
       
       if ( szDomain != NULL )
-        wxLogWarning("string '%s' not found in domain '%s' for locale '%s'.",
+        wxLogWarning(_("string '%s' not found in domain '%s' for locale '%s'."),
                     szOrigString, szDomain, m_strLocale.c_str());
       else
-        wxLogWarning("string '%s' not found in locale '%s'.",
+        wxLogWarning(_("string '%s' not found in locale '%s'."),
                    szOrigString, m_strLocale.c_str());
     }
 
index 3ac377c21bdbf16e7bb477a53f4a15cc45702377..ab4aee570a2b835714daba6d94b6d4b55c99e9aa 100644 (file)
@@ -29,6 +29,7 @@
 #include "wx/utils.h"
 #include "wx/dialog.h"
 #include "wx/msgdlg.h"
+#include <wx/intl.h>
 #endif
 
 #include "wx/layout.h"
@@ -1098,7 +1099,7 @@ bool wxOldDoLayout(wxWindow *win)
   // failed, so we can print a specific diagnostic message.
   if (noFailures > 0)
   {
-    wxDebugMsg("wxWindow::Layout() failed.\n");
+    wxDebugMsg(_("wxWindow::Layout() failed.\n"));
   }
 */
   // Now set the sizes and positions of the children, and
@@ -1341,7 +1342,7 @@ bool wxSizer::LayoutPhase1(int *noChanges)
     {
       if (!m_sizerParent)
       {
-        wxMessageBox("wxExpandSizer has no parent!", "Sizer error", wxOK);
+        wxMessageBox(_("wxExpandSizer has no parent!"), _("Sizer error"), wxOK);
         return TRUE;
       }
 
index c36e7f79539942e6c42140c4e3687be9944c1d41..8622d286bc0f25cbbfc084cdc7f9cb2b12cc65b1 100644 (file)
@@ -24,6 +24,7 @@
 #include "wx/defs.h"
 #include "wx/list.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 #endif
 
 // Sun CC compatibility (interference with xview/pkg.h, apparently...)
@@ -252,7 +253,7 @@ wxNode *wxList::Find (const char *key) const
   {
       if (!current->key.string)
        {
-         wxFatalError ("wxList: string key not present, probably did not Append correctly!");
+         wxFatalError (_("wxList: string key not present, probably did not Append correctly!"));
          break;
        }
       if (strcmp (current->key.string, key) == 0)
index 4eb067ff362370feea83904fcb761da43e6745f0..d319ce666b4312731c7a79ac13020ab9833b86c0 100644 (file)
@@ -307,13 +307,13 @@ void wxLog::DoLog(wxLogLevel level, const char *szString)
       break;
 
     default:
-      wxFAIL_MSG("unknown log level in wxLog::DoLog");
+      wxFAIL_MSG(_("unknown log level in wxLog::DoLog"));
   }
 }
 
 void wxLog::DoLogString(const char *WXUNUSED(szString))
 {
-  wxFAIL_MSG("DoLogString must be overrided if it's called.");
+  wxFAIL_MSG(_("DoLogString must be overrided if it's called."));
 }
 
 void wxLog::Flush()
@@ -483,7 +483,7 @@ void wxLogGui::DoLog(wxLogLevel level, const char *szString)
       break;
 
     default:
-      wxFAIL_MSG("unknown log level in wxLogGui::DoLog");
+      wxFAIL_MSG(_("unknown log level in wxLogGui::DoLog"));
   }
 }
 
@@ -552,11 +552,11 @@ wxLogFrame::wxLogFrame(const char *szTitle)
   // create menu
   wxMenuBar *pMenuBar = new wxMenuBar;
   wxMenu *pMenu = new wxMenu;
-  pMenu->Append(Menu_Save,  "&Save...");
-  pMenu->Append(Menu_Clear, "C&lear");
+  pMenu->Append(Menu_Save,  _("&Save..."));
+  pMenu->Append(Menu_Clear, _("C&lear"));
   pMenu->AppendSeparator();
-  pMenu->Append(Menu_Close, "&Close");
-  pMenuBar->Append(pMenu, "&Log");
+  pMenu->Append(Menu_Close, _("&Close"));
+  pMenuBar->Append(pMenu, _("&Log"));
   SetMenuBar(pMenuBar);
 
   // @@ what about status bar? needed (for menu prompts)?
@@ -593,7 +593,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
     wxString strMsg;
     strMsg.Printf(_("Append log to file '%s' "
                     "(choosing [No] will overwrite it)?"), szFileName);
-    switch ( wxMessageBox(strMsg, "Question", wxYES_NO | wxCANCEL) ) {
+    switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) {
       case wxYES:
         bAppend = TRUE;
         break;
@@ -606,7 +606,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
         return;
 
       default:
-        wxFAIL_MSG("invalid message box return value");
+        wxFAIL_MSG(_("invalid message box return value"));
     }
 
     if ( bAppend ) {
@@ -624,7 +624,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
   // -------------------------
 #ifdef __WXGTK__
   // @@@@ TODO: no GetNumberOfLines and GetLineText in wxGTK yet
-  wxLogError("Sorry, this function is not implemented under GTK");
+  wxLogError(_("Sorry, this function is not implemented under GTK"));
 #else
   int nLines = m_pTextCtrl->GetNumberOfLines();
   for ( int nLine = 0; bOk && nLine < nLines; nLine++ ) {
index 815a981711fb63922cb082d2df725be42b48dcf9..28824e4d6311534bad844b7624af08be87a254c8 100644 (file)
@@ -234,7 +234,7 @@ wxPostScriptDC::~wxPostScriptDC (void)
 
 bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
 {
-  wxPostScriptPrintDialog dialog (parent, "Printer Settings", wxPoint(150, 150), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL);
+  wxPostScriptPrintDialog dialog (parent, _("Printer Settings"), wxPoint(150, 150), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL);
   m_ok = (dialog.ShowModal () == wxID_OK) ;
 
   if (!m_ok)
@@ -264,7 +264,7 @@ bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
     }
     else if ((m_filename == "") && (wxThePrintSetupData->GetPrinterMode() == PS_FILE))
     {
-      char *file = wxSaveFileSelector ("PostScript", "ps");
+      char *file = wxSaveFileSelector (_("PostScript"), "ps");
       if (!file)
       {
         m_ok = FALSE;
@@ -1985,11 +1985,11 @@ void wxPostScriptDC::GetSize(int* width, int* height) const
 {
   const char *paperType = wxThePrintSetupData->GetPaperName();
   if (!paperType)
-    paperType = "A4 210 x 297 mm";
+    paperType = _("A4 210 x 297 mm");
 
   wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
   if (!paper)
-    paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+    paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
   if (paper)
   {
     *width = paper->widthPixels;
@@ -2006,11 +2006,11 @@ void wxPostScriptDC::GetSizeMM(long *width, long *height) const
 {
   const char *paperType = wxThePrintSetupData->GetPaperName();
   if (!paperType)
-    paperType = "A4 210 x 297 mm";
+    paperType = _("A4 210 x 297 mm");
 
   wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
   if (!paper)
-    paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+    paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
   if (paper)
   {
     *width = paper->widthMM;
@@ -2053,15 +2053,15 @@ wxDialog(parent, -1, title, pos, size, style)
   (void) new wxStaticText(this, -1, _("Printer Command: "), wxPoint(5, yPos));
   wxTextCtrl *text_prt = new wxTextCtrl(this, wxID_PRINTER_COMMAND, wxThePrintSetupData->GetPrinterCommand(), wxPoint(100, yPos), wxSize(100, -1));
   
-  (void) new wxStaticText(this, -1, "Printer Options: ", wxPoint(210, yPos));
+  (void) new wxStaticText(this, -1, _("Printer Options: "), wxPoint(210, yPos));
   wxTextCtrl *text0 = new wxTextCtrl(this, wxID_PRINTER_OPTIONS, wxThePrintSetupData->GetPrinterOptions(), wxPoint(305, yPos), wxSize(150, -1));
 
   yPos += 40;
 #endif
 
   wxString orientation[2];
-  orientation[0] = "Portrait";
-  orientation[1] = "Landscape";
+  orientation[0] = _("Portrait");
+  orientation[1] = _("Landscape");
 
   wxRadioBox *radio0 = new wxRadioBox(this, wxID_PRINTER_ORIENTATION, "Orientation: ", wxPoint(5, yPos), wxSize(-1,-1),
                2,orientation,2,0);
@@ -2074,12 +2074,12 @@ wxDialog(parent, -1, title, pos, size, style)
   wxGetResource ("wxWindows", "PSView", &wxThePrintSetupData->previewCommand);
 
   wxString print_modes[3];
-  print_modes[0] = "Send to Printer";
-  print_modes[1] = "Print to File";
-  print_modes[2] = "Preview Only";
+  print_modes[0] = _("Send to Printer");
+  print_modes[1] = _("Print to File");
+  print_modes[2] = _("Preview Only");
 
   int features = (wxThePrintSetupData->GetPrintPreviewCommand() && *wxThePrintSetupData->GetPrintPreviewCommand()) ? 3 : 2;
-  wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, "PostScript:",
+  wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, _("PostScript:"),
     wxPoint(150, yPos), wxSize(-1,-1), features, print_modes, features, 0);
 
 #ifdef __WXMSW__
@@ -2099,20 +2099,20 @@ wxDialog(parent, -1, title, pos, size, style)
 
   yPos += 90;
 
-  (void) new wxStaticText(this, -1, "X Scaling", wxPoint(5, yPos));
+  (void) new wxStaticText(this, -1, _("X Scaling"), wxPoint(5, yPos));
   /* wxTextCtrl *text1 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_SCALE, buf, wxPoint(100, yPos), wxSize(100, -1));
 
   sprintf (buf, "%.2f", wx_printer_scale_y);
-  (void) new wxStaticText(this, -1, "Y Scaling", wxPoint(220, yPos));
+  (void) new wxStaticText(this, -1, _("Y Scaling"), wxPoint(220, yPos));
   /* wxTextCtrl *text2 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_SCALE, buf, wxPoint(320, yPos), wxSize(100, -1));
 
   yPos += 25;
 
-  (void) new wxStaticText(this, -1, "X Translation", wxPoint(5, yPos));
+  (void) new wxStaticText(this, -1, _("X Translation"), wxPoint(5, yPos));
   sprintf (buf, "%.2ld", wx_printer_translate_x);
   /* wxTextCtrl *text3 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_TRANS, buf, wxPoint(100, yPos), wxSize(100, -1));
 
-  (void) new wxStaticText(this, -1, "Y Translation", wxPoint(220, yPos));
+  (void) new wxStaticText(this, -1, _("Y Translation"), wxPoint(220, yPos));
   sprintf (buf, "%.2ld", wx_printer_translate_y);
   /* wxTextCtrl *text4 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_TRANS, buf, wxPoint(320, yPos), wxSize(100, -1));
 
@@ -2159,22 +2159,22 @@ int wxPostScriptPrintDialog::ShowModal (void)
 
 // PostScript printer settings
 // RETAINED FOR BACKWARD COMPATIBILITY
-void wxSetPrinterCommand(char *cmd)
+void wxSetPrinterCommand(const char *cmd)
 {
   wxThePrintSetupData->SetPrinterCommand(cmd);
 }
 
-void wxSetPrintPreviewCommand(char *cmd)
+void wxSetPrintPreviewCommand(const char *cmd)
 {
   wxThePrintSetupData->SetPrintPreviewCommand(cmd);
 }
 
-void wxSetPrinterOptions(char *flags)
+void wxSetPrinterOptions(const char *flags)
 {
   wxThePrintSetupData->SetPrinterOptions(flags);
 }
 
-void wxSetPrinterFile(char *f)
+void wxSetPrinterFile(const char *f)
 {
   wxThePrintSetupData->SetPrinterFile(f);
 }
@@ -2200,7 +2200,7 @@ void wxSetPrinterMode(int mode)
   wxThePrintSetupData->SetPrinterMode(mode);
 }
 
-void wxSetAFMPath(char *f)
+void wxSetAFMPath(const char *f)
 {
   wxThePrintSetupData->SetAFMPath(f);
 }
@@ -2289,7 +2289,7 @@ wxPrintSetupData::~wxPrintSetupData(void)
     delete[] printerFile;
 }
 
-void wxPrintSetupData::SetPrinterCommand(char *cmd)
+void wxPrintSetupData::SetPrinterCommand(const char *cmd)
 {
   if (cmd == printerCommand)
     return;
@@ -2302,7 +2302,7 @@ void wxPrintSetupData::SetPrinterCommand(char *cmd)
     printerCommand = NULL;
 }
 
-void wxPrintSetupData::SetPrintPreviewCommand(char *cmd)
+void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd)
 {
   if (cmd == previewCommand)
     return;
@@ -2315,7 +2315,7 @@ void wxPrintSetupData::SetPrintPreviewCommand(char *cmd)
     previewCommand = NULL;
 }
 
-void wxPrintSetupData::SetPaperName(char *name)
+void wxPrintSetupData::SetPaperName(const char *name)
 {
   if (name == paperName)
     return;
@@ -2328,7 +2328,7 @@ void wxPrintSetupData::SetPaperName(char *name)
     paperName = NULL;
 }
 
-void wxPrintSetupData::SetPrinterOptions(char *flags)
+void wxPrintSetupData::SetPrinterOptions(const char *flags)
 {
   if (printerFlags == flags)
     return;
@@ -2341,7 +2341,7 @@ void wxPrintSetupData::SetPrinterOptions(char *flags)
     printerFlags = NULL;
 }
 
-void wxPrintSetupData::SetPrinterFile(char *f)
+void wxPrintSetupData::SetPrinterFile(const char *f)
 {
   if (f == printerFile)
     return;
@@ -2377,7 +2377,7 @@ void wxPrintSetupData::SetPrinterMode(int mode)
   printerMode = mode;
 }
 
-void wxPrintSetupData::SetAFMPath(char *f)
+void wxPrintSetupData::SetAFMPath(const char *f)
 {
   if (f == afmPath)
     return;
@@ -2482,7 +2482,7 @@ void wxInitializePrintSetupData(bool init)
     wxThePrintSetupData->SetPrintPreviewCommand(PS_VIEWER_PROG);
     wxThePrintSetupData->SetPrinterOrientation(PS_PORTRAIT);
     wxThePrintSetupData->SetPrinterMode(PS_PREVIEW);
-    wxThePrintSetupData->SetPaperName("A4 210 x 297 mm");
+    wxThePrintSetupData->SetPaperName(_("A4 210 x 297 mm"));
 
     // Could have a .ini file to read in some defaults
     // - and/or use environment variables, e.g. WXWIN
@@ -2514,7 +2514,7 @@ void wxInitializePrintSetupData(bool init)
  * Paper size database for PostScript
  */
 
-wxPrintPaperType::wxPrintPaperType(char *name, int wmm, int hmm, int wp, int hp)
+wxPrintPaperType::wxPrintPaperType(const char *name, int wmm, int hmm, int wp, int hp)
 {
   widthMM = wmm;
   heightMM = hmm;
@@ -2549,10 +2549,10 @@ void wxPrintPaperDatabase::CreateDatabase(void)
   // Heck, someone will know how to make it hunky-dory...
   // JACS 25/5/95
   
-  AddPaperType("A4 210 x 297 mm", 210, 297,         595, 842);
-  AddPaperType("A3 297 x 420 mm", 297, 420,         842, 1191);
-  AddPaperType("Letter 8 1/2 x 11 in", 216, 279,    612, 791);
-  AddPaperType("Legal 8 1/2 x 14 in", 216, 356,     612, 1009);
+  AddPaperType(_("A4 210 x 297 mm"), 210, 297,         595, 842);
+  AddPaperType(_("A3 297 x 420 mm"), 297, 420,         842, 1191);
+  AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279,    612, 791);
+  AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356,     612, 1009);
 }
 
 void wxPrintPaperDatabase::ClearDatabase(void)
@@ -2560,7 +2560,7 @@ void wxPrintPaperDatabase::ClearDatabase(void)
   Clear();
 }
 
-void wxPrintPaperDatabase::AddPaperType(char *name, int wmm, int hmm, int wp, int hp)
+void wxPrintPaperDatabase::AddPaperType(const char *name, int wmm, int hmm, int wp, int hp)
 {
   Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
 }
index 9f0da1d25f2e9fe458d2bbbdfea57cb61fe3e75c..006d7e2f5708d05ed231182ad1f7ceb96ce51ecc 100644 (file)
@@ -141,7 +141,7 @@ wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSE
 
 void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), char *message)
 {
-  wxMessageBox(message, "Printing Error", wxOK, parent);
+  wxMessageBox(message, _("Printing Error"), wxOK, parent);
 }
 
 /*
@@ -171,7 +171,7 @@ wxPrintout::~wxPrintout(void)
 
 bool wxPrintout::OnBeginDocument(int WXUNUSED(startPage), int WXUNUSED(endPage))
 {
-  return GetDC()->StartDoc("Printing");
+  return GetDC()->StartDoc(_("Printing"));
 }
 
 void wxPrintout::OnEndDocument(void)
@@ -354,14 +354,14 @@ void wxPreviewControlBar::CreateButtons(void)
   int y = 5;
   int gap = 5;
 
-  closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, "Close",
+  closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, _("Close"),
        wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
 
   x += gap + buttonWidth;
   
   if (buttonFlags & wxPREVIEW_PRINT)
   {
-    printButton =  new wxButton(this, wxID_PREVIEW_PRINT, "Print...", wxPoint(x, y),
+    printButton =  new wxButton(this, wxID_PREVIEW_PRINT, _("Print..."), wxPoint(x, y),
                wxSize(buttonWidth, buttonHeight));
        x += gap + buttonWidth;
   }
@@ -660,8 +660,8 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
 
   if (!previewCanvas)
   {
-    wxMessageBox("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!",
-      "Print Preview Failure", wxOK);
+    wxMessageBox(_("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"),
+      _("Print Preview Failure"), wxOK);
     return FALSE;
   }
   previewCanvas->GetSize(&canvasWidth, &canvasHeight);
@@ -683,7 +683,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
     {
       if (previewBitmap)
         delete previewBitmap;
-      wxMessageBox("Sorry, not enough memory to create a preview.", "Print Preview Failure", wxOK);
+      wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
       return FALSE;
     }
   }
@@ -701,7 +701,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
 
   if (!previewPrintout->OnBeginDocument(printData.GetFromPage(), printData.GetToPage()))
   {
-    wxMessageBox("Could not start document preview.", "Print Preview Failure", wxOK);
+    wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK);
     
     memoryDC.SelectObject(wxNullBitmap);
 
@@ -720,9 +720,9 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
 
   char buf[200];
   if (maxPage != 0)
-    sprintf(buf, "Page %d of %d", pageNum, maxPage);
+    sprintf(buf, _("Page %d of %d"), pageNum, maxPage);
   else
-    sprintf(buf, "Page %d", pageNum);
+    sprintf(buf, _("Page %d"), pageNum);
 
   if (previewFrame)
     previewFrame->SetStatusText(buf);
index e2196354b9830885649b3d93d71de9f2b28c4d95..8009f0a15927abbe9a9807efec904b8c05d680ac 100644 (file)
@@ -99,7 +99,7 @@ void wxCleanUpResourceSystem(void)
 
 void wxWarning(char *msg)
 {
-  wxMessageBox(msg, "Warning", wxOK);
+  wxMessageBox(msg, _("Warning"), wxOK);
 }
 
 #if !USE_SHARED_LIBRARY
@@ -287,7 +287,7 @@ bool wxResourceTable::ParseResourceData(char *data)
   PrologDatabase db;
   if (!db.ReadPrologFromString(data))
   {
-    wxWarning("Ill-formed resource file syntax.");
+    wxWarning(_("Ill-formed resource file syntax."));
     return FALSE;
   }
 
@@ -794,7 +794,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
         if (id == 0)
         {
           char buf[300];
-                 sprintf(buf, "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)",
+                 sprintf(buf, _("Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"),
                  (const char*) expr1->StringValue());
           wxWarning(buf);
                  delete controlItem;
@@ -1209,7 +1209,7 @@ wxItemResource *wxResourceInterpretMenuItem(wxResourceTable& table, PrologExpr *
         if (id == 0)
         {
           char buf[300];
-         sprintf(buf, "Could not resolve menu id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)",
+         sprintf(buf, _("Could not resolve menu id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"),
                  (const char*) idExpr->StringValue());
           wxWarning(buf);
         }
@@ -1631,7 +1631,7 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
     else
     {
       char buf[300];
-      sprintf(buf, "#define %s must be an integer.", name);
+      sprintf(buf, _("#define %s must be an integer."), name);
       wxWarning(buf);
       delete[] name;
       delete[] value;
@@ -1655,7 +1655,7 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
     if (!wxResourceParseIncludeFile(actualName, table))
     {
       char buf[400];
-      sprintf(buf, "Could not find resource include file %s.", actualName);
+      sprintf(buf, _("Could not find resource include file %s."), actualName);
       wxWarning(buf);
     }
     delete[] name;
@@ -1664,9 +1664,9 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
   else if (strcmp(wxResourceBuffer, "static") != 0)
   {
     char buf[300];
-    strcpy(buf, "Found ");
+    strcpy(buf, _("Found "));
     strncat(buf, wxResourceBuffer, 30);
-    strcat(buf, ", expected static, #include or #define\nwhilst parsing resource.");
+    strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
     wxWarning(buf);
     return FALSE;
   }
@@ -1674,28 +1674,28 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
   // char
   if (!wxGetResourceToken(fd))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (strcmp(wxResourceBuffer, "char") != 0)
   {
-    wxWarning("Expected 'char' whilst parsing resource.");
+    wxWarning(_("Expected 'char' whilst parsing resource."));
     return FALSE;
   }
     
   // *name
   if (!wxGetResourceToken(fd))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (wxResourceBuffer[0] != '*')
   {
-    wxWarning("Expected '*' whilst parsing resource.");
+    wxWarning(_("Expected '*' whilst parsing resource."));
     return FALSE;
   }
   char nameBuf[100];
@@ -1704,21 +1704,21 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
   // =
   if (!wxGetResourceToken(fd))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (strcmp(wxResourceBuffer, "=") != 0)
   {
-    wxWarning("Expected '=' whilst parsing resource.");
+    wxWarning(_("Expected '=' whilst parsing resource."));
     return FALSE;
   }
 
   // String
   if (!wxGetResourceToken(fd))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
@@ -1727,7 +1727,7 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
     if (!db.ReadPrologFromString(wxResourceBuffer))
     {
       char buf[300];
-      sprintf(buf, "%s: ill-formed resource file syntax.", nameBuf);
+      sprintf(buf, _("%s: ill-formed resource file syntax."), nameBuf);
       wxWarning(buf);
       return FALSE;
     }
@@ -2060,7 +2060,7 @@ long wxParseWindowStyle(char *bitListString)
     if (!found)
     {
       char buf[200];
-      sprintf(buf, "Unrecognized style %s whilst parsing resource.", word);
+      sprintf(buf, _("Unrecognized style %s whilst parsing resource."), word);
       wxWarning(buf);
       return 0;
     }
@@ -2084,7 +2084,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
     if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0)
     {
       char buf[300];
-      sprintf(buf, "%s not a bitmap resource specification.", resource);
+      sprintf(buf, _("%s not a bitmap resource specification."), resource);
       wxWarning(buf);
       return NULL;
     }
@@ -2186,13 +2186,13 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
         if (!item)
         {
           char buf[400];
-          sprintf(buf, "Failed to find XBM resource %s.\nForgot to use wxResourceLoadBitmapData?", name);
+          sprintf(buf, _("Failed to find XBM resource %s.\nForgot to use wxResourceLoadBitmapData?"), name);
           wxWarning(buf);
           return NULL;
         }
         bitmap = new wxBitmap((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); 
 #else
-        wxWarning("No XBM facility available!");
+        wxWarning(_("No XBM facility available!"));
 #endif
         break;
       }
@@ -2203,13 +2203,13 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
         if (!item)
         {
           char buf[400];
-          sprintf(buf, "Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?", name);
+          sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?"), name);
           wxWarning(buf);
           return NULL;
         }
         bitmap = new wxBitmap(item->GetValue1());
 #else
-        wxWarning("No XPM facility available!");
+        wxWarning(_("No XPM facility available!"));
 #endif
         break;
       }
@@ -2235,7 +2235,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
   else
   {
     char buf[300];
-    sprintf(buf, "Bitmap resource specification %s not found.", resource);
+    sprintf(buf, _("Bitmap resource specification %s not found."), resource);
     wxWarning(buf);
     return NULL;
   }
@@ -2257,7 +2257,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
     if (!item->GetType() || strcmp(item->GetType(), "wxIcon") != 0)
     {
       char buf[300];
-      sprintf(buf, "%s not an icon resource specification.", resource);
+      sprintf(buf, _("%s not an icon resource specification."), resource);
       wxWarning(buf);
       return NULL;
     }
@@ -2359,13 +2359,13 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
         if (!item)
         {
           char buf[400];
-          sprintf(buf, "Failed to find XBM resource %s.\nForgot to use wxResourceLoadIconData?", name);
+          sprintf(buf, _("Failed to find XBM resource %s.\nForgot to use wxResourceLoadIconData?"), name);
           wxWarning(buf);
           return NULL;
         }
         icon = new wxIcon((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); 
 #else
-        wxWarning("No XBM facility available!");
+        wxWarning(_("No XBM facility available!"));
 #endif
         break;
       }
@@ -2378,16 +2378,16 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
         if (!item)
         {
           char buf[400];
-          sprintf(buf, "Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?", name);
+          sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?"), name);
           wxWarning(buf);
           return NULL;
         }
         icon = new wxIcon((char **)item->GetValue1());
 #else
-        wxWarning("No XPM facility available!");
+        wxWarning(_("No XPM facility available!"));
 #endif
 */
-        wxWarning("No XPM icon facility available!");
+        wxWarning(_("No XPM icon facility available!"));
         break;
       }
       default:
@@ -2412,7 +2412,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
   else
   {
     char buf[300];
-    sprintf(buf, "Icon resource specification %s not found.", resource);
+    sprintf(buf, _("Icon resource specification %s not found."), resource);
     wxWarning(buf);
     return NULL;
   }
@@ -2740,7 +2740,7 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
     else
     {
       char buf[300];
-      sprintf(buf, "#define %s must be an integer.", name);
+      sprintf(buf, _("#define %s must be an integer."), name);
       wxWarning(buf);
       delete[] name;
       delete[] value;
@@ -2765,7 +2765,7 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
     if (!wxResourceParseIncludeFile(actualName, table))
     {
       char buf[400];
-      sprintf(buf, "Could not find resource include file %s.", actualName);
+      sprintf(buf, _("Could not find resource include file %s."), actualName);
       wxWarning(buf);
     }
     delete[] name;
@@ -2775,9 +2775,9 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
   else if (strcmp(wxResourceBuffer, "static") != 0)
   {
     char buf[300];
-    strcpy(buf, "Found ");
+    strcpy(buf, _("Found "));
     strncat(buf, wxResourceBuffer, 30);
-    strcat(buf, ", expected static, #include or #define\nwhilst parsing resource.");
+    strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
     wxWarning(buf);
     return FALSE;
   }
@@ -2785,28 +2785,28 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
   // char
   if (!wxGetResourceTokenString(s))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (strcmp(wxResourceBuffer, "char") != 0)
   {
-    wxWarning("Expected 'char' whilst parsing resource.");
+    wxWarning(_("Expected 'char' whilst parsing resource."));
     return FALSE;
   }
     
   // *name
   if (!wxGetResourceTokenString(s))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (wxResourceBuffer[0] != '*')
   {
-    wxWarning("Expected '*' whilst parsing resource.");
+    wxWarning(_("Expected '*' whilst parsing resource."));
     return FALSE;
   }
   char nameBuf[100];
@@ -2815,21 +2815,21 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
   // =
   if (!wxGetResourceTokenString(s))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
 
   if (strcmp(wxResourceBuffer, "=") != 0)
   {
-    wxWarning("Expected '=' whilst parsing resource.");
+    wxWarning(_("Expected '=' whilst parsing resource."));
     return FALSE;
   }
 
   // String
   if (!wxGetResourceTokenString(s))
   {
-    wxWarning("Unexpected end of file whilst parsing resource.");
+    wxWarning(_("Unexpected end of file whilst parsing resource."));
     *eof = TRUE;
     return FALSE;
   }
@@ -2838,7 +2838,7 @@ bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxR
     if (!db.ReadPrologFromString(wxResourceBuffer))
     {
       char buf[300];
-      sprintf(buf, "%s: ill-formed resource file syntax.", nameBuf);
+      sprintf(buf, _("%s: ill-formed resource file syntax."), nameBuf);
       wxWarning(buf);
       return FALSE;
     }
index 7e6e2270d770356a230236d4399db6a24dc36b29..e52392bf89a455ecce0624e91fa5b2f50956f456 100644 (file)
@@ -34,6 +34,7 @@
 #ifndef WX_PRECOMP
 #include "wx/defs.h"
 #include "wx/string.h"
+#include <wx/intl.h>
 #endif
 
 #include <ctype.h>
@@ -1230,7 +1231,7 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex)
 {
   wxASSERT( str.GetStringData()->IsValid() );
 
-  wxCHECK_RET( nIndex <= m_nCount, "bad index in wxArrayString::Insert" );
+  wxCHECK_RET( nIndex <= m_nCount, ("bad index in wxArrayString::Insert") );
 
   Grow();
 
@@ -1246,7 +1247,7 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex)
 // removes item from array (by index)
 void wxArrayString::Remove(size_t nIndex)
 {
-  wxCHECK_RET( nIndex <= m_nCount, "bad index in wxArrayString::Remove" );
+  wxCHECK_RET( nIndex <= m_nCount, _("bad index in wxArrayString::Remove") );
 
   // release our lock
   Item(nIndex).GetStringData()->Unlock();
@@ -1262,7 +1263,7 @@ void wxArrayString::Remove(const char *sz)
   int iIndex = Index(sz);
 
   wxCHECK_RET( iIndex != NOT_FOUND,
-               "removing inexistent element in wxArrayString::Remove" );
+               _("removing inexistent element in wxArrayString::Remove") );
 
   Remove((size_t)iIndex);
 }
index 3f56c0f6fcd1cd33de2f41fd65612cd902260818..f52f9480a57f034b9b17a50f873b7b8a8339f874 100644 (file)
@@ -115,7 +115,7 @@ wxTextFile::Type wxTextFile::GuessType() const
       case Type_Unix: nUnix++; break;   \
       case Type_Dos:  nDos++;  break;   \
       case Type_Mac:  nMac++;  break;   \
-      default: wxFAIL_MSG("unknown line terminator"); \
+      default: wxFAIL_MSG(_("unknown line terminator")); \
     }
 
   uint n;
@@ -131,7 +131,7 @@ wxTextFile::Type wxTextFile::GuessType() const
   // interpret the results (@@ far from being even 50% fool proof)
   if ( nDos + nUnix + nMac == 0 ) {
     // no newlines at all
-    wxLogWarning("'%s' is probably a binary file.", m_strFile.c_str());
+    wxLogWarning(_("'%s' is probably a binary file."), m_strFile.c_str());
   }
   else {
     #define   GREATER_OF(t1, t2) n##t1 == n##t2 ? typeDefault               \
@@ -224,7 +224,7 @@ bool wxTextFile::Write(Type typeNew)
   wxTempFile fileTmp(m_strFile);
 
   if ( !fileTmp.IsOpened() ) {
-    wxLogError("can't write file '%s' to disk.", m_strFile.c_str());
+    wxLogError(_("can't write file '%s' to disk."), m_strFile.c_str());
     return FALSE;
   }
 
index 15936ad32376b275c7ebdea4d34333f885de7e20..01eed9a49520a61ed72303d133aa385ad2bde37d 100644 (file)
@@ -32,6 +32,7 @@ seconds since January 1, 1901, GMT.
 #include "wx/time.h"
 #include "wx/date.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 #if USE_IOSTREAMH
 #include <iostream.h>
@@ -141,7 +142,7 @@ wxTime::wxTime(const wxDate& date, hourTy h, minuteTy m, secondTy s, bool dst)
 /*
                 if (IsDST()) setError(NIHCL_BADTIME,DEFAULT,
                                                                date.dayOfMonth(),date.nameOfMonth(),date.year(),
-                                                               h,m,s,(dst?"DST":""));
+                                                               h,m,s,(dst?_("DST"):""));
 */
   }
   sec += TIME_ZONE;                               // adjust to GMT
@@ -313,9 +314,9 @@ char *wxTime::FormatTime() const {
 
        if (Format == wx12h)
                if (GetHour() <= 12)
-                       strcat(timeBuf,"am");
+                       strcat(timeBuf,_("am"));
                else
-                       strcat(timeBuf,"pm");
+                       strcat(timeBuf,_("pm"));
 
        return timeBuf;
 }
@@ -348,8 +349,8 @@ void wxTime::printOn(ostream& strm) const
         strm << ' ' << ((hh <= 12) ? hh : hh-12) << ':'
              << setfill('0') << setw(2) << GetMinute() << ':'
                                 << setfill('0') << setw(2) << GetSecond() << ' ';
-        if (hh < 12) strm << "am";
-        else strm << "pm";
+        if (hh < 12) strm << _("am");
+        else strm << _("pm");
 }
 
 wxTime::wxTime(OIOin& strm)
index 117efff3153876a13947bf8cf04833d846040b76..02162b7c850564cdd5fa8bf9a823a13ff72c8d1c 100644 (file)
@@ -132,8 +132,8 @@ bool wxTextValidator::Validate(wxWindow *parent)
                if ( !m_includeList.Member(val) )
                {
                        char buf[512];
-                       sprintf(buf, "%s is invalid.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s is invalid."), (const char *)val);
+                       wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
                }
        }
@@ -142,37 +142,37 @@ bool wxTextValidator::Validate(wxWindow *parent)
                if ( m_excludeList.Member(val) )
                {
                        char buf[512];
-                       sprintf(buf, "%s is invalid.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s is invalid."), (const char *)val);
+                       wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
                }
        }
        if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
        {
                        char buf[512];
-                       sprintf(buf, "%s should only contain ASCII characters.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s should only contain ASCII characters."), (const char *)val);
+                       wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
        }
        if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
        {
                        char buf[512];
-                       sprintf(buf, "%s should only contain alphabetic characters.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s should only contain alphabetic characters."), (const char *)val);
+                       wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
        }
        if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
        {
                        char buf[512];
-                       sprintf(buf, "%s should only contain alphabetic or numeric characters.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s should only contain alphabetic or numeric characters."), (const char *)val);
+                       wxMessageBox(buf,_("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
        }
        if ( (m_validatorStyle & wxFILTER_NUMERIC) && !val.IsNumber())
        {
                        char buf[512];
-                       sprintf(buf, "%s should be numeric.", (const char *)val);
-                       wxMessageBox(buf, "Validation conflict", wxOK | wxICON_EXCLAMATION, parent);
+                       sprintf(buf, _("%s should be numeric."), (const char *)val);
+                       wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
                        return FALSE;
        }
 
index dc4596f837ff2b925d1780edb4e2e1ae1f0cf9b1..569401fdce270be46585d399fa83e7ee8916ee41 100644 (file)
@@ -17,6 +17,7 @@
 #include <wx/stream.h>
 #include <wx/zstream.h>
 #include <wx/utils.h>
+#include <wx/intl.h>
 #include "../zlib/zlib.h"   // don't change this, Robert
 
 #ifdef __BORLANDC__
@@ -130,8 +131,8 @@ wxZlibOutputStream::~wxZlibOutputStream()
 
   err = deflate(&m_deflate, Z_FINISH);
   if (err != Z_STREAM_END) {
-    wxDebugMsg("wxZlibOutputStream: an error occured while we was closing "
-               "the stream.\n");
+    wxDebugMsg(_("wxZlibOutputStream: an error occured while we was closing "
+               "the stream.\n"));
     return;
   }
 
index 9080ef2b0214ee8c1e0d02f2b38cd94813e9a7b2..4e011463abd3583ee5ffc0553a2968e30df57ec3 100644 (file)
@@ -228,12 +228,12 @@ void wxGenericColourDialog::CreateWidgets(void)
 {
   wxBeginBusyCursor();
   
-  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(okButtonX, buttonY));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY));
   int bw, bh;
   okButton->GetSize(&bw, &bh);
 
-  (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(okButtonX + bw + 10, buttonY));
-  (void) new wxButton(this, wxID_ADD_CUSTOM, "Add to custom colours",
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 10, buttonY));
+  (void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
      wxPoint(customButtonX, buttonY));
 
   int sliderX = singleCustomColourRect.x + singleCustomColourRect.width + sectionSpacing;
index f12689c76818dcadbc337a725b4eaa0e9d085f82..269f389d527889217e965f9c2abc0866a8f45766 100644 (file)
@@ -31,6 +31,7 @@
 #include "wx/dcclient.h"
 #include "wx/choice.h"
 #include "wx/checkbox.h"
+#include <wx/intl.h>
 #endif
 
 #include <string.h>
@@ -121,7 +122,7 @@ wxGenericFontDialog::wxGenericFontDialog(void)
 }
 
 wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, wxFontData *data):
-  wxDialog(parent, -1, "Font", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+  wxDialog(parent, -1, _("Font"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
 {
   m_useEvents = FALSE;
   Create(parent, data);
@@ -228,7 +229,7 @@ void wxGenericFontDialog::CreateWidgets(void)
   }
 
   pointSizeChoice = new wxChoice(this, wxID_FONT_SIZE, wxPoint(210, y), wxSize(50, -1), 40, pointSizes);
-  underLineCheckBox = new wxCheckBox(this, wxID_FONT_UNDERLINE, "Underline", wxPoint(280, y));
+  underLineCheckBox = new wxCheckBox(this, wxID_FONT_UNDERLINE, _("Underline"), wxPoint(280, y));
 
   int rectY;
   pointSizeChoice->GetPosition(&x, &rectY); //NL mod
@@ -242,8 +243,8 @@ void wxGenericFontDialog::CreateWidgets(void)
 
   int by = (fontRect.y + fontRect.height + 5);
 
-  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, by));
-  (void) new wxButton(this, wxID_OK, "Cancel", wxPoint(50, by));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, by));
+  (void) new wxButton(this, wxID_OK, _("Cancel"), wxPoint(50, by));
 
   familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
   styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
@@ -306,7 +307,7 @@ void wxGenericFontDialog::PaintFont(wxDC& dc)
     float cy = (float)(fontRect.y + (fontRect.height/2.0) - (h/2.0));
     dc.SetTextForeground(fontData.fontColour);
     dc.SetClippingRegion( fontRect.x, fontRect.y, (long)(fontRect.width-2.0), (long)(fontRect.height-2.0));
-    dc.DrawText("ABCDEFGabcdefg12345", (long)cx, (long)cy);
+    dc.DrawText(_("ABCDEFGabcdefg12345"), (long)cx, (long)cy);
     dc.DestroyClippingRegion();
        dc.SetFont(wxNullFont);
   }
index 67d086dc724220d187be56c59f71ef23c9e23e69..5e0008f975df392b24d3ec7b7824ed21e21d0f9b 100644 (file)
@@ -1015,7 +1015,7 @@ void wxListMainWindow::OnRenameTimer()
   m_text->SetFocus();
 */
 /*
-  char *res = wxGetTextFromUser( "Enter new name:", "", s );
+  char *res = wxGetTextFromUser( _("Enter new name:"), "", s );
   if (res)
   {
     m_dirty = TRUE;
index a3b15e02c3dd2ea75a525d1d1a9f17145d76f3f3..54310850922a20a0122464f33b125e7ea4de0b91 100644 (file)
@@ -27,6 +27,7 @@
 #include "wx/dc.h"
 #include "wx/app.h"
 #include "wx/msgdlg.h"
+#include <wx/intl.h>
 #endif
 
 #include "wx/generic/printps.h"
@@ -155,7 +156,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
     if (!printout->OnBeginDocument(printData.GetFromPage(), printData.GetToPage()))
     {
       wxEndBusyCursor();
-      wxMessageBox("Could not start printing.", "Print Error", wxOK, parent);
+      wxMessageBox(_("Could not start printing."), _("Print Error"), wxOK, parent);
       break;
     }
     if (abortIt)
@@ -229,11 +230,11 @@ void wxPostScriptPrintPreview::DetermineScaling(void)
 {
     const char *paperType = wxThePrintSetupData->GetPaperName();
     if (!paperType)
-      paperType = "A4 210 x 297 mm";
+      paperType = _("A4 210 x 297 mm");
 
     wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType);
     if (!paper)
-      paper = wxThePrintPaperDatabase->FindPaperType("A4 210 x 297 mm");
+      paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm"));
     if (paper)
     {
       previewPrintout->SetPPIScreen(100, 100);
index cf3e8a61ff416ae465a424e2422de627c9d4a90c..033d18ba8d778b30c9102e2e3120ffb3610465b4 100644 (file)
@@ -36,6 +36,7 @@
 #include "wx/radiobox.h"
 #include "wx/filedlg.h"
 #include "wx/choice.h"
+#include <wx/intl.h>
 #endif
 
 #include "wx/generic/prntdlgg.h"
@@ -68,7 +69,7 @@ extern wxPrintPaperDatabase *wxThePrintPaperDatabase;
 
 
 wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
-  wxDialog(parent, -1, "Print", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+  wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
 {
   if ( data )
     printData = *data;
@@ -79,10 +80,10 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
   int yPos = 5;
   int xPos = 5;
 
-  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
-  (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
 
-  setupButton = new wxButton(this, wxPRINTID_SETUP, "Setup...", wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
+  setupButton = new wxButton(this, wxPRINTID_SETUP, _("Setup..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
 
   okButton->SetDefault();
   okButton->SetFocus();
@@ -90,10 +91,10 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
   yPos += 35;
 
   wxString choices[2];
-  choices[0] = "All";
-  choices[1] = "Pages";
+  choices[0] = _("All");
+  choices[1] = _("Pages");
 
-  rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, "Print Range",
+  rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"),
     wxPoint(5, yPos), wxSize(-1, -1), 2, choices, 2);
   rangeRadioBox->SetSelection(1);
 
@@ -103,19 +104,19 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
   int textWidth = 40;
   spacing = 10;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "From:", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("From:"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   fromText = new wxTextCtrl(this, wxPRINTID_FROM, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
   xPos += spacing + textWidth;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "To:", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("To:"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   toText = new wxTextCtrl(this, wxPRINTID_TO, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
   xPos += spacing + textWidth;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Copies:", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Copies:"), wxPoint(xPos, yPos));
   xPos += spacing + staticWidth;
 
   noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
@@ -123,7 +124,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
   yPos += 30;
   xPos = 5;
 
-  printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, "Print to File", wxPoint(xPos, yPos));
+  printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, _("Print to File"), wxPoint(xPos, yPos));
 
   Fit();
   Centre(wxBOTH);
@@ -168,7 +169,7 @@ void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event))
   {
     wxThePrintSetupData->SetPrinterMode(PS_FILE);
 
-    char *f = wxFileSelector("PostScript file",
+    char *f = wxFileSelector(_("PostScript file"),
         wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
         wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
         "ps", "*.ps", 0, this);
@@ -271,7 +272,7 @@ wxDC *wxGenericPrintDialog::GetPrintDC(void)
  */
 
 wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data):
-  wxDialog(parent, -1, "Print Setup", wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+  wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
 {
   if ( data )
     printData = *data;
@@ -282,9 +283,9 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
   int yPos = 5;
   int xPos = 5;
 
-  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
   xPos += buttonWidth + spacing;
-  (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight));
 
   okButton->SetDefault();
   okButton->SetFocus();
@@ -295,16 +296,16 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
   paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos);
 
   wxString choices[2];
-  choices[0] = "Portrait";
-  choices[1] = "Landscape";
+  choices[0] = _("Portrait");
+  choices[1] = _("Landscape");
 
-  orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, "Orientation",
+  orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
     wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2);
   orientationRadioBox->SetSelection(0);
 
   xPos += 200;
 
-  colourCheckBox = new wxCheckBox(this, wxPRINTID_PRINTCOLOUR, "Print in colour", wxPoint(xPos, yPos));
+  colourCheckBox = new wxCheckBox(this, wxPRINTID_PRINTCOLOUR, _("Print in colour"), wxPoint(xPos, yPos));
 
   xPos = 5;
   yPos += 60;
@@ -313,13 +314,13 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
   int textWidth = 120;
   spacing = 10;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Printer command:", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer command:"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   printerCommandText = new wxTextCtrl(this, wxPRINTID_COMMAND, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
   xPos += textWidth + spacing;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Printer options:", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer options:"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   printerOptionsText = new wxTextCtrl(this, wxPRINTID_OPTIONS, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
@@ -397,7 +398,7 @@ wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y)
       sel = i;
   }
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Paper size", wxPoint(*x, *y));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y));
   *y += 25;
 
   wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n,
@@ -437,7 +438,7 @@ void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event))
 }
 
 wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data):
-  wxDialog(parent, -1, "Page Setup", wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE)
+  wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE)
 {
   if ( data )
     pageData = *data;
@@ -448,16 +449,16 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   int yPos = 5;
   int xPos = 5;
 
-  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
-  (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight));
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight));
 
-  printerButton = new wxButton(this, wxPRINTID_SETUP, "Printer...", wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
+  printerButton = new wxButton(this, wxPRINTID_SETUP, _("Printer..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight));
 
   if ( !pageData.GetEnablePrinter() )
     printerButton->Enable(FALSE);
 
 //  if (printData.GetEnableHelp())
-//  wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, "Help", -1, -1, buttonWidth, buttonHeight);
+//  wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, _("Help"), -1, -1, buttonWidth, buttonHeight);
 
   okButton->SetDefault();
   okButton->SetFocus();
@@ -470,9 +471,9 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   xPos = 5;
 
   wxString choices[2];
-  choices[0] = "Portrait";
-  choices[1] = "Landscape";
-  orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, "Orientation",
+  choices[0] = _("Portrait");
+  choices[1] = _("Landscape");
+  orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
     wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2);
   orientationRadioBox->SetSelection(0);
 
@@ -483,13 +484,13 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   int textWidth = 60;
   spacing = 10;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Left margin (mm):", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Left margin (mm):"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
   xPos += textWidth + spacing;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Right margin (mm):", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Right margin (mm):"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
@@ -498,13 +499,13 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   yPos += 35;
   xPos = 5;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Top margin (mm):", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Top margin (mm):"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
   xPos += textWidth + spacing;
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Bottom margin (mm):", wxPoint(xPos, yPos));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Bottom margin (mm):"), wxPoint(xPos, yPos));
   xPos += staticWidth;
 
   marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1));
@@ -595,7 +596,7 @@ wxChoice *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y)
       sel = i;
   }
 
-  (void) new wxStaticText(this, wxPRINTID_STATIC, "Paper size", wxPoint(*x, *y));
+  (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y));
   *y += 25;
 
   wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n,
index b244f5c5c308e5bd233de9015777ac864ff0d697..20e96214c016ba826f6ccb4aac7d9dcf2b310c93 100644 (file)
@@ -927,7 +927,7 @@ void wxTabView::SetTabSelection(int sel, bool activateTool)
     control->SetSelected((sel != 0)); // TODO ??
   else
   {
-    wxMessageBox("Could not find tab for id", "Error", wxOK);
+    wxMessageBox(_("Could not find tab for id"), _("Error"), wxOK);
     return;
   }
     
index c9c35cb94d4b6eee42d6b2f50192b5027848db3b..ce7c7f47d37abffbe0d9de37b5e16b60775a69fa 100644 (file)
@@ -624,7 +624,7 @@ bool wxTreeCtrl::ExpandItem( long item, int action )
 void wxTreeCtrl::DeleteItem( long item )
 {
   wxGenericTreeItem *pItem = FindItem( item );
-  wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteItem: no such pItem." );
+  wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteItem: no such pItem.") );
 
   pItem->m_parent->m_children.DeleteObject(pItem);
 
@@ -634,7 +634,7 @@ void wxTreeCtrl::DeleteItem( long item )
 void wxTreeCtrl::DeleteChildren( long item )
 {
   wxGenericTreeItem *pItem = FindItem( item );
-  wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteChildren: no such pItem." );
+  wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteChildren: no such pItem.") );
 
   pItem->m_children.Clear();
 
@@ -701,7 +701,7 @@ bool wxTreeCtrl::SelectItem(long itemId)
 {
   wxGenericTreeItem *pItem = FindItem(itemId);
   if ( !pItem ) {
-    wxLogDebug("Can't select an item %d which doesn't exist.", itemId);
+    wxLogDebug(_("Can't select an item %d which doesn't exist."), itemId);
 
     return FALSE;
   }
index 74f5e13cee263111b888469878bfa215d4229691..7076f02898c074469b4f8e1ff3207d96b6ca8ea5 100644 (file)
@@ -322,7 +322,7 @@ int wxEntry( int argc, char *argv[] )
   {
     if (!wxApp::GetInitializerFunction())
     {
-      printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
+      printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
       return 0;
     };
     
@@ -335,7 +335,7 @@ int wxEntry( int argc, char *argv[] )
   
   if (!wxTheApp) 
   {
-    printf( "wxWindows error: wxTheApp == NULL\n" );
+    printf( _("wxWindows error: wxTheApp == NULL\n") );
     return 0;
   };
 
index 1ac91ffdd4338d25e12b5de5dba87f7a4783e70c..9965d5b5a7dd0d14fba7bd84db7c355a3c456acf 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 #include "wx/combobox.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -155,7 +156,7 @@ void wxComboBox::Delete( int n )
   wxNode *node = m_clientData.Nth( n );
   if (!node)
   {
-    wxFAIL_MSG("wxComboBox::Delete wrong index");
+    wxFAIL_MSG(_("wxComboBox::Delete wrong index"));
   }
   else
     m_clientData.DeleteNode( node );
index 896763a93c327f7c5c89340bff179bd7b51ed8b3..9a3b2b08eae4ed6bba9b8b8a4eacd1ab17610129 100644 (file)
@@ -14,6 +14,7 @@
 #include "wx/window.h"
 #include "wx/app.h"
 #include "wx/gdicmn.h"
+#include <wx/intl.h>
 
 #include "gdk/gdkprivate.h"
 
index a555c487be690e69fb588ad69ab7e1d5674199a8..004bef9e3f2856604b6b413a35d0ec630e8125f8 100644 (file)
@@ -31,7 +31,8 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data )
 
   if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
        if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
-         if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
+         if(wxMessageBox(_("File exists. Overwrite?"),
+                         _("Confirm"), wxYES_NO) != wxYES)
                return;
        }
 
@@ -63,7 +64,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
   m_dialogStyle = style;
   m_filterIndex = 1;
 
-  m_widget = gtk_file_selection_new( "File selection" );
+  m_widget = gtk_file_selection_new(_("File selection"));
   
   int x = (gdk_screen_width () - 400) / 2;
   int y = (gdk_screen_height () - 400) / 2;
@@ -164,6 +165,3 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de
   return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
 };
 
-
-
-
index ade85f736928a2b3c63045961b2995e7fdc89bef..dad6cd6915e9fb4d919267f9ec1dd0f2007ba7d4 100644 (file)
@@ -16,6 +16,7 @@
 #include "wx/dynarray.h"
 #include "wx/listbox.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -166,7 +167,7 @@ void wxListBox::Delete( int n )
   wxNode *node = m_clientData.Nth( n );
   if (!node)
   {
-    wxFAIL_MSG("wxListBox::Delete wrong index");
+    wxFAIL_MSG(_("wxListBox::Delete wrong index"));
   }
   else
     m_clientData.DeleteNode( node );
index 66a39023cd23742efa7d22b2b23069849f337c76..25dc7ba34b9ff5eea459078607a027545c5a60ec 100644 (file)
@@ -16,6 +16,7 @@
 #include "wx/dialog.h"
 #include "wx/menu.h"
 #include "wx/gtk/win_gtk.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 
@@ -323,7 +324,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
 {
   if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame)))
   {
-     wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
+     wxFAIL_MSG(_("wxNotebook::AddChild: Child has to be wxMDIChildFrame"));
      return;
   };
 
@@ -332,7 +333,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
   wxString s;
   wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child;
   s = mdi_child->m_title;
-  if (s.IsNull()) s = "MDI child";
+  if (s.IsNull()) s = _("MDI child");
 
   GtkWidget *label_widget;
   label_widget = gtk_label_new( s );
index 46a12dee68908a7f865b62b2261587787e340d79..0e99bfef147ffa6538a6f35415116e774aa4ffea 100644 (file)
@@ -193,7 +193,7 @@ void wxMenuItem::SetText(const wxString& str)
 
 void wxMenuItem::Check( bool check )
 {
-  wxCHECK_RET( IsCheckable(), "can't check uncheckable item!" )
+  wxCHECK_RET( IsCheckable(), _("can't check uncheckable item!") )
 
   m_isChecked = check;
   gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check );
@@ -355,7 +355,7 @@ wxMenuItem *wxMenu::FindItem(int id) const
     node = node->Next();
   };
 
-  wxLogDebug("wxMenu::FindItem: item %d not found.", id);
+  wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
 
   return NULL;
 }
index 6ee2d57a76f6a8518083ee30ee4057976a91ea4c..356a1a4c8f31b8d8038c09a3908961747538e86b 100644 (file)
@@ -184,7 +184,7 @@ int wxNotebook::GetSelection() const
     node = node->Next();
   };
 
-  wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?");
+  wxCHECK_MSG( node != NULL, -1, _("wxNotebook: no selection?"));
 
   return page->m_id;
 };
@@ -230,7 +230,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
     node = node->Next();
   };
 
-  wxLogDebug( "Notebook page %d not found!", page );
+  wxLogDebug( _("Notebook page %d not found!"), page );
 
   return NULL;
 };
@@ -301,12 +301,12 @@ bool wxNotebook::SetPageImage( int page, int image )
 
 void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
 {
-  wxFAIL_MSG("wxNotebook::SetPageSize not implemented");
+  wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
 };
 
 void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
 {
-  wxFAIL_MSG("wxNotebook::SetPadding not implemented");
+  wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
 };
 
 bool wxNotebook::DeleteAllPages()
@@ -369,7 +369,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
   };
 
   wxCHECK_MSG(page != NULL, FALSE,
-              "Can't add a page whose parent is not the notebook!");
+              _("Can't add a page whose parent is not the notebook!"));
 
   // then set the attributes
   page->m_text = text;
@@ -401,7 +401,7 @@ void wxNotebook::AddChild( wxWindow *win )
   wxNotebookPage *page = new wxNotebookPage();
 
   page->m_id = GetPageCount();
-  page->m_label = (GtkLabel *)gtk_label_new("Handle");
+  page->m_label = (GtkLabel *)gtk_label_new(_("Handle"));
   page->m_client = win;
   gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget,
                             (GtkWidget *)page->m_label);
@@ -417,7 +417,7 @@ void wxNotebook::AddChild( wxWindow *win )
 
   if (!page->m_page)
   {
-     wxLogFatalError( "Notebook page creation error" );
+     wxLogFatalError( _("Notebook page creation error") );
      return;
   }
 
index 3892f89d73a73c698c5db3aaf77bc0f6b078a2ca..00a20b423654c4b2aa20995857ac299f022b2d35 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include "wx/toolbar.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // wxToolBarTool
@@ -170,7 +171,7 @@ void wxToolBar::AddSeparator(void)
 
 void wxToolBar::ClearTools(void)
 {
-  wxFAIL_MSG("wxToolBar::ClearTools not implemented");
+  wxFAIL_MSG(_("wxToolBar::ClearTools not implemented"));
 };
 
 void wxToolBar::Realize(void)
@@ -213,7 +214,7 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
 
 void wxToolBar::ToggleTool(int WXUNUSED(toolIndex), bool WXUNUSED(toggle) ) 
 {
-  wxFAIL_MSG("wxToolBar::ToggleTool not implemented");
+  wxFAIL_MSG(_("wxToolBar::ToggleTool not implemented"));
 };
 
 wxObject *wxToolBar::GetToolClientData(int index) const
index deb1db70fb7f148d0e73729b7074a8794284c7d6..a4e3470b534100848f9d4160c84d21227ff20b8c 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "wx/textctrl.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 //  wxTextCtrl
@@ -185,14 +186,14 @@ void wxTextCtrl::WriteText( const wxString &text )
 
 bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) )
 {
-  wxFAIL_MSG("wxTextCtrl::LoadFile not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::LoadFile not implemented"));
 
   return FALSE;
 };
 
 bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) )
 {
-  wxFAIL_MSG("wxTextCtrl::SaveFile not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::SaveFile not implemented"));
 
   return FALSE;
 };
@@ -254,7 +255,7 @@ void wxTextCtrl::SetSelection( long from, long to )
 
 void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
 {
-  wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
 };
 
 long wxTextCtrl::GetInsertionPoint(void) const
index d65fec1d0906395e8589bcb80d3f352555209a4b..097bd145e8b384b29c653da5f66ab14a2b88ee30 100644 (file)
@@ -27,6 +27,7 @@
 #include "wx/mdi.h"
 #include "wx/notebook.h"
 #include "wx/statusbr.h"
+#include <wx/intl.h>
 //#include "wx/treectrl.h"
 #include "gdk/gdkkeysyms.h"
 #include <math.h>
@@ -902,7 +903,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
       long style, const wxString &name )
 {
   if (m_needParent && (parent == NULL))
-    wxFatalError( "Need complete parent.", name );
+    wxFatalError( _("Need complete parent."), name );
 
   m_widget = NULL;
   m_hasVMT = FALSE;
@@ -1079,7 +1080,7 @@ void wxWindow::ImplementSetPosition(void)
   
   if (!m_parent)
   {
-    printf( "wxWindow::SetSize error.\n" );
+    printf( _("wxWindow::SetSize error.\n") );
     return;
   }
   
@@ -1679,7 +1680,7 @@ bool wxWindow::TransferDataToWindow(void)
     if (child->GetValidator() && /* child->GetValidator()->Ok() && */
   !child->GetValidator()->TransferToWindow() )
     {
-      wxMessageBox( "Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION );
+      wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION );
       return FALSE;
     };
     node = node->Next();
@@ -2360,19 +2361,19 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
     wxString winName;
   if (GetName() == "")
-    winName = "unnamed";
+    winName = _("unnamed");
   else
     winName = GetName();
-    wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName);
+    wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName);
     if (!constr->left.GetDone())
-      wxDebugMsg("  unsatisfied 'left' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'left' constraint.\n"));
     if (!constr->right.GetDone())
-      wxDebugMsg("  unsatisfied 'right' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'right' constraint.\n"));
     if (!constr->width.GetDone())
-      wxDebugMsg("  unsatisfied 'width' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'width' constraint.\n"));
     if (!constr->height.GetDone())
-      wxDebugMsg("  unsatisfied 'height' constraint.\n");
-    wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n");
+      wxDebugMsg(_("  unsatisfied 'height' constraint.\n"));
+    wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n"));
   }
 
   if (recurse)
index 74f5e13cee263111b888469878bfa215d4229691..7076f02898c074469b4f8e1ff3207d96b6ca8ea5 100644 (file)
@@ -322,7 +322,7 @@ int wxEntry( int argc, char *argv[] )
   {
     if (!wxApp::GetInitializerFunction())
     {
-      printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
+      printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
       return 0;
     };
     
@@ -335,7 +335,7 @@ int wxEntry( int argc, char *argv[] )
   
   if (!wxTheApp) 
   {
-    printf( "wxWindows error: wxTheApp == NULL\n" );
+    printf( _("wxWindows error: wxTheApp == NULL\n") );
     return 0;
   };
 
index 1ac91ffdd4338d25e12b5de5dba87f7a4783e70c..9965d5b5a7dd0d14fba7bd84db7c355a3c456acf 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 #include "wx/combobox.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -155,7 +156,7 @@ void wxComboBox::Delete( int n )
   wxNode *node = m_clientData.Nth( n );
   if (!node)
   {
-    wxFAIL_MSG("wxComboBox::Delete wrong index");
+    wxFAIL_MSG(_("wxComboBox::Delete wrong index"));
   }
   else
     m_clientData.DeleteNode( node );
index 896763a93c327f7c5c89340bff179bd7b51ed8b3..9a3b2b08eae4ed6bba9b8b8a4eacd1ab17610129 100644 (file)
@@ -14,6 +14,7 @@
 #include "wx/window.h"
 #include "wx/app.h"
 #include "wx/gdicmn.h"
+#include <wx/intl.h>
 
 #include "gdk/gdkprivate.h"
 
index a555c487be690e69fb588ad69ab7e1d5674199a8..004bef9e3f2856604b6b413a35d0ec630e8125f8 100644 (file)
@@ -31,7 +31,8 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data )
 
   if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
        if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
-         if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
+         if(wxMessageBox(_("File exists. Overwrite?"),
+                         _("Confirm"), wxYES_NO) != wxYES)
                return;
        }
 
@@ -63,7 +64,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
   m_dialogStyle = style;
   m_filterIndex = 1;
 
-  m_widget = gtk_file_selection_new( "File selection" );
+  m_widget = gtk_file_selection_new(_("File selection"));
   
   int x = (gdk_screen_width () - 400) / 2;
   int y = (gdk_screen_height () - 400) / 2;
@@ -164,6 +165,3 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de
   return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
 };
 
-
-
-
index ade85f736928a2b3c63045961b2995e7fdc89bef..dad6cd6915e9fb4d919267f9ec1dd0f2007ba7d4 100644 (file)
@@ -16,6 +16,7 @@
 #include "wx/dynarray.h"
 #include "wx/listbox.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -166,7 +167,7 @@ void wxListBox::Delete( int n )
   wxNode *node = m_clientData.Nth( n );
   if (!node)
   {
-    wxFAIL_MSG("wxListBox::Delete wrong index");
+    wxFAIL_MSG(_("wxListBox::Delete wrong index"));
   }
   else
     m_clientData.DeleteNode( node );
index 66a39023cd23742efa7d22b2b23069849f337c76..25dc7ba34b9ff5eea459078607a027545c5a60ec 100644 (file)
@@ -16,6 +16,7 @@
 #include "wx/dialog.h"
 #include "wx/menu.h"
 #include "wx/gtk/win_gtk.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 
@@ -323,7 +324,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
 {
   if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame)))
   {
-     wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame");
+     wxFAIL_MSG(_("wxNotebook::AddChild: Child has to be wxMDIChildFrame"));
      return;
   };
 
@@ -332,7 +333,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
   wxString s;
   wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child;
   s = mdi_child->m_title;
-  if (s.IsNull()) s = "MDI child";
+  if (s.IsNull()) s = _("MDI child");
 
   GtkWidget *label_widget;
   label_widget = gtk_label_new( s );
index 46a12dee68908a7f865b62b2261587787e340d79..0e99bfef147ffa6538a6f35415116e774aa4ffea 100644 (file)
@@ -193,7 +193,7 @@ void wxMenuItem::SetText(const wxString& str)
 
 void wxMenuItem::Check( bool check )
 {
-  wxCHECK_RET( IsCheckable(), "can't check uncheckable item!" )
+  wxCHECK_RET( IsCheckable(), _("can't check uncheckable item!") )
 
   m_isChecked = check;
   gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check );
@@ -355,7 +355,7 @@ wxMenuItem *wxMenu::FindItem(int id) const
     node = node->Next();
   };
 
-  wxLogDebug("wxMenu::FindItem: item %d not found.", id);
+  wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
 
   return NULL;
 }
index 6ee2d57a76f6a8518083ee30ee4057976a91ea4c..356a1a4c8f31b8d8038c09a3908961747538e86b 100644 (file)
@@ -184,7 +184,7 @@ int wxNotebook::GetSelection() const
     node = node->Next();
   };
 
-  wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?");
+  wxCHECK_MSG( node != NULL, -1, _("wxNotebook: no selection?"));
 
   return page->m_id;
 };
@@ -230,7 +230,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
     node = node->Next();
   };
 
-  wxLogDebug( "Notebook page %d not found!", page );
+  wxLogDebug( _("Notebook page %d not found!"), page );
 
   return NULL;
 };
@@ -301,12 +301,12 @@ bool wxNotebook::SetPageImage( int page, int image )
 
 void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
 {
-  wxFAIL_MSG("wxNotebook::SetPageSize not implemented");
+  wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented"));
 };
 
 void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
 {
-  wxFAIL_MSG("wxNotebook::SetPadding not implemented");
+  wxFAIL_MSG(_("wxNotebook::SetPadding not implemented"));
 };
 
 bool wxNotebook::DeleteAllPages()
@@ -369,7 +369,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
   };
 
   wxCHECK_MSG(page != NULL, FALSE,
-              "Can't add a page whose parent is not the notebook!");
+              _("Can't add a page whose parent is not the notebook!"));
 
   // then set the attributes
   page->m_text = text;
@@ -401,7 +401,7 @@ void wxNotebook::AddChild( wxWindow *win )
   wxNotebookPage *page = new wxNotebookPage();
 
   page->m_id = GetPageCount();
-  page->m_label = (GtkLabel *)gtk_label_new("Handle");
+  page->m_label = (GtkLabel *)gtk_label_new(_("Handle"));
   page->m_client = win;
   gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget,
                             (GtkWidget *)page->m_label);
@@ -417,7 +417,7 @@ void wxNotebook::AddChild( wxWindow *win )
 
   if (!page->m_page)
   {
-     wxLogFatalError( "Notebook page creation error" );
+     wxLogFatalError( _("Notebook page creation error") );
      return;
   }
 
index 3892f89d73a73c698c5db3aaf77bc0f6b078a2ca..00a20b423654c4b2aa20995857ac299f022b2d35 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include "wx/toolbar.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // wxToolBarTool
@@ -170,7 +171,7 @@ void wxToolBar::AddSeparator(void)
 
 void wxToolBar::ClearTools(void)
 {
-  wxFAIL_MSG("wxToolBar::ClearTools not implemented");
+  wxFAIL_MSG(_("wxToolBar::ClearTools not implemented"));
 };
 
 void wxToolBar::Realize(void)
@@ -213,7 +214,7 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
 
 void wxToolBar::ToggleTool(int WXUNUSED(toolIndex), bool WXUNUSED(toggle) ) 
 {
-  wxFAIL_MSG("wxToolBar::ToggleTool not implemented");
+  wxFAIL_MSG(_("wxToolBar::ToggleTool not implemented"));
 };
 
 wxObject *wxToolBar::GetToolClientData(int index) const
index deb1db70fb7f148d0e73729b7074a8794284c7d6..a4e3470b534100848f9d4160c84d21227ff20b8c 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "wx/textctrl.h"
 #include "wx/utils.h"
+#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 //  wxTextCtrl
@@ -185,14 +186,14 @@ void wxTextCtrl::WriteText( const wxString &text )
 
 bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) )
 {
-  wxFAIL_MSG("wxTextCtrl::LoadFile not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::LoadFile not implemented"));
 
   return FALSE;
 };
 
 bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) )
 {
-  wxFAIL_MSG("wxTextCtrl::SaveFile not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::SaveFile not implemented"));
 
   return FALSE;
 };
@@ -254,7 +255,7 @@ void wxTextCtrl::SetSelection( long from, long to )
 
 void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
 {
-  wxFAIL_MSG("wxTextCtrl::ShowPosition not implemented");
+  wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
 };
 
 long wxTextCtrl::GetInsertionPoint(void) const
index d65fec1d0906395e8589bcb80d3f352555209a4b..097bd145e8b384b29c653da5f66ab14a2b88ee30 100644 (file)
@@ -27,6 +27,7 @@
 #include "wx/mdi.h"
 #include "wx/notebook.h"
 #include "wx/statusbr.h"
+#include <wx/intl.h>
 //#include "wx/treectrl.h"
 #include "gdk/gdkkeysyms.h"
 #include <math.h>
@@ -902,7 +903,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
       long style, const wxString &name )
 {
   if (m_needParent && (parent == NULL))
-    wxFatalError( "Need complete parent.", name );
+    wxFatalError( _("Need complete parent."), name );
 
   m_widget = NULL;
   m_hasVMT = FALSE;
@@ -1079,7 +1080,7 @@ void wxWindow::ImplementSetPosition(void)
   
   if (!m_parent)
   {
-    printf( "wxWindow::SetSize error.\n" );
+    printf( _("wxWindow::SetSize error.\n") );
     return;
   }
   
@@ -1679,7 +1680,7 @@ bool wxWindow::TransferDataToWindow(void)
     if (child->GetValidator() && /* child->GetValidator()->Ok() && */
   !child->GetValidator()->TransferToWindow() )
     {
-      wxMessageBox( "Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION );
+      wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION );
       return FALSE;
     };
     node = node->Next();
@@ -2360,19 +2361,19 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
     wxString winName;
   if (GetName() == "")
-    winName = "unnamed";
+    winName = _("unnamed");
   else
     winName = GetName();
-    wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName);
+    wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName);
     if (!constr->left.GetDone())
-      wxDebugMsg("  unsatisfied 'left' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'left' constraint.\n"));
     if (!constr->right.GetDone())
-      wxDebugMsg("  unsatisfied 'right' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'right' constraint.\n"));
     if (!constr->width.GetDone())
-      wxDebugMsg("  unsatisfied 'width' constraint.\n");
+      wxDebugMsg(_("  unsatisfied 'width' constraint.\n"));
     if (!constr->height.GetDone())
-      wxDebugMsg("  unsatisfied 'height' constraint.\n");
-    wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n");
+      wxDebugMsg(_("  unsatisfied 'height' constraint.\n"));
+    wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n"));
   }
 
   if (recurse)