diff --git a/admin/tool/replace/index.php b/admin/tool/replace/index.php index 6f3c89fcb0e..11e1068576b 100644 --- a/admin/tool/replace/index.php +++ b/admin/tool/replace/index.php @@ -38,25 +38,29 @@ $sure = optional_param('sure', 0, PARAM_BOOL); ################################################################### echo $OUTPUT->header(); -echo $OUTPUT->heading('Search and replace text throughout the whole database'); +echo $OUTPUT->heading(get_string('pageheader', 'tool_replace')); if ($DB->get_dbfamily() !== 'mysql' and $DB->get_dbfamily() !== 'postgres') { //TODO: add $DB->text_replace() to DML drivers - echo $OUTPUT->notification('Sorry, this feature is implemented only for MySQL and PostgreSQL databases.'); + echo $OUTPUT->notification(get_string('notimplemented', 'tool_replace')); echo $OUTPUT->footer(); die; } if (!data_submitted() or !$search or !$replace or !confirm_sesskey() or !$sure) { /// Print a form - echo $OUTPUT->notification('This script is not supported, always make complete backup before proceeding!
This operation can not be reverted!'); + echo $OUTPUT->notification(get_string('notsupported', 'tool_replace')); echo $OUTPUT->box_start(); echo '
'; echo '
'; echo ''; - echo '
(usually previous server URL)
'; - echo '
(usually new server URL)
'; - echo '
'; + echo '
('. + get_string('searchwholedbhelp', 'tool_replace').')
'; + echo '
('. + get_string('replacewithhelp', 'tool_replace').')
'; + echo '
'; echo '
'; echo '
'; echo '
'; @@ -70,9 +74,9 @@ db_replace($search, $replace); echo $OUTPUT->box_end(); /// Rebuild course cache which might be incorrect now -echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess'); +echo $OUTPUT->notification(get_string('notifyrebuilding', 'tool_replace'), 'notifysuccess'); rebuild_course_cache(); -echo $OUTPUT->notification('...finished', 'notifysuccess'); +echo $OUTPUT->notification(get_string('notifyfinished', 'tool_replace'), 'notifysuccess'); echo $OUTPUT->continue_button(new moodle_url('/admin/index.php')); diff --git a/admin/tool/replace/lang/en/tool_replace.php b/admin/tool/replace/lang/en/tool_replace.php index f967fad8766..2193805f13e 100644 --- a/admin/tool/replace/lang/en/tool_replace.php +++ b/admin/tool/replace/lang/en/tool_replace.php @@ -23,4 +23,14 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['disclaimer'] = 'I understand the risks of this operation:'; +$string['pageheader'] = 'Search and replace text throughout the whole database'; +$string['notifyfinished'] = '...finished'; +$string['notifyrebuilding'] = 'Rebuilding course cache...'; +$string['notimplemented'] = 'Sorry, this feature is implemented only for MySQL and PostgreSQL databases.'; +$string['notsupported'] ='This script is not supported, always make complete backup before proceeding!
This operation can not be reverted!'; $string['pluginname'] = 'DB search and replace'; +$string['replacewith'] = 'Replace with this string:'; +$string['replacewithhelp'] = 'usually new server URL'; +$string['searchwholedb'] = 'Search whole database for:'; +$string['searchwholedbhelp'] = 'usually previous server URL'; \ No newline at end of file