Cleanup #11408: Object Browser uses hardcoded texts (plus some CGL cleanup)
authorFrancois Suter <francois.suter@typo3.org>
Wed, 15 Jul 2009 20:45:17 +0000 (20:45 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Wed, 15 Jul 2009 20:45:17 +0000 (20:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5718 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php

index f545668..6a41367 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-15  Francois Suter  <francois@typo3.org>
+
+       * Cleanup #11408: Object Browser uses hardcoded texts (plus some CGL cleanup) (thanks to Christopher Stelmaszyk)
+
 2009-07-15  Oliver Hader  <oliver@typo3.org>
 
        * Added feature #11510: Store timestamp of last modification of session data to frontend user object
index fa3c10f..4e15429 100644 (file)
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /**
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ * $Id$
  */
 
+$GLOBALS['LANG']->includeLLFile('EXT:tstemplate_objbrowser/locallang.xml');
+
+/**
+ * This class displays the submodule "TypoScript Object Browser" inside the Web > Template module
+ *
+ * @author             Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @package            TYPO3
+ * @subpackage tx_tstemplateobjbrowser
+ */
 class tx_tstemplateobjbrowser extends t3lib_extobjbase {
        function init(&$pObj,$conf)     {
                parent::init($pObj,$conf);
@@ -36,24 +47,22 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                $this->pObj->modMenu_setDefaultList.= ',ts_browser_fixedLgd,ts_browser_showComments';
        }
 
-       function modMenu()      {
-               global $LANG;
-
+       function modMenu() {
                $modMenu = array (
-                       "ts_browser_type" => array(
-                               "const" => "Constants",
-                               "setup" => "Setup"
+                       'ts_browser_type' => array(
+                               'const' => $GLOBALS['LANG']->getLL('constants', true),
+                               'setup' => $GLOBALS['LANG']->getLL('setup', true)
                        ),
-                       "ts_browser_toplevel_setup" => array(
-                               "0" => "ALL"
+                       'ts_browser_toplevel_setup' => array(
+                               '0' => t3lib_div::strtoupper($GLOBALS['LANG']->getLL('all', true))
                        ),
-                       "ts_browser_toplevel_const" => array(
-                               "0" => "ALL"
+                       'ts_browser_toplevel_const' => array(
+                               '0' => t3lib_div::strtoupper($GLOBALS['LANG']->getLL('all', true))
                        ),
-                       "ts_browser_const" => array(
-                               "0" => "Plain substitution (default)",
-                               "subst" => "Substituted constants in green",
-                               "const" => "UN-substituted constants in green"
+                       'ts_browser_const' => array(
+                               '0' => $GLOBALS['LANG']->getLL('plainSubstitution', true),
+                               'subst' => $GLOBALS['LANG']->getLL('substitutedGreen', true),
+                               'const' => $GLOBALS['LANG']->getLL('unsubstitutedGreen', true)
                        ),
                        'ts_browser_regexsearch' => '1',
                        'ts_browser_fixedLgd' => '1',
@@ -180,7 +189,7 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
         * @return      [type]          ...
         */
        function main() {
-               global $SOBE,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
+               global $SOBE,$BE_USER,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
                global $tmpl,$tplRow,$theConstants;
 
                $POST = t3lib_div::_POST();
@@ -206,7 +215,7 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                $bType= $this->pObj->MOD_SETTINGS["ts_browser_type"];
                $existTemplate = $this->initialize_editor($this->pObj->id,$template_uid);               // initialize
                if ($existTemplate)     {
-                       $theOutput .= '<h4 style="margin-bottom:5px;">Current template: <img ' .
+                       $theOutput .= '<h4 style="margin-bottom:5px;">' . $GLOBALS['LANG']->getLL('currentTemplate', true) . ' <img ' .
                                t3lib_iconWorks::skinImg($BACK_PATH, t3lib_iconWorks::getIcon('sys_template', $tplRow)) . ' align="top" /> <b>' .
                                $this->pObj->linkWrapTemplateTitle($tplRow["title"], ($bType == "setup" ? "config" : "constants")) . '</b>' .
                                htmlspecialchars(trim($tplRow["sitetitle"]) ? ' - (' . $tplRow["sitetitle"] . ')' : '') . '</h4>';
@@ -228,26 +237,39 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                        if ($POST["add_property"])      {
                                                $property = trim($POST["data"][$name]["name"]);
                                                if (preg_replace('/[^a-zA-Z0-9_\.]*/','',$property)!=$property) {
-                                                       $theOutput.=$this->pObj->doc->spacer(10);
-                                                       $theOutput .= $this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("BAD PROPERTY!"), 'You must enter a property with characters a-z, A-Z and 0-9, no spaces!<br />Nothing was updated!', 0, 0, 0, 1);
+                                                       $theOutput .= $this->pObj->doc->spacer(10);
+                                                       $theOutput .= $this->pObj->doc->section(
+                                                               $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('badProperty', true)),
+                                                               $GLOBALS['LANG']->getLL('noSpaces', true) . '<br />' . $GLOBALS['LANG']->getLL('nothingUpdated', true),
+                                                               0, 0, 0, 1
+                                                       );
                                                } else {
                                                        $pline= $name.".".$property." = ".trim($POST["data"][$name]["propertyValue"]);
-                                                       $theOutput.=$this->pObj->doc->spacer(10);
-                                                       $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("PROPERTY ADDED"),htmlspecialchars($pline),0,0,0,1);
+                                                       $theOutput .= $this->pObj->doc->spacer(10);
+                                                       $theOutput .= $this->pObj->doc->section(
+                                                               $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('propertyAdded', true)),
+                                                               htmlspecialchars($pline), 0, 0, 0, 1
+                                                       );
                                                        $line.=chr(10).$pline;
                                                }
                                        }
                                        elseif ($POST['update_value']) {
                                                $pline= $name." = ".trim($POST["data"][$name]["value"]);
-                                               $theOutput.=$this->pObj->doc->spacer(10);
-                                               $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("VALUE UPDATED"),htmlspecialchars($pline),0,0,0,1);
+                                               $theOutput .= $this->pObj->doc->spacer(10);
+                                               $theOutput .= $this->pObj->doc->section(
+                                                       $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('valueUpdated', true)),
+                                                       htmlspecialchars($pline), 0, 0, 0, 1
+                                               );
                                                $line.=chr(10).$pline;
                                        }
                                        elseif ($POST['clear_object']) {
                                                if ($POST["data"][$name]["clearValue"]) {
                                                        $pline= $name." >";
-                                                       $theOutput.=$this->pObj->doc->spacer(10);
-                                                       $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("Object cleared"),htmlspecialchars($pline),0,0,0,1);
+                                                       $theOutput .= $this->pObj->doc->spacer(10);
+                                                       $theOutput .= $this->pObj->doc->section(
+                                                               $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('objectCleared', true)),
+                                                               htmlspecialchars($pline), 0, 0, 0, 1
+                                                       );
                                                        $line.=chr(10).$pline;
                                                }
                                        }
@@ -326,9 +348,9 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                        // Value
                                $out = '';
                                $out.= $this->pObj->sObj.' =<br />';
-                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][value]" value="' . htmlspecialchars($theSetupValue) . '"' . $GLOBALS["TBE_TEMPLATE"]->formWidth(40) . ' />';
-                               $out .= '<input type="Submit" name="update_value" value="Update" />';
-                               $theOutput.=$this->pObj->doc->section("Edit object/property value:",$out,0,0);
+                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][value]" value="' . htmlspecialchars($theSetupValue) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />';
+                               $out .= '<input type="Submit" name="update_value" value="' . $GLOBALS['LANG']->getLL('updateButton', true) . '" />';
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editProperty', true), $out, 0, 0);
 
                                        // Property
                                if (t3lib_extMgm::isLoaded("tsconfig_help"))    {
@@ -337,37 +359,39 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                        $params["formName"]="editForm";
                                        $params["itemName"]="data[".$this->pObj->sObj."][name]";
                                        $params["itemValue"]="data[".$this->pObj->sObj."][propertyValue]";
-                                       $TSicon='<a href="#" onClick="vHWin=window.open(\''.$url.t3lib_div::implodeArrayForUrl("",array("P"=>$params)).'\',\'popUp'.$md5ID.'\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;"><img src="'.$BACK_PATH.'gfx/wizard_tsconfig_s.gif" width="22" height="16" border="0" class="absmiddle" hspace=2 title="TSref reference"></a>';
+                                       $TSicon = '<a href="#" onClick="vHWin=window.open(\'' . $url . t3lib_div::implodeArrayForUrl("", array("P"=>$params)) . '\',\'popUp' . $md5ID . '\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;"><img src="' . $BACK_PATH . 'gfx/wizard_tsconfig_s.gif" width="22" height="16" border="0" class="absmiddle" hspace=2 title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:tsRef', true) . '"></a>';
                                } else $TSicon="";
-                               $out="";
-                               $out="<nobr>".$this->pObj->sObj.".";
-                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][name]"' . $GLOBALS["TBE_TEMPLATE"]->formWidth(20) . ' />' . $TSicon . ' = </nobr><br />';
-                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][propertyValue]"' . $GLOBALS["TBE_TEMPLATE"]->formWidth(40) . ' />';
-                               $out .= '<input type="Submit" name="add_property" value="Add" />';
+                               $out = '';
+                               $out = '<nobr>' . $this->pObj->sObj . '.';
+                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][name]"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' />' . $TSicon . ' = </nobr><br />';
+                               $out .= '<input type="Text" name="data[' . $this->pObj->sObj . '][propertyValue]"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />';
+                               $out .= '<input type="Submit" name="add_property" value="' . $GLOBALS['LANG']->getLL('addButton', true) . '" />';
 
-                               $theOutput.=$this->pObj->doc->spacer(20);
-                               $theOutput.=$this->pObj->doc->section("Add object property:",$out,0,0);
+                               $theOutput .= $this->pObj->doc->spacer(20);
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('addProperty', true), $out, 0, 0);
 
                                        // clear
-                               $out="";
-                               $out=$this->pObj->sObj." <b>CLEAR?</b> &nbsp;&nbsp;";
+                               $out = '';
+                               $out = $this->pObj->sObj." <b>" . t3lib_div::strtoupper($GLOBALS['LANG']->getLL('clear', true)) . "</b> &nbsp;&nbsp;";
                                $out .= '<input type="Checkbox" name="data[' . $this->pObj->sObj . '][clearValue]" value="1" />';
-                               $out .= '<input type="Submit" name="clear_object" value="Clear" />';
-                               $theOutput.=$this->pObj->doc->spacer(20);
-                               $theOutput.=$this->pObj->doc->section("Clear object:",$out,0,0);
+                               $out .= '<input type="Submit" name="clear_object" value="' . $GLOBALS['LANG']->getLL('clearButton', true) . '" />';
+                               $theOutput .= $this->pObj->doc->spacer(20);
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('clearObject', true), $out, 0, 0);
 
-                               $theOutput.=$this->pObj->doc->spacer(10);
+                               $theOutput .= $this->pObj->doc->spacer(10);
                        } else {
-                               $theOutput.=$this->pObj->doc->section("EDIT:",$GLOBALS["TBE_TEMPLATE"]->rfw("You cannot edit properties and values, if there's no current template."),0,0,0,1);
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('edit', true), $GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('noCurrentTemplate', true)), 0, 0, 0, 1);
                        }
                                // Links:
-                       $out='';
+                       $out = '';
                        if (!$this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType][$this->pObj->sObj]) {
                                if (count($theSetup))   {
-                                       $out = '<a href="index.php?id='.$this->pObj->id.'&addKey['.$this->pObj->sObj.']=1&SET[ts_browser_toplevel_'.$bType.']='.rawurlencode($this->pObj->sObj).'"><b>Add key</b></a> "'.$this->pObj->sObj.'" to Object List';
+                                       $out = '<a href="index.php?id=' . $this->pObj->id . '&addKey[' . $this->pObj->sObj . ']=1&SET[ts_browser_toplevel_' . $bType . ']=' . rawurlencode($this->pObj->sObj) . '">';
+                                       $out .= sprintf($GLOBALS['LANG']->getLL('addKey'), $this->pObj->sObj);
                                }
                        } else {
-                               $out = '<a href="index.php?id='.$this->pObj->id.'&addKey['.$this->pObj->sObj.']=0&SET[ts_browser_toplevel_'.$bType.']=0"><b>Remove key</b></a> "'.$this->pObj->sObj.'" from Object List';
+                               $out = '<a href="index.php?id=' . $this->pObj->id . '&addKey[' . $this->pObj->sObj . ']=0&SET[ts_browser_toplevel_' . $bType . ']=0">';
+                               $out .= sprintf($GLOBALS['LANG']->getLL('removeKey'), $this->pObj->sObj);
                        }
                        if ($out)       {
                                $theOutput.=$this->pObj->doc->divider(5);
@@ -375,7 +399,7 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                        }
 
                                // back
-                       $out = "< Back";
+                       $out = $GLOBALS['LANG']->getLL('back', true);
                        $out = '<a href="index.php?id='.$this->pObj->id.'"><b>'.$out.'</b></a>';
                        $theOutput.=$this->pObj->doc->divider(5);
                        $theOutput.=$this->pObj->doc->section("",$out);
@@ -387,17 +411,17 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                $tmpl->tsbrowser_depthKeys = $tmpl->ext_getSearchKeys($theSetup, '', t3lib_div::_POST('search_field'), array());
                        }
 
-                       $menu = '<div class="tsob-menu"><label>Browse:</label>';
+                       $menu = '<div class="tsob-menu"><label>' . $GLOBALS['LANG']->getLL('browse', true) . '</label>';
                        $menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']);
-                       $menu .= '<label for="ts_browser_toplevel_' . $bType . '">Object List:</label>';
+                       $menu .= '<label for="ts_browser_toplevel_' . $bType . '">' . $GLOBALS['LANG']->getLL('objectList', true) . '</label>';
                        $menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]);
 
                        //search
-                       $menu .= '<label for="search_field">Search:</label>';
+                       $menu .= '<label for="search_field">' . $GLOBALS['LANG']->getLL('search', true) .'</label>';
                        $menu .= '<input type="Text" name="search_field" id="search_field" value="' . htmlspecialchars($POST['search_field']) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . '/>';
-                       $menu .= '<input type="Submit" name="search" class="tsob-search-submit" value="Search" />';
+                       $menu .= '<input type="Submit" name="search" class="tsob-search-submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" />';
                        $menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"');
-                       $menu .= '<label for="checkTs_browser_regexsearch">Regular expressions</label>';
+                       $menu .= '<label for="checkTs_browser_regexsearch">' . $GLOBALS['LANG']->getLL('regExp', true) . '</label>';
                        $menu .= '</div>';
 
                        $theOutput .= $this->pObj->doc->section('', '<nobr>' . $menu . '</nobr>');
@@ -417,21 +441,21 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                while(list(,$inf)=each($tmpl->parserErrors[$pEkey]))    {
                                        $errMsg[]=($inf[1]).": &nbsp; &nbsp;".$inf[0];
                                }
-                               $theOutput.=$this->pObj->doc->spacer(10);
-                               $theOutput .= $this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("Errors and warnings"), implode($errMsg, "<br />"), 0, 1, 0, 1);
+                               $theOutput .= $this->pObj->doc->spacer(10);
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['TBE_TEMPLATE']->rfw($GLOBALS['LANG']->getLL('errorsWarnings', true)), implode($errMsg, "<br />"), 0, 1, 0, 1);
                        }
 
 
 
                        if (isset($this->pObj->MOD_SETTINGS["ts_browser_TLKeys_".$bType][$theKey]))     {
-                               $remove='<td width="1%" nowrap><a href="index.php?id='.$this->pObj->id.'&addKey['.$theKey.']=0&SET[ts_browser_toplevel_'.$bType.']=0"><b>Remove key from OL</b></a></td>';
+                               $remove = '<td width="1%" nowrap><a href="index.php?id=' . $this->pObj->id . '&addKey[' . $theKey . ']=0&SET[ts_browser_toplevel_' . $bType . ']=0"><b>' . $GLOBALS['LANG']->getLL('removeKey', true) . '</b></a></td>';
                        } else {
-                               $remove='';
+                               $remove = '';
                        }
-                       $label = $theKey ? $theKey : ($bType=="setup"?"SETUP ROOT":"CONSTANTS ROOT");
-                       $theOutput.=$this->pObj->doc->spacer(15);
-                       $theOutput.=$this->pObj->doc->sectionEnd();
-                       $theOutput.='<table border=0 cellpadding=1 cellspacing=0 id="typo3-objectBrowser">
+                       $label = $theKey ? $theKey : ($bType == 'setup' ? t3lib_div::strtoupper($GLOBALS['LANG']->getLL('setupRoot', true)) : t3lib_div::strtoupper($GLOBALS['LANG']->getLL('constantRoot', true)));
+                       $theOutput .= $this->pObj->doc->spacer(15);
+                       $theOutput .= $this->pObj->doc->sectionEnd();
+                       $theOutput .= '<table border=0 cellpadding=1 cellspacing=0 id="typo3-objectBrowser">
                                        <tr>
                                                <td><img src=clear.gif width=4 height=1></td>
                                                <td class="bgColor2">
@@ -449,40 +473,40 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                        // second row options
                        $menu = '<div class="tsob-menu-row2">';
                        $menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_showComments]', $this->pObj->MOD_SETTINGS['ts_browser_showComments'], '', '', 'id="checkTs_browser_showComments"');
-                       $menu .= '<label for="checkTs_browser_showComments">Display comments</label>';
+                       $menu .= '<label for="checkTs_browser_showComments">' . $GLOBALS['LANG']->getLL('displayComments', true) . '</label>';
                        $menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_alphaSort]', $this->pObj->MOD_SETTINGS['ts_browser_alphaSort'], '', '', 'id="checkTs_browser_alphaSort"');
-                       $menu .= '<label for="checkTs_browser_alphaSort">Sort alphabetically</label>';
+                       $menu .= '<label for="checkTs_browser_alphaSort">' . $GLOBALS['LANG']->getLL('sortAlphabetically', true) . '</label>';
                        $menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_fixedLgd]', $this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"], '', '', 'id="checkTs_browser_fixedLgd"');
-                       $menu .= '<label for="checkTs_browser_fixedLgd">Crop lines</label>';
+                       $menu .= '<label for="checkTs_browser_fixedLgd">' . $GLOBALS['LANG']->getLL('cropLines', true) . '</label>';
                        if ($bType == 'setup' && !$this->pObj->MOD_SETTINGS['ts_browser_fixedLgd'])     {
-                               $menu .= '<br /><br /><label>Display constants:</label>';
+                               $menu .= '<br /><br /><label>' . $GLOBALS['LANG']->getLL('displayConstants', true) . '</label>';
                                $menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_const]', $this->pObj->MOD_SETTINGS['ts_browser_const'], $this->pObj->MOD_MENU['ts_browser_const']);
 
                        }
                        $menu .= '</div>';
 
-                       $theOutput .= $this->pObj->doc->section('Display options:', '<nobr>' . $menu . '</nobr>', 0, 1);
+                       $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('displayOptions', true), '<nobr>' . $menu . '</nobr>', 0, 1);
 
                                // Conditions:
                        if (is_array($tmpl->sections))  {
-                               $theOutput .= $this->pObj->doc->section('Conditions:', '', 0, 1);
+                               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('conditions', true), '', 0, 1);
 
-                               $out="";
+                               $out = '';
                                reset($tmpl->sections);
                                while(list($key,$val)=each($tmpl->sections))    {
-                                       $out .= '<tr><td nowrap class="tsob-conditions"><input type="Checkbox" name="conditions[' . $key . ']" id="check' . $key . '" value="' . htmlspecialchars($val) . '"' . ($this->pObj->MOD_SETTINGS['tsbrowser_conditions'][$key] ? " checked" : "") . ' />';
+                                       $out .= '<tr><td nowrap class="tsob-conditions"><input type="checkbox" name="conditions[' . $key . ']" id="check' . $key . '" value="' . htmlspecialchars($val) . '"' . ($this->pObj->MOD_SETTINGS['tsbrowser_conditions'][$key] ? " checked" : "") . ' />';
                                        $out .= '<label for="check' .$key . '">' . $tmpl->substituteCMarkers(htmlspecialchars($val)) . '</label></td></tr>';
                                }
                                $theOutput.='
-                                                               <table border=0 cellpadding=0 cellspacing=0 class="bgColor4">'.$out.'
-                                               <td><br /><input type="Submit" name="Submit" value="Set conditions" /></td>
+                                                               <table border="0" cellpadding="0" cellspacing="0" class="bgColor4">'.$out.'
+                                               <td><br /><input type="Submit" name="Submit" value="' . $GLOBALS['LANG']->getLL('setConditions', true) . '" /></td>
                                                                </table>
 
                                ';
                        }
 
                                // Ending section:
-                       $theOutput.=$this->pObj->doc->sectionEnd();
+                       $theOutput .= $this->pObj->doc->sectionEnd();
                }
                return $theOutput;
        }