MDL-31201 wiki: fix a hardcoded string
authorSun Zhigang <sunner@gmail.com>
Tue, 22 May 2012 11:36:50 +0000 (19:36 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sat, 30 Jun 2012 20:01:08 +0000 (22:01 +0200)
mod/wiki/lang/en/wiki.php
mod/wiki/parser/markups/wikimarkup.php

index 4815ba3..9781d7b 100644 (file)
@@ -195,6 +195,7 @@ $string['searchcontent'] = 'Search in page content';
 $string['searchresult'] = 'Search results:';
 $string['searchwikis'] = 'Search wikis';
 $string['special'] = 'Special';
+$string['tableofcontents'] = 'Table of contents';
 $string['tagsdeleted'] = 'Wiki tags have been deleted';
 $string['tagtitle'] = 'See the "{$a}" tag';
 $string['teacherrating'] = 'Teacher rating';
index 30976db..cf7a2b3 100644 (file)
@@ -239,7 +239,7 @@ abstract class wiki_markup_parser extends generic_parser {
             $i++;
         }
 
-        $this->returnvalues['toc'] = "<div class=\"wiki-toc\"><p class=\"wiki-toc-title\">Table of contents</p>$toc</div>";
+        $this->returnvalues['toc'] = "<div class=\"wiki-toc\"><p class=\"wiki-toc-title\">" . get_string('tableofcontents', 'wiki') . "</p>$toc</div>";
     }
 
     /**