diff options
author | Björn Jacke <bj@sernet.de> | 2010-01-18 23:39:19 +0100 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-01-18 23:45:05 +0100 |
commit | bd3c922e2bc1a163efc1d8c9cb59578bebb79616 (patch) | |
tree | f23544c18ce2c0ac8e9ff4b4f0302e4172aa1794 /source3/utils/net_cache.c | |
parent | c3ef7a3d96763719de1df679d50fb8a00d1f7391 (diff) | |
download | samba-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_cache.c')
-rw-r--r-- | source3/utils/net_cache.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index 96306375fa9..41bf7ef1c7f 100644 --- a/source3/utils/net_cache.c +++ b/source3/utils/net_cache.c @@ -155,7 +155,8 @@ static int net_cache_add(struct net_context *c, int argc, const char **argv) time_t timeout; if (argc < 3 || c->display_usage) { - d_printf(_("\nUsage:\nnet cache add <key string> <data string> " + d_printf("\n",_("Usage:\n"), + _("net cache add <key string> <data string> " "<timeout>\n")); return -1; } @@ -192,7 +193,7 @@ static int net_cache_del(struct net_context *c, int argc, const char **argv) const char *keystr = argv[0]; if (argc < 1 || c->display_usage) { - d_printf(_("\nUsage: net cache del <key string>\n")); + d_printf("\n",_("Usage:"), _(" net cache del <key string>\n")); return -1; } @@ -220,7 +221,7 @@ static int net_cache_get(struct net_context *c, int argc, const char **argv) time_t timeout; if (argc < 1 || c->display_usage) { - d_printf(_("\nUsage: net cache get <key>\n")); + d_printf("\n", _("Usage:"), _(" net cache get <key>\n")); return -1; } @@ -247,7 +248,7 @@ static int net_cache_search(struct net_context *c, int argc, const char **argv) const char* pattern; if (argc < 1 || c->display_usage) { - d_printf(_("Usage: net cache search <pattern>\n")); + d_printf(_("Usage:"), _(" net cache search <pattern>\n")); return -1; } @@ -269,9 +270,9 @@ static int net_cache_list(struct net_context *c, int argc, const char **argv) const char* pattern = "*"; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache list\n" - " List all cache entries.\n")); + " ", _("List all cache entries.\n")); return 0; } gencache_iterate(print_cache_entry, NULL, pattern); @@ -290,9 +291,9 @@ static int net_cache_flush(struct net_context *c, int argc, const char **argv) { const char* pattern = "*"; if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache flush\n" - " Delete all cache entries.\n")); + " ", _("Delete all cache entries.\n")); return 0; } gencache_iterate(delete_cache_entry, NULL, pattern); @@ -303,9 +304,9 @@ static int net_cache_stabilize(struct net_context *c, int argc, const char **argv) { if (c->display_usage) { - d_printf(_("Usage:\n" + d_printf(_("Usage:\n"), "net cache flush\n" - " Delete all cache entries.\n")); + " ", _("Delete all cache entries.\n")); return 0; } |