]> git.sur5r.net Git - bacula/bacula/commitdiff
Put all multi-line strings on one line to fix VC++ compile errors...
authorNicolas Boichat <nicolas@boichat.ch>
Fri, 19 Aug 2005 14:09:45 +0000 (14:09 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Fri, 19 Aug 2005 14:09:45 +0000 (14:09 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2340 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/authenticate.c
bacula/src/wx-console/console_conf.c
bacula/src/wx-console/console_thread.cpp
bacula/src/wx-console/wxbmainframe.cpp

index fc477f47688978d078071ce9d72e685ad27d5634..bf2994b3cce65a3fd47e6d69e8fdea2871461e22 100644 (file)
 
  */
 
+/* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
+ * wxString(_("...")).mb_str(*wxConvCurrent) */
+
+#include <wx/intl.h>
+
 #include "bacula.h"
 #include "console_conf.h"
 #include "jcr.h"
@@ -140,10 +145,7 @@ int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons)
 
 bail_out:
    stop_bsock_timer(tid);
-   csprint( _("Director authorization problem.\n"
-              "Most likely the passwords do not agree.\n"
-              "If you are using TLS, there may have been a certificate validation error during the TLS handshake.\n"
-              "Please see http://www.bacula.org/rel-manual/faq.html#AuthorizationErrors for help.\n"));
+   csprint( _("Director authorization problem.\nMost likely the passwords do not agree.\nIf you are using TLS, there may have been a certificate validation error during the TLS handshake.\nPlease see http://www.bacula.org/rel-manual/faq.html#AuthorizationErrors for help.\n"));
    return 0;
 
 }
index 7c327610e6378e3cdbd7cb5de5dabeedf0e573ff..4c2dc4ae1b7a2b9e88b84bc87a56b4c94e910c72 100644 (file)
 
  */
 
+/* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
+ * wxString(_("...")).mb_str(*wxConvCurrent) */
+
+#include <wx/intl.h>
 
 #include "bacula.h"
 #include "console_conf.h"
@@ -121,7 +125,7 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm
    int recurse = 1;
 
    if (res == NULL) {
-      printf(_("No record for %d %s\n"), type, res_to_str(type));
+      printf(wxString(_("No record for %d %s\n")).mb_str(*wxConvCurrent), type, res_to_str(type));
       return;
    }
    if (type < 0) {            /* no recursion */
@@ -130,15 +134,15 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm
    }
    switch (type) {
       case R_CONSOLE:
-         printf(_("Console: name=%s rcfile=%s histfile=%s\n"), reshdr->name,
+         printf(wxString(_("Console: name=%s rcfile=%s histfile=%s\n")).mb_str(*wxConvCurrent), reshdr->name,
       res->res_cons.rc_file, res->res_cons.hist_file);
     break;
       case R_DIRECTOR:
-         printf(_("Director: name=%s address=%s DIRport=%d\n"), reshdr->name,
+         printf(wxString(_("Director: name=%s address=%s DIRport=%d\n")).mb_str(*wxConvCurrent), reshdr->name,
        res->res_dir.address, res->res_dir.DIRport);
     break;
       default:
-         printf(_("Unknown resource type %d\n"), type);
+         printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type);
    }
    if (recurse && res->res_dir.hdr.next) {
       dump_resource(type, res->res_dir.hdr.next, sendit, sock);
@@ -213,7 +217,7 @@ void free_resource(RES *sres, int type)
       }
       break;
    default:
-         printf(_("Unknown resource type %d\n"), type);
+         printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type);
       }
    /* Common stuff again -- free the resource, recurse to next one */
    free(res);
@@ -239,7 +243,7 @@ void save_resource(int type, RES_ITEM *items, int pass)
    for (i=0; items[i].name; i++) {
       if (items[i].flags & ITEM_REQUIRED) {
        if (!bit_is_set(i, res_all.res_dir.hdr.item_present)) {
-               Emsg2(M_ABORT, 0, _("%s item is required in %s resource, but not found.\n"),
+               Emsg2(M_ABORT, 0, wxString(_("%s item is required in %s resource, but not found.\n")).mb_str(*wxConvCurrent),
        items[i].name, resources[rindex]);
         }
       }
@@ -258,7 +262,7 @@ void save_resource(int type, RES_ITEM *items, int pass)
        break;
 
     default:
-            Emsg1(M_ERROR, 0, _("Unknown resource type %d\n"), type);
+            Emsg1(M_ERROR, 0, wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type);
        error = 1;
        break;
       }
@@ -285,7 +289,7 @@ void save_resource(int type, RES_ITEM *items, int pass)
     size = sizeof(DIRRES);
     break;
       default:
-         printf(_("Unknown resource type %d\n"), type);
+         printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type);
     error = 1;
     size = 1;
     break;
@@ -301,7 +305,7 @@ void save_resource(int type, RES_ITEM *items, int pass)
     for (next=res_head[rindex]; next->next; next=next->next) {
        if (strcmp(next->name, res->res_dir.hdr.name) == 0) {
           Emsg2(M_ERROR_TERM, 0,
-                  _("Attempt to define second %s resource named \"%s\" is not permitted.\n"),
+                  wxString(_("Attempt to define second %s resource named \"%s\" is not permitted.\n")).mb_str(*wxConvCurrent),
         resources[rindex].name, res->res_dir.hdr.name);
        }
     }
index 0ef8b068d5e32a1db846757bfb4f3e1c8cfd0db7..76e075fedd98031aab761c54170830646de81f0f 100644 (file)
@@ -98,17 +98,14 @@ static int check_resources()
       }
 
       if ((!director->tls_ca_certfile && !director->tls_ca_certdir) && director->tls_enable) {
-         Jmsg(NULL, M_FATAL, 0, wxString(_("Neither \"TLS CA Certificate\""
-                             " or \"TLS CA Certificate Dir\" are defined for Director \"%s\" in config file.\n"
-                             " At least one CA certificate store is required.\n")).mb_str(*wxConvCurrent),
+         Jmsg(NULL, M_FATAL, 0, wxString(_("Neither \"TLS CA Certificate\" or \"TLS CA Certificate Dir\" are defined for Director \"%s\" in config file.\nAt least one CA certificate store is required.\n")).mb_str(*wxConvCurrent),
                              director->hdr.name);
          xOK = false;
       }
    }
    
    if (numdir == 0) {
-      Jmsg(NULL, M_FATAL, 0, wxString(_("No Director resource defined in config file.\n"
-                          "Without that I don't how to speak to the Director :-(\n")).mb_str(*wxConvCurrent));
+      Jmsg(NULL, M_FATAL, 0, wxString(_("No Director resource defined in config file.\nWithout that I don't how to speak to the Director :-(\n")).mb_str(*wxConvCurrent));
       xOK = false;
    }
 
@@ -127,8 +124,7 @@ static int check_resources()
       }
 
       if ((!cons->tls_ca_certfile && !cons->tls_ca_certdir) && cons->tls_enable) {
-         Jmsg(NULL, M_FATAL, 0, wxString(_("Neither \"TLS CA Certificate\""
-                             " or \"TLS CA Certificate Dir\" are defined for Console \"%s\" in config file.\n")).mb_str(*wxConvCurrent),
+         Jmsg(NULL, M_FATAL, 0, wxString(_("Neither \"TLS CA Certificate\" or \"TLS CA Certificate Dir\" are defined for Console \"%s\" in config file.\n")).mb_str(*wxConvCurrent),
                              cons->hdr.name);
          xOK = false;
       }
index 0a71c1213af27c7f1028a0950d472ee4a65dcf0f..66f38442460b222cd0b0861b25d4e332513d80e7 100644 (file)
@@ -394,9 +394,7 @@ void wxbMainFrame::StartConsoleThread(const wxString& config) {
    
             int answer = wxMessageBox(
                               wxString::Format(_(
-                              "It seems that it is the first time you run wx-console.\n"
-                              "This file (%s) has been choosen as default configuration file.\n"
-                              "Do you want to edit it? (if you click No you will have to select another file)"),
+                              "It seems that it is the first time you run wx-console.\nThis file (%s) has been choosen as default configuration file.\nDo you want to edit it? (if you click No you will have to select another file)"),
                               configfile.c_str()),
                               _("First run"),
                               wxYES_NO | wxICON_QUESTION, this);
@@ -415,9 +413,7 @@ void wxbMainFrame::StartConsoleThread(const wxString& config) {
    while (err != wxT("")) {
       int answer = wxMessageBox(
                         wxString::Format(_(
-                           "Unable to read %s\n"
-                           "Error: %s\n"
-                           "Do you want to choose another one? (Press no to edit this file)"),
+                           "Unable to read %s\nError: %s\nDo you want to choose another one? (Press no to edit this file)"),
                            configfile.c_str(), err.c_str()),
                         _("Unable to read configuration file"),
                         wxYES_NO | wxCANCEL | wxICON_ERROR, this);