Skip to content

Commit

Permalink
Made alt tags translatable MDL-6861
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Oct 6, 2006
1 parent 46f8bac commit 76b4140
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions blocks/admin_tree/block_admin_tree.php
Expand Up @@ -122,6 +122,9 @@ function get_content() {
}

if ($this->tempcontent !== '') {
$strfolderopened = s(get_string('folderopened'));
$strfolderclosed = s(get_string('folderclosed'));

$this->content = new stdClass;
$this->content->text = '<script type="text/javascript">'."\n";
$this->content->text .= '<!--' . "\n";
Expand All @@ -139,25 +142,25 @@ function get_content() {
$this->content->text .= 'function toggle(spanid) {' . "\n";
$this->content->text .= ' if (getspan(spanid).innerHTML == "") {' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = vh_content[spanid];' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="[open folder]" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= ' } else {' . "\n";
$this->content->text .= ' vh_content[spanid] = getspan(spanid).innerHTML;' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = "";' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" border="0" alt="[closed folder]" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" border="0" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";

$this->content->text .= 'function collapse(spanid) {' . "\n";
$this->content->text .= ' if (getspan(spanid).innerHTML !== "") {' . "\n";
$this->content->text .= ' vh_content[spanid] = getspan(spanid).innerHTML;' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = "";' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" border="0" alt="[closed folder]" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" border="0" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";

$this->content->text .= 'function expand(spanid) {' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = vh_content[spanid];' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="[open folder]" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" border="0" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= '}' . "\n";

$this->content->text .= 'function expandall() {' . "\n";
Expand Down
2 changes: 2 additions & 0 deletions lang/en_utf8/moodle.php
Expand Up @@ -552,6 +552,8 @@
$string['firstdayofweek'] = '0';
$string['firstname'] = 'First name';
$string['firsttime'] = 'Is this your first time here?';
$string['folderopened'] = 'Opened folder';
$string['folderclosed'] = 'Closed folder';
$string['followingoptional'] = 'The following items are optional';
$string['followingrequired'] = 'The following items are required';
$string['force'] = 'Force';
Expand Down

0 comments on commit 76b4140

Please sign in to comment.