*/
+/* _("...") 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"
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;
}
*/
+/* _("...") 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"
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 */
}
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);
}
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);
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]);
}
}
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;
}
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;
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);
}
}
}
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;
}
}
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;
}
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);
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);