From: vinkmar Date: Wed, 6 Sep 2006 02:23:23 +0000 (+0000) Subject: * removed hard-coded language strings (MDL-6448) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8f89a26c211add198a935ffef57bec8f6aca2a9a;p=moodle.git * removed hard-coded language strings (MDL-6448) * replaced some remaining tabs with spaces --- diff --git a/blocks/admin_bookmarks/block_admin_bookmarks.php b/blocks/admin_bookmarks/block_admin_bookmarks.php index 868156f8e5..126e44b97d 100644 --- a/blocks/admin_bookmarks/block_admin_bookmarks.php +++ b/blocks/admin_bookmarks/block_admin_bookmarks.php @@ -53,9 +53,9 @@ class block_admin_bookmarks extends block_base { } if (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) { - $this->content->footer = 'unbookmark this page'; + $this->content->footer = '' . get_string('unbookmarkthispage','admin') . ''; } elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) { - $this->content->footer = 'bookmark this page'; + $this->content->footer = '' . get_string('bookmarkthispage','admin') . ''; } else { $this->content->footer = ''; } diff --git a/blocks/admin_bookmarks/create.php b/blocks/admin_bookmarks/create.php index c47ef8ab08..748e1710e5 100644 --- a/blocks/admin_bookmarks/create.php +++ b/blocks/admin_bookmarks/create.php @@ -11,8 +11,8 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT)) { $bookmarks = explode(',',$USER->preference['admin_bookmarks']); if (in_array($section, $bookmarks)) { - error('Bookmark already exists.'); - die; + error(get_string('bookmarkalreadyexists','admin')); + die; } } else { @@ -30,8 +30,8 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT)) { set_user_preference('admin_bookmarks', $bookmarks); } else { - - error('Invalid section.'); + + error(get_string('invaludsection','admin')); die; } @@ -42,13 +42,13 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT)) { } elseif (is_a($temp, 'admin_externalpage')) { - redirect($temp->url, 'Bookmark added.', 1); + redirect($temp->url, get_string('bookmarkadded','admin'), 1); } } else { - error('Valid section not specified.'); - die; + error(get_string('invalidsection','admin')); + die; } diff --git a/blocks/admin_bookmarks/delete.php b/blocks/admin_bookmarks/delete.php index 9a8f7fd1ed..51efb013a1 100644 --- a/blocks/admin_bookmarks/delete.php +++ b/blocks/admin_bookmarks/delete.php @@ -14,7 +14,7 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT)) { $key = array_search($section, $bookmarks); if ($key === false) { - error('Bookmark doesn\'t exist.'); + error(get_string('nonexistentbookmark','admin')); die; } @@ -25,22 +25,22 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT)) { $temp = $adminroot->locate($section); if (is_a($temp, 'admin_externalpage')) { - redirect($temp->url, 'Bookmark deleted.',1); + redirect($temp->url, get_string('bookmarkdeleted','admin'),1); } elseif (is_a($temp, 'admin_settingpage')) { redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section, 'Bookmark deleted.',1); } else { - redirect($CFG->wwwroot, 'Bookmark deleted.',1); + redirect($CFG->wwwroot, get_string('bookmarkdeleted', 'admin'),1); } die; } - error('No bookmarks found for current user.'); + error(get_string('nobookmarksforuser','admin')); die; } else { - error('Valid section not specified.'); + error(get_string('invalidsection', 'admin')); die; }