Skip to content

Commit

Permalink
Tweak lang for new features
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-unikent committed Aug 26, 2015
1 parent b0041d0 commit 24b14d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
'delete' => ''
);

$description = '';

// We could be a course or a category.
switch ($context->contextlevel) {
case \CONTEXT_COURSE:
Expand All @@ -48,6 +50,7 @@
);

$recyclebin = new \local_recyclebin\course($context->instanceid);
$description = get_string('description_course', 'local_recyclebin');
break;

case \CONTEXT_COURSECAT:
Expand All @@ -61,10 +64,11 @@
);

$recyclebin = new \local_recyclebin\category($context->instanceid);
$description = get_string('description_coursecat', 'local_recyclebin');
break;

default:
print_error("Invalid context supplied.");
print_error('invalidcontext', 'local_recyclebin');
break;
}

Expand Down Expand Up @@ -131,7 +135,6 @@
}

// Start with a description.
$description = get_string('description', 'local_recyclebin');
$expiry = get_config('local_recyclebin', 'expiry');
if ($expiry > 0) {
$description .= ' ' . get_string('descriptionexpiry', 'local_recyclebin', $expiry);
Expand Down
9 changes: 6 additions & 3 deletions lang/en/local_recyclebin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$string['cleanrecyclebin'] = 'Clean recycle bin';

$string['expiry'] = 'Item lifetime';
$string['expiry_desc'] = 'How long should a deleted activity remain in the recycle bin?';
$string['expiry_desc'] = 'How long should a deleted item remain in the recycle bin?';

$string['autohide'] = 'Auto hide?';
$string['autohide_desc'] = 'Automatically hides the recycle bin link when the bin is empty.';
Expand Down Expand Up @@ -57,9 +57,12 @@
$string['event_restored_description'] = 'Item with ID {$a->objectid} restored.';
$string['event_purged_description'] = 'Item with ID {$a->objectid} purged.';

$string['description'] = 'Items that have been deleted from a course can be restored and will appear at the bottom of the section from which they were deleted.';
$string['description_course'] = 'Items that have been deleted from a course can be restored if they are still in the recyclebin, and will appear at the bottom of the section from which they were deleted.';
$string['description_coursecat'] = 'Items that have been deleted from a category can be restored if they are still in the recyclebin.';
$string['descriptionexpiry'] = 'Contents will be permanently deleted after {$a} days.';

$string['emptybin'] = 'There are no items in the recycle bin.';
$string['emptyconfirm'] = 'Are you sure you want to delete all items in the recycle bin?';
$string['deleteconfirm'] = 'Are you sure you want to delete the selected item in the recycle bin?';
$string['deleteconfirm'] = 'Are you sure you want to delete the selected item from the recycle bin?';

$string['invalidcontext'] = 'Invalid context supplied.';

0 comments on commit 24b14d4

Please sign in to comment.