From bd3c922e2bc1a163efc1d8c9cb59578bebb79616 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Mon, 18 Jan 2010 23:39:19 +0100 Subject: s3/net: split up some printable stings to ease i18n If we put strings like "Usage:" into separate _() macros and not the whole "Usage:..." string we can cover much more messages by only one single translation. The drawback is that the message in the sources looks less pretty. --- source3/utils/net_sam.c | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'source3/utils/net_sam.c') diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index fe84ce4674..c3b328bae5 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -37,7 +37,7 @@ static int net_sam_userset(struct net_context *c, int argc, const char **argv, NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam set %s \n"), + d_fprintf(stderr, _("usage:"),_(" net sam set %s \n"), field); return -1; } @@ -142,7 +142,7 @@ static int net_sam_set_userflag(struct net_context *c, int argc, if ((argc != 2) || c->display_usage || (!strequal(argv[1], "yes") && !strequal(argv[1], "no"))) { - d_fprintf(stderr, _("usage: net sam set %s [yes|no]\n"), + d_fprintf(stderr, _("usage:"),_(" net sam set %s [yes|no]\n"), field); return -1; } @@ -234,7 +234,7 @@ static int net_sam_set_pwdmustchangenow(struct net_context *c, int argc, (!strequal(argv[1], "yes") && !strequal(argv[1], "no"))) { d_fprintf(stderr, - _("usage: net sam set pwdmustchangenow " + _("usage:"),_(" net sam set pwdmustchangenow " "[yes|no]\n")); return -1; } @@ -297,7 +297,7 @@ static int net_sam_set_comment(struct net_context *c, int argc, NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam set comment " + d_fprintf(stderr, _("usage:"),_(" net sam set comment " "\n")); return -1; } @@ -461,7 +461,7 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv char *endptr; if (argc != 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam policy set " + d_fprintf(stderr, _("usage:"),_(" net sam policy set " "\"\" \n")); return -1; } @@ -527,7 +527,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg enum pdb_policy_type field; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam policy show" + d_fprintf(stderr, _("usage:"),_(" net sam policy show" " \"\" \n")); return -1; } @@ -572,9 +572,9 @@ static int net_sam_policy_list(struct net_context *c, int argc, const char **arg int i; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net sam policy list\n" - " List account policies\n")); + " ",_("List account policies\n")); return 0; } @@ -631,8 +631,8 @@ static int net_sam_rights_list(struct net_context *c, int argc, SE_PRIV mask; if (argc > 1 || c->display_usage) { - d_fprintf(stderr, - _("usage: net sam rights list [privilege name]\n")); + d_fprintf(stderr, _("usage:"), + _(" net sam rights list [privilege name]\n")); return -1; } @@ -687,7 +687,7 @@ static int net_sam_rights_grant(struct net_context *c, int argc, int i; if (argc < 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam rights grant " + d_fprintf(stderr, _("usage:"),_(" net sam rights grant " " ...\n")); return -1; } @@ -725,7 +725,7 @@ static int net_sam_rights_revoke(struct net_context *c, int argc, int i; if (argc < 2 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam rights revoke " + d_fprintf(stderr, _("usage:"),_(" net sam rights revoke " "\n")); return -1; } @@ -852,7 +852,7 @@ static int net_sam_mapunixgroup(struct net_context *c, int argc, const char **ar struct group *grp; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam mapunixgroup \n")); + d_fprintf(stderr, _("usage:"),_(" net sam mapunixgroup \n")); return -1; } @@ -914,7 +914,7 @@ static int net_sam_unmapunixgroup(struct net_context *c, int argc, const char ** struct group *grp; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam unmapunixgroup \n")); + d_fprintf(stderr, _("usage:"),_(" net sam unmapunixgroup \n")); return -1; } @@ -950,7 +950,7 @@ static int net_sam_createdomaingroup(struct net_context *c, int argc, if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net sam createdomaingroup \n")); + _("usage:"),_(" net sam createdomaingroup \n")); return -1; } @@ -981,7 +981,7 @@ static int net_sam_deletedomaingroup(struct net_context *c, int argc, NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam deletelocalgroup \n")); + d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup \n")); return -1; } @@ -1022,7 +1022,7 @@ static int net_sam_createlocalgroup(struct net_context *c, int argc, const char uint32 rid; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam createlocalgroup \n")); + d_fprintf(stderr,_("usage:"),_(" net sam createlocalgroup \n")); return -1; } @@ -1057,7 +1057,7 @@ static int net_sam_deletelocalgroup(struct net_context *c, int argc, const char NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam deletelocalgroup \n")); + d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup \n")); return -1; } @@ -1100,7 +1100,7 @@ static int net_sam_createbuiltingroup(struct net_context *c, int argc, const cha if (argc != 1 || c->display_usage) { d_fprintf(stderr, - _("usage: net sam createbuiltingroup \n")); + _("usage:"),_(" net sam createbuiltingroup \n")); return -1; } @@ -1152,7 +1152,7 @@ static int net_sam_addmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam addmem \n")); + d_fprintf(stderr,_("usage:"),_(" net sam addmem \n")); return -1; } @@ -1239,7 +1239,7 @@ static int net_sam_delmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 2 || c->display_usage) { - d_fprintf(stderr,_("usage: net sam delmem \n")); + d_fprintf(stderr,_("usage:"),_(" net sam delmem \n")); return -1; } @@ -1311,7 +1311,7 @@ static int net_sam_listmem(struct net_context *c, int argc, const char **argv) NTSTATUS status; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam listmem \n")); + d_fprintf(stderr, _("usage:"),_(" net sam listmem \n")); return -1; } @@ -1385,7 +1385,7 @@ static int net_sam_do_list(struct net_context *c, int argc, const char **argv, if ((argc > 1) || c->display_usage || ((argc == 1) && !strequal(argv[0], "verbose"))) { - d_fprintf(stderr,_("usage: net sam list %s [verbose]\n"), what); + d_fprintf(stderr,_("usage:"),_(" net sam list %s [verbose]\n"), what); return -1; } @@ -1518,7 +1518,7 @@ static int net_sam_show(struct net_context *c, int argc, const char **argv) const char *dom, *name; if (argc != 1 || c->display_usage) { - d_fprintf(stderr, _("usage: net sam show \n")); + d_fprintf(stderr, _("usage:"),_(" net sam show \n")); return -1; } @@ -1556,9 +1556,9 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv) struct passwd *pwd; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net sam provision\n" - " Init an LDAP tree with default " + " ",_("Init an LDAP tree with default " "users/groups\n")); return 0; } -- cgit