From 96db4b1ba3a48f50b80b2cfbf0b940e073b7843c Mon Sep 17 00:00:00 2001 From: Motonobu Takahashi Date: Mon, 24 Sep 2001 15:55:09 +0000 Subject: Added SWAT i18n feature: TO enable configure with --with-i18n-swat to support this gettext is integrated and a new directories name "po" and "intl" are created. now these languages are supported: en - English (default) ja - Japanese po - Polish tr - Turkish To add your language, to create ${your_language}.po by translating source/po/en.po into your language is needed. some of html and image files of various language version are not included yet, though message catalogue files are installed. you need to copy files manually under ${swatdir}/lang/$ln/{help,images,included,using_samba} And also added a option to intall manual pages: of various lang version To enable configure with --with-manlangs but manual pages themself are not included yet. (This used to be commit 486b79a6fc4ba20a751aab544bd0f7ccff2b3d19) --- source3/web/statuspage.c | 72 +++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 35 deletions(-) (limited to 'source3/web/statuspage.c') diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index e930629eee..61bbf67a13 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "webintl.h" static pid_t smbd_pid; @@ -36,19 +37,19 @@ static void print_share_mode(share_mode_entry *e, char *fname) printf("%d",(int)e->pid); printf(""); switch ((e->share_mode>>4)&0xF) { - case DENY_NONE: printf("DENY_NONE"); break; - case DENY_ALL: printf("DENY_ALL "); break; - case DENY_DOS: printf("DENY_DOS "); break; - case DENY_READ: printf("DENY_READ "); break; - case DENY_WRITE:printf("DENY_WRITE "); break; + case DENY_NONE: printf(_("DENY_NONE")); break; + case DENY_ALL: printf(_("DENY_ALL ")); break; + case DENY_DOS: printf(_("DENY_DOS ")); break; + case DENY_READ: printf(_("DENY_READ ")); break; + case DENY_WRITE:printf(_("DENY_WRITE ")); break; } printf(""); printf(""); switch (e->share_mode&0xF) { - case 0: printf("RDONLY "); break; - case 1: printf("WRONLY "); break; - case 2: printf("RDWR "); break; + case 0: printf(_("RDONLY ")); break; + case 1: printf(_("WRONLY ")); break; + case 2: printf(_("RDWR ")); break; } printf(""); @@ -56,15 +57,15 @@ static void print_share_mode(share_mode_entry *e, char *fname) if((e->op_type & (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) == (EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) - printf("EXCLUSIVE+BATCH "); + printf(_("EXCLUSIVE+BATCH ")); else if (e->op_type & EXCLUSIVE_OPLOCK) - printf("EXCLUSIVE "); + printf(_("EXCLUSIVE ")); else if (e->op_type & BATCH_OPLOCK) - printf("BATCH "); + printf(_("BATCH ")); else if (e->op_type & LEVEL_II_OPLOCK) - printf("LEVEL_II "); + printf(_("LEVEL_II ")); else - printf("NONE "); + printf(_("NONE ")); printf(""); printf("%s%s\n", @@ -107,7 +108,7 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st printf("%d%s%s%s\n", (int)crec.pid, - crec.machine,crec.addr, + crec.machine, crec.addr, tstring(crec.start)); if (geteuid() == 0) { printf("\n", @@ -190,18 +191,18 @@ void status_page(void) tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); if (tdb) tdb_traverse(tdb, traverse_fn1, NULL); - printf("

Server Status

\n"); + printf("

%s

\n", _("Server Status")); printf("
\n"); if (!autorefresh) { - printf("\n"); - printf("
Refresh Interval: "); + printf("\n", _("Auto Refresh")); + printf("
%s", _("Refresh Interval: ")); printf("\n", refresh_interval); } else { - printf("\n"); - printf("
Refresh Interval: %d\n", refresh_interval); + printf("\n", _("Stop Refreshing")); + printf("
%s%d\n", _("Refresh Interval: "), refresh_interval); printf("\n"); } @@ -215,40 +216,40 @@ void status_page(void) printf("\n"); - printf("",VERSION); + printf("", _("version:"), VERSION); fflush(stdout); - printf("\n",smbd_running()?"":"not "); + printf("\n", _("smbd:"), smbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (smbd_running()) { - printf("\n"); + printf("\n", _("Stop smbd")); } else { - printf("\n"); + printf("\n", _("Start smbd")); } - printf("\n"); + printf("\n", _("Restart smbd")); } printf("\n"); fflush(stdout); - printf("\n",nmbd_running()?"":"not "); + printf("\n", _("nmbd:"), nmbd_running()?_("running"):_("not running")); if (geteuid() == 0) { if (nmbd_running()) { - printf("\n"); + printf("\n", _("Stop nmbd")); } else { - printf("\n"); + printf("\n", _("Start nmbd")); } - printf("\n"); + printf("\n", _("Restart nmbd")); } printf("\n"); printf("
version:%s
%s%s
smbd:%srunning
%s%s
nmbd:%srunning
%s%s
\n"); fflush(stdout); - printf("

Active Connections

\n"); + printf("

%s

\n", _("Active Connections")); printf("\n"); - printf("\n"); + printf("\n", _("PID"), _("Client"), _("IP address"), _("Date")); if (geteuid() == 0) { - printf("\n"); + printf("\n", _("Kill")); } printf("\n"); @@ -256,17 +257,18 @@ void status_page(void) printf("
PIDClientIP addressDate
%s%s%s%sKill%s

\n"); - printf("

Active Shares

\n"); + printf("

%s

\n", _("Active Shares")); printf("\n"); - printf("\n\n"); + printf("\n\n", + _("Share"), _("User"), _("Group"), _("PID"), _("Client"), _("Date")); if (tdb) tdb_traverse(tdb, traverse_fn3, NULL); printf("
ShareUserGroupPIDClientDate
%s%s%s%s%s%s

\n"); - printf("

Open Files

\n"); + printf("

%s

\n", _("Open Files")); printf("\n"); - printf("\n"); + printf("\n", _("PID"), _("Sharing"), _("R/W"), _("Oplock"), _("File"), _("Date")); locking_init(1); share_mode_forall(print_share_mode); -- cgit
PIDSharingR/WOplockFileDate
%s%s%s%s%s%s