[Sungrazr-svn] [88] Console: [FIX] Changes for Sungrazr_Console and Sungrazr_Controller_Console to accomodate new replace parameter changes made to Solar Locale

0 views
Skip to first unread message

cl...@killersoft.com

unread,
Jun 14, 2007, 7:20:34 PM6/14/07
to Sungra...@googlegroups.com
Revision
88
Author
clay
Date
2007-06-14 16:20:30 -0700 (Thu, 14 Jun 2007)

Log Message

Console: [FIX] Changes for Sungrazr_Console and Sungrazr_Controller_Console to accomodate new replace parameter changes made to Solar Locale

Modified Paths

Diff

Modified: trunk/Sungrazr/Console.php (87 => 88)


--- trunk/Sungrazr/Console.php	2007-06-14 23:17:20 UTC (rev 87)
+++ trunk/Sungrazr/Console.php	2007-06-14 23:20:30 UTC (rev 88)
@@ -857,13 +857,16 @@
      * @param string $num If 1, returns a singular string; otherwise, returns
      * a plural string (if one exists).
      * 
+     * @param array $replace An array of replacement values for the string, to
+     * be applied using [[php::vsprintf() | ]].
+     * 
      * @return string The locale string, or the original $key if no
      * string found.
      * 
      */
-    public function locale($key, $num = 1)
+    public function locale($key, $num = 1, $replace = null)
     {
-        $string = Solar::$locale->fetch(get_class($this), $key, $num);
+        $string = Solar::$locale->fetch(get_class($this), $key, $num, $replace);
         $string = str_replace(
             array_keys($this->style_map),
             $this->style_map,

Modified: trunk/Sungrazr/Controller/Console.php (87 => 88)


--- trunk/Sungrazr/Controller/Console.php	2007-06-14 23:17:20 UTC (rev 87)
+++ trunk/Sungrazr/Controller/Console.php	2007-06-14 23:20:30 UTC (rev 88)
@@ -991,13 +991,16 @@
      * @param string $num If 1, returns a singular string; otherwise, returns
      * a plural string (if one exists).
      * 
+     * @param array $replace An array of replacement values for the string, to
+     * be applied using [[php::vsprintf() | ]].
+     * 
      * @return string The locale string, or the original $key if no
      * string found.
      * 
      */
-     public function locale($key, $num = 1)
+     public function locale($key, $num = 1, $replace = null)
      {
-         $string = Solar::locale(get_class($this), $key, $num);
+         $string = Solar::$locale->fetch(get_class($this), $key, $num, $replace);
          $string = str_replace(
              array_keys($this->_console->style_map),
              $this->_console->style_map,
Reply all
Reply to author
Forward
0 new messages