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_cache.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'source3/utils/net_cache.c') diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index 96306375fa..41bf7ef1c7 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 " + d_printf("\n",_("Usage:\n"), + _("net cache add " "\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 \n")); + d_printf("\n",_("Usage:"), _(" net cache del \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 \n")); + d_printf("\n", _("Usage:"), _(" net cache get \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 \n")); + d_printf(_("Usage:"), _(" net cache search \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; } -- cgit