summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/po/genmsg1
-rw-r--r--source3/utils/net_eventlog.c56
2 files changed, 33 insertions, 24 deletions
diff --git a/source3/po/genmsg b/source3/po/genmsg
index 03f771ae14..c812f17374 100755
--- a/source3/po/genmsg
+++ b/source3/po/genmsg
@@ -17,6 +17,7 @@
NET_FILES="../utils/net.c ../utils/net_ads.c ../utils/net_ads_gpo.c"
NET_FILES="${NET_FILES} ../utils/net_afs.c ../utils/net_cache.c"
NET_FILES="${NET_FILES} ../utils/net_conf.c ../utils/net_dom.c"
+NET_FILES="${NET_FILES} ../utils/net_eventlog.c"
FILES="../web/swat.c ../web/statuspage.c ../param/loadparm.c ${NET_FILES}"
LANGS='en ja tr pl fr de it ru'
diff --git a/source3/utils/net_eventlog.c b/source3/utils/net_eventlog.c
index b86be6d48b..bb1be0c9ca 100644
--- a/source3/utils/net_eventlog.c
+++ b/source3/utils/net_eventlog.c
@@ -43,20 +43,21 @@ static int net_eventlog_dump(struct net_context *c, int argc,
char *s;
if (argc < 1 || c->display_usage) {
- d_fprintf(stderr, "usage: net eventlog dump <file.evt>\n");
+ d_fprintf(stderr, _("usage: net eventlog dump <file.evt>\n"));
goto done;
}
blob.data = (uint8_t *)file_load(argv[0], &blob.length, 0, ctx);
if (!blob.data) {
- d_fprintf(stderr, "failed to load evt file: %s\n", argv[0]);
+ d_fprintf(stderr, _("failed to load evt file: %s\n"), argv[0]);
goto done;
}
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt,
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOG_EVT_FILE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- d_fprintf(stderr, "evt pull failed: %s\n", ndr_errstr(ndr_err));
+ d_fprintf(stderr, _("evt pull failed: %s\n"),
+ ndr_errstr(ndr_err));
goto done;
}
@@ -97,13 +98,14 @@ static int net_eventlog_import(struct net_context *c, int argc,
struct EVENTLOG_EVT_FILE evt;
if (argc < 2 || c->display_usage) {
- d_fprintf(stderr, "usage: net eventlog import <file> <eventlog>\n");
+ d_fprintf(stderr,
+ _("usage: net eventlog import <file> <eventlog>\n"));
goto done;
}
blob.data = (uint8_t *)file_load(argv[0], &blob.length, 0, ctx);
if (!blob.data) {
- d_fprintf(stderr, "failed to load evt file: %s\n", argv[0]);
+ d_fprintf(stderr, _("failed to load evt file: %s\n"), argv[0]);
goto done;
}
@@ -111,19 +113,21 @@ static int net_eventlog_import(struct net_context *c, int argc,
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt_header,
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOGHEADER);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- d_fprintf(stderr, "evt header pull failed: %s\n", ndr_errstr(ndr_err));
+ d_fprintf(stderr, _("evt header pull failed: %s\n"),
+ ndr_errstr(ndr_err));
goto done;
}
if (evt_header.Flags & ELF_LOGFILE_HEADER_WRAP) {
- d_fprintf(stderr, "input file is wrapped, cannot proceed\n");
+ d_fprintf(stderr, _("input file is wrapped, cannot proceed\n"));
goto done;
}
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt,
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOG_EVT_FILE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- d_fprintf(stderr, "evt pull failed: %s\n", ndr_errstr(ndr_err));
+ d_fprintf(stderr, _("evt pull failed: %s\n"),
+ ndr_errstr(ndr_err));
goto done;
}
@@ -131,7 +135,8 @@ static int net_eventlog_import(struct net_context *c, int argc,
etdb = elog_open_tdb(argv[1], false, false);
if (!etdb) {
- d_fprintf(stderr, "can't open the eventlog TDB (%s)\n", argv[1]);
+ d_fprintf(stderr, _("can't open the eventlog TDB (%s)\n"),
+ argv[1]);
goto done;
}
@@ -149,13 +154,14 @@ static int net_eventlog_import(struct net_context *c, int argc,
status = evlog_push_record_tdb(ctx, ELOG_TDB_CTX(etdb),
&e, &record_number);
if (!NT_STATUS_IS_OK(status)) {
- d_fprintf(stderr, "can't write to the eventlog: %s\n",
- nt_errstr(status));
+ d_fprintf(stderr,
+ _("can't write to the eventlog: %s\n"),
+ nt_errstr(status));
goto done;
}
}
- printf("wrote %d entries to tdb\n", i);
+ printf(_("wrote %d entries to tdb\n"), i);
ret = 0;
done:
@@ -187,13 +193,15 @@ static int net_eventlog_export(struct net_context *c, int argc,
ELOG_TDB *etdb = NULL;
if (argc < 2 || c->display_usage) {
- d_fprintf(stderr, "usage: net eventlog export <file> <eventlog>\n");
+ d_fprintf(stderr,
+ _("usage: net eventlog export <file> <eventlog>\n"));
goto done;
}
etdb = elog_open_tdb(argv[1], false, true);
if (!etdb) {
- d_fprintf(stderr, "can't open the eventlog TDB (%s)\n", argv[1]);
+ d_fprintf(stderr, _("can't open the eventlog TDB (%s)\n"),
+ argv[1]);
goto done;
}
@@ -203,7 +211,7 @@ static int net_eventlog_export(struct net_context *c, int argc,
}
if (!file_save(argv[0], blob.data, blob.length)) {
- d_fprintf(stderr, "failed to save evt file: %s\n", argv[0]);
+ d_fprintf(stderr, _("failed to save evt file: %s\n"), argv[0]);
goto done;
}
@@ -232,25 +240,25 @@ int net_eventlog(struct net_context *c, int argc, const char **argv)
"dump",
net_eventlog_dump,
NET_TRANSPORT_LOCAL,
- "Dump eventlog",
- "net eventlog dump\n"
- " Dump win32 *.evt eventlog file"
+ N_("Dump eventlog"),
+ N_("net eventlog dump\n"
+ " Dump win32 *.evt eventlog file")
},
{
"import",
net_eventlog_import,
NET_TRANSPORT_LOCAL,
- "Import eventlog",
- "net eventlog import\n"
- " Import win32 *.evt eventlog file"
+ N_("Import eventlog"),
+ N_("net eventlog import\n"
+ " Import win32 *.evt eventlog file")
},
{
"export",
net_eventlog_export,
NET_TRANSPORT_LOCAL,
- "Export eventlog",
- "net eventlog export\n"
- " Export win32 *.evt eventlog file"
+ N_("Export eventlog"),
+ N_("net eventlog export\n"
+ " Export win32 *.evt eventlog file")
},