#877262: Allow section title, subtitle theme reaction strings to be translated. 6.x-3.0-beta8
authoryoung hahn
Mon, 9 Aug 2010 15:13:03 +0000 (15:13 +0000)
committeryoung hahn
Mon, 9 Aug 2010 15:13:03 +0000 (15:13 +0000)
plugins/context_reaction_theme.inc

index 3696cb5..5e69972 100644 (file)
@@ -64,21 +64,17 @@ class context_reaction_theme extends context_reaction {
    */
   function execute(&$vars) {
     $classes = array();
-
     foreach ($this->get_contexts() as $k => $v) {
       if (!empty($v->reactions[$this->plugin]['title']) && !isset($vars['section_title'])) {
-        $vars['section_title'] = $v->reactions[$this->plugin]['title'];
+        $vars['section_title'] = t($v->reactions[$this->plugin]['title']);
       }
-
       if (!empty($v->reactions[$this->plugin]['subtitle']) && !isset($vars['section_subtitle'])) {
-        $vars['section_subtitle'] = $v->reactions[$this->plugin]['subtitle'];
+        $vars['section_subtitle'] = t($v->reactions[$this->plugin]['subtitle']);
       }
-
       if (!empty($v->reactions[$this->plugin]['class'])) {
         $classes[$v->reactions[$this->plugin]['class']] = $v->reactions[$this->plugin]['class'];
       }
     }
-
     $vars['body_classes'] .= !empty($classes) ? ' '. implode(' ', $classes) : '';
   }
 }