s3 net: i18n support for net lookup
authorKai Blin <kai@samba.org>
Thu, 30 Jul 2009 10:10:56 +0000 (12:10 +0200)
committerKai Blin <kai@samba.org>
Thu, 30 Jul 2009 10:10:56 +0000 (12:10 +0200)
source3/po/genmsg
source3/utils/net_lookup.c

index 5dfff1521f5bcb81dfa112f3d86a82fa74bc2f4b..f845409075a35bf7281868b53591b993a5693609 100755 (executable)
@@ -29,7 +29,7 @@ add_basedir_to_filelist() {
 NET_FILES=`add_basedir_to_filelist ../utils net.c net_ads.c net_ads_gpo.c \
           net_afs.c net_cache.c net_conf.c net_dom.c net_eventlog.c \
           net_file.c net_group.c net_groupmap.c net_help.c net_help_common.c \
-          net_idmap.c net_join.c`
+          net_idmap.c net_join.c net_lookup.c`
 
 FILES="../web/swat.c ../web/statuspage.c ../param/loadparm.c ${NET_FILES}"
 LANGS='en ja tr pl fr de it ru'
index e770e3299f9ea70308009cdd5ca86a7eb94b68b2..21b2c4329eb7b629cf23db1fa2f722f0b1494df3 100644 (file)
@@ -21,7 +21,7 @@
 
 int net_lookup_usage(struct net_context *c, int argc, const char **argv)
 {
-       d_printf(
+       d_printf(_(
 "  net lookup [host] HOSTNAME[#<type>]\n\tgives IP for a hostname\n\n"
 "  net lookup ldap [domain]\n\tgives IP of domain's ldap server\n\n"
 "  net lookup kdc [realm]\n\tgives IP of realm's kerberos KDC\n\n"
@@ -31,7 +31,7 @@ int net_lookup_usage(struct net_context *c, int argc, const char **argv)
 "  net lookup name [name]\n\tLookup name's sid and type\n\n"
 "  net lookup sid [sid]\n\tGive sid's name and type\n\n"
 "  net lookup dsgetdcname [name] [flags] [sitename]\n\n"
-);
+));
        return -1;
 }
 
@@ -109,7 +109,7 @@ static int net_lookup_ldap(struct net_context *c, int argc, const char **argv)
        sitename = sitename_fetch(domain);
 
        if ( (ctx = talloc_init("net_lookup_ldap")) == NULL ) {
-               d_fprintf(stderr, "net_lookup_ldap: talloc_init() failed!\n");
+               d_fprintf(stderr,_("net_lookup_ldap: talloc_init() failed!\n"));
                SAFE_FREE(sitename);
                return -1;
        }
@@ -322,13 +322,13 @@ static int net_lookup_name(struct net_context *c, int argc, const char **argv)
        enum lsa_SidType type;
 
        if (argc != 1) {
-               d_printf("usage: net lookup name <name>\n");
+               d_printf(_("usage: net lookup name <name>\n"));
                return -1;
        }
 
        if (!lookup_name(talloc_tos(), argv[0], LOOKUP_NAME_ALL,
                         &dom, &name, &sid, &type)) {
-               d_printf("Could not lookup name %s\n", argv[0]);
+               d_printf(_("Could not lookup name %s\n"), argv[0]);
                return -1;
        }
 
@@ -344,18 +344,18 @@ static int net_lookup_sid(struct net_context *c, int argc, const char **argv)
        enum lsa_SidType type;
 
        if (argc != 1) {
-               d_printf("usage: net lookup sid <sid>\n");
+               d_printf(_("usage: net lookup sid <sid>\n"));
                return -1;
        }
 
        if (!string_to_sid(&sid, argv[0])) {
-               d_printf("Could not convert %s to SID\n", argv[0]);
+               d_printf(_("Could not convert %s to SID\n"), argv[0]);
                return -1;
        }
 
        if (!lookup_sid(talloc_tos(), &sid,
                        &dom, &name, &type)) {
-               d_printf("Could not lookup name %s\n", argv[0]);
+               d_printf(_("Could not lookup name %s\n"), argv[0]);
                return -1;
        }
 
@@ -375,8 +375,8 @@ static int net_lookup_dsgetdcname(struct net_context *c, int argc, const char **
        char *s = NULL;
 
        if (argc < 1 || argc > 3) {
-               d_printf("usage: net lookup dsgetdcname "
-                        "<name> <flags> <sitename>\n");
+               d_printf(_("usage: net lookup dsgetdcname "
+                          "<name> <flags> <sitename>\n"));
                return -1;
        }
 
@@ -401,7 +401,7 @@ static int net_lookup_dsgetdcname(struct net_context *c, int argc, const char **
        status = dsgetdcname(mem_ctx, NULL, domain_name, NULL, site_name,
                             flags, &info);
        if (!NT_STATUS_IS_OK(status)) {
-               d_printf("failed with: %s\n", nt_errstr(status));
+               d_printf(_("failed with: %s\n"), nt_errstr(status));
                TALLOC_FREE(mem_ctx);
                return -1;
        }
@@ -434,7 +434,7 @@ int net_lookup(struct net_context *c, int argc, const char **argv)
        };
 
        if (argc < 1) {
-               d_printf("\nUsage: \n");
+               d_printf(_("\nUsage: \n"));
                return net_lookup_usage(c, argc, argv);
        }
        for (i=0; table[i].funcname; i++) {