Merge pull request #5449 from pratikshad/fixedWebtest4.6
[civicrm-core.git] / CRM / Core / I18n.php
index 084e7e769e3179fd3ac91ecb4eff9b6da86279a8..fee6c84dd2c2e094ca6e500f562a14cd1b5adb5f 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -268,6 +268,9 @@ class CRM_Core_I18n {
       $domain = NULL;
     }
 
+    $raw = !empty($params['raw']);
+    unset($params['raw']);
+
     if (!empty($domain)) {
       // It might be prettier to cast to an array, but this is high-traffic stuff.
       if (is_array($domain)) {
@@ -288,7 +291,7 @@ class CRM_Core_I18n {
     }
 
     // replace the numbered %1, %2, etc. params if present
-    if (count($params)) {
+    if (count($params) && !$raw) {
       $text = $this->strarg($text, $params);
     }
 
@@ -510,6 +513,8 @@ class CRM_Core_I18n {
 
   /**
    * Static instance provider - return the instance for the current locale.
+   *
+   * @return CRM_Core_I18n
    */
   public static function &singleton() {
     static $singleton = array();
@@ -540,6 +545,7 @@ class CRM_Core_I18n {
 
     return $locales[$tsLocale];
   }
+
 }
 
 /**