Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2012-03-24 06:51:28 +0400
committermattpiwik <matthieu.aubry@gmail.com>2012-03-24 06:51:28 +0400
commite27d3fd38ac3be9937dbc997d52400e30740283f (patch)
treefcb324f8c8b50abc8949eb6629939e547e2dcced /core/Translate.php
parent44736bb9990bce249ec204775a319fe87ad60eb6 (diff)
Fix build?
git-svn-id: http://dev.piwik.org/svn/trunk@6107 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Translate.php')
-rw-r--r--core/Translate.php36
1 files changed, 20 insertions, 16 deletions
diff --git a/core/Translate.php b/core/Translate.php
index f3ded9695e..05a08a4b92 100644
--- a/core/Translate.php
+++ b/core/Translate.php
@@ -213,22 +213,26 @@ function Piwik_Translate($string, $args = array())
return vsprintf($string, $args);
}
-/**
- * Returns translated string or given message if translation is not found.
- * This function does not throw any exception. Use it to translate exceptions.
- *
- * @param string $message Translation string index
- * @param array $args sprintf arguments
- * @return string
- */
-function Piwik_TranslateException($message, $args = array())
+// this statement is needed for an unknown reason, for the test tests/core/Piwik/jsProxy.test.php to pass
+if(!function_exists('Piwik_TranslateException'))
{
- try
- {
- return Piwik_Translate($message, $args);
- }
- catch(Exception $e)
+ /**
+ * Returns translated string or given message if translation is not found.
+ * This function does not throw any exception. Use it to translate exceptions.
+ *
+ * @param string $message Translation string index
+ * @param array $args sprintf arguments
+ * @return string
+ */
+ function Piwik_TranslateException($message, $args = array())
{
- return $message;
+ try
+ {
+ return Piwik_Translate($message, $args);
+ }
+ catch(Exception $e)
+ {
+ return $message;
+ }
}
-}
+} \ No newline at end of file