summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortof <>2008-06-03 14:33:23 +0000
committertof <>2008-06-03 14:33:23 +0000
commitfc7a265444190876cf18e83d1ce89c8e71ec237f (patch)
treeb68893c877c1903c73beb6045929b16a4f3702a3
parent9868f4ec0609bcdf4684df97b8ada90b838807df (diff)
Fixed #860
-rw-r--r--HISTORY1
-rw-r--r--framework/PradoBase.php12
2 files changed, 7 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index bf7e0ffb..b56b2c61 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ BUG: Ticket#841 - Strange output from THttpResponse (Christophe)
BUG: Ticket#847 - getBaseUrl sometimes fails (Christophe)
BUG: Ticket#843 - TDataList alternatinItem issue after changes in rev 2227 (Christophe)
BUG: Ticket#849 - TDatePicker selecting current date problem (Christophe)
+BUG: Ticket#860 - Prado::localize() bug (japplegame)
ENH: Added Prado.Validation.validateControl(id) on client side to validate a specific control (Michael)
Version 3.1.2 April 21, 2008
diff --git a/framework/PradoBase.php b/framework/PradoBase.php
index d9e9444e..2fba2ffd 100644
--- a/framework/PradoBase.php
+++ b/framework/PradoBase.php
@@ -571,11 +571,11 @@ class PradoBase
//no translation handler provided
if($app===null || ($config = $app->getTranslationConfiguration())===null)
return strtr($text, $params);
-
- Translation::init();
-
- if(empty($catalogue) && isset($config['catalogue']))
- $catalogue = $config['catalogue'];
+
+ if ($catalogue===null)
+ $catalogue=isset($config['catalogue'])?$config['catalogue']:'messages';
+
+ Translation::init($catalogue);
//globalization charset
$appCharset = $app===null ? '' : $app->getCharset();
@@ -587,7 +587,7 @@ class PradoBase
if(empty($charset)) $charset = $appCharset;
if(empty($charset)) $charset = $defaultCharset;
- return Translation::formatter()->format($text,$params,$catalogue,$charset);
+ return Translation::formatter($catalogue)->format($text,$params,$catalogue,$charset);
}
}