From: Chuck Hagenbuch Date: Sun, 4 Oct 2009 02:57:40 +0000 (-0400) Subject: Stub out gettext functions if they don't exist to avoid fatal errors in tests. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4b13e853c67507d8fd81e0ffa15d26f6343e1235;p=horde.git Stub out gettext functions if they don't exist to avoid fatal errors in tests. --- diff --git a/framework/bin/test_framework b/framework/bin/test_framework index 791c95e7d..23fcd4a09 100755 --- a/framework/bin/test_framework +++ b/framework/bin/test_framework @@ -79,3 +79,28 @@ class horde_test_runner return $suite; } } + +/* Stand-in functions if gettext is not available. */ +if (!function_exists('_')) { + function _($string) + { + return $string; + } +} + +if (!function_exists('ngettext')) { + function ngettext($msgid1, $msgid2, $n) + { + return $n > 1 ? $msgid2 : $msgid1; + } +} + +if (!function_exists('bindtextdomain')) { + function bindtextdomain() + {} +} + +if (!function_exists('textdomain')) { + function textdomain() + {} +}