From 170fbb18b7bb89eb258cf8ee54c38f9b8125cf09 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 15 May 2016 14:34:57 +0930 Subject: [PATCH] Customize limiter info message The $dn_default_shaper_msg is what is displayed on the Limiters tab. It needs to talk about "limiter" rather than "queue". This code builds up each message using the same base template sentences, inserting "queue" or "limiter" in the appropriate place. (cherry picked from commit aadc135856a0dc2cb131aeda3fd7bc44c11ab123) --- src/etc/inc/shaper.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc index b6cffe3ab6..317b6acad6 100644 --- a/src/etc/inc/shaper.inc +++ b/src/etc/inc/shaper.inc @@ -4667,9 +4667,14 @@ function build_iface_without_this_queue($iface, $qname) { } $default_shaper_msg = sprintf(gettext("Welcome to the %s Traffic Shaper."), $g['product_name']) . "
"; -$default_shaper_msg .= gettext("The tree on the left navigates through the queues.
" - . "Buttons at the bottom represent queue actions and are activated accordingly."); - $dn_default_shaper_msg = $default_shaper_msg; +$shaper_msg = gettext("The tree on the left navigates through the %s."); +$default_shaper_msg .= sprintf($shaper_msg, gettext("queues")) . "
"; +$dn_default_shaper_msg .= sprintf($shaper_msg, gettext("limiters")) . "
"; + +$shaper_msg = gettext("Buttons at the bottom represent %s actions and are activated accordingly."); +$default_shaper_msg .= sprintf($shaper_msg, gettext("queue")); +$dn_default_shaper_msg .= sprintf($shaper_msg, gettext("limiter")); + ?>