]> git.mjollnir.org Git - moodle.git/commitdiff
* removed hard-coded language strings (MDL-6448)
authorvinkmar <vinkmar>
Wed, 6 Sep 2006 02:23:23 +0000 (02:23 +0000)
committervinkmar <vinkmar>
Wed, 6 Sep 2006 02:23:23 +0000 (02:23 +0000)
* replaced some remaining tabs with spaces

blocks/admin_bookmarks/block_admin_bookmarks.php
blocks/admin_bookmarks/create.php
blocks/admin_bookmarks/delete.php

index 868156f8e534b3f73754d4e2946b481f93f322af..126e44b97dec7f3ea612ccf8e85919134ab5b7cb 100644 (file)
@@ -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 = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&returnurl=' . $CFG->wwwroot . '">unbookmark this page</a>';    
+            $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&returnurl=' . $CFG->wwwroot . '">' . get_string('unbookmarkthispage','admin') . '</a>';        
                } elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) {
-           $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '">bookmark this page</a>';               
+           $this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '">' . get_string('bookmarkthispage','admin') . '</a>';           
                } else {
                    $this->content->footer = '';
                }
index c47ef8ab08cf4acc209377d4cfc65b11a107b461..748e1710e578d11745ba72f27d84bb5e6a590f8a 100644 (file)
@@ -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;
 }
 
 
index 9a8f7fd1ed6410ceb7d71622ada5c7da463fe161..51efb013a118f294e0b916221c20f5d65d7cceb8 100644 (file)
@@ -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;
 }