]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
clean up singular vs. plural output for the 'show dialplan' CLI command
authorRussell Bryant <russell@russellbryant.com>
Fri, 16 Sep 2005 18:11:00 +0000 (18:11 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 16 Sep 2005 18:11:00 +0000 (18:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6623 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index a2f38f6c1f35a88494e8e07d517ed7f5134c86b3..c5cc805029d367e93e6bd95e5113a37025ec8207 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -3506,8 +3506,10 @@ static int handle_show_dialplan(int fd, int argc, char *argv[])
                return RESULT_FAILURE;
        }
 
-       ast_cli(fd,"-= %d extensions (%d priorities) in %d contexts. =-\n",
-                               counters.total_exten, counters.total_prio, counters.total_context);
+       ast_cli(fd,"-= %d %s (%d %s) in %d %s. =-\n",
+                               counters.total_exten, counters.total_exten == 1 ? "extension" : "extensions",
+                               counters.total_prio, counters.total_prio == 1 ? "priority" : "priorities",
+                               counters.total_context, counters.total_context == 1 ? "context" : "contexts");
 
        /* everything ok */
        return RESULT_SUCCESS;