summaryrefslogtreecommitdiff
path: root/source3/utils/net_sam.c
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-01-18 23:39:19 +0100
committerBjörn Jacke <bj@sernet.de>2010-01-18 23:45:05 +0100
commitbd3c922e2bc1a163efc1d8c9cb59578bebb79616 (patch)
treef23544c18ce2c0ac8e9ff4b4f0302e4172aa1794 /source3/utils/net_sam.c
parentc3ef7a3d96763719de1df679d50fb8a00d1f7391 (diff)
downloadsamba-bd3c922e2bc1a163efc1d8c9cb59578bebb79616.tar.gz
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.
Diffstat (limited to 'source3/utils/net_sam.c')
-rw-r--r--source3/utils/net_sam.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index fe84ce4674f..c3b328bae53 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 <user> <value>\n"),
+ d_fprintf(stderr, _("usage:"),_(" net sam set %s <user> <value>\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 <user> [yes|no]\n"),
+ d_fprintf(stderr, _("usage:"),_(" net sam set %s <user> [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 <user> "
+ _("usage:"),_(" net sam set pwdmustchangenow <user> "
"[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 <name> "
+ d_fprintf(stderr, _("usage:"),_(" net sam set comment <name> "
"<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 "
"\"<account policy>\" <value> \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"
" \"<account policy>\" \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 <name> "
+ d_fprintf(stderr, _("usage:"),_(" net sam rights grant <name> "
"<rights> ...\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 <name> "
+ d_fprintf(stderr, _("usage:"),_(" net sam rights revoke <name> "
"<rights>\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 <name>\n"));
+ d_fprintf(stderr, _("usage:"),_(" net sam mapunixgroup <name>\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 <name>\n"));
+ d_fprintf(stderr, _("usage:"),_(" net sam unmapunixgroup <name>\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 <name>\n"));
+ _("usage:"),_(" net sam createdomaingroup <name>\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 <name>\n"));
+ d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup <name>\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 <name>\n"));
+ d_fprintf(stderr,_("usage:"),_(" net sam createlocalgroup <name>\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 <name>\n"));
+ d_fprintf(stderr,_("usage:"),_(" net sam deletelocalgroup <name>\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 <name>\n"));
+ _("usage:"),_(" net sam createbuiltingroup <name>\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 <group> <member>\n"));
+ d_fprintf(stderr,_("usage:"),_(" net sam addmem <group> <member>\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 <group> <member>\n"));
+ d_fprintf(stderr,_("usage:"),_(" net sam delmem <group> <member>\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 <group>\n"));
+ d_fprintf(stderr, _("usage:"),_(" net sam listmem <group>\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 <name>\n"));
+ d_fprintf(stderr, _("usage:"),_(" net sam show <name>\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;
}