projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
154810b
)
Stub out gettext functions if they don't exist to avoid fatal errors in tests.
author
Chuck Hagenbuch
<chuck@horde.org>
Sun, 4 Oct 2009 02:57:40 +0000
(22:57 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Sun, 4 Oct 2009 03:01:33 +0000
(23:01 -0400)
framework/bin/test_framework
patch
|
blob
|
history
diff --git
a/framework/bin/test_framework
b/framework/bin/test_framework
index
791c95e
..
23fcd4a
100755
(executable)
--- 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()
+ {}
+}