Skip to content

Commit

Permalink
improved translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ediathome committed Jul 21, 2019
1 parent ea352c5 commit 71bbe61
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions prestacollege.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ public function fake_customers()
public function createdbsnapshot()
{
$db_backup = new FakerDatabaseBackup();
$file_backup = new FakerFileBackup();
$output = '<div class="panel">';
$output .= '<h2>'.$this->l('Creating a database snapshot').'</h2>';
$output .= '<div>FakerDatabaseBackup status: '.$db_backup->add().'</div>';
$output .= '<div>FakerFileBackup status: '.$file_backup->run().'</div>';
if($db_backup->add()) {
$output .= '<div class="alert-success">'.$this->l('Snapshot successfully created').'</div>';
} else {
$output .= '<div class="alert-error">'.$this->l('An error occured when creating the snapshot').'</div>';
}
$output .= '</div>';

return $output;
Expand All @@ -107,7 +109,11 @@ public function importdbsnapshot()
{
$output = '<div class="panel">';
$output .= '<h2>'.$this->l('Importing a database snapshot').'</h2>';
$output .= '<div>'.$this->dbbackup_loader()->run().'</div>';
if($this->dbbackup_loader()->run()) {
$output .= '<div class="alert-success">'.$this->l('Snapshot successfully imported').'</div>';
} else {
$output .= '<div class="alert-error">'.$this->l('An error occured when importing the snapshot').'</div>';
}
$output .= '</div>';

return $output;
Expand All @@ -118,7 +124,11 @@ public function createfilesnapshot()
$file_backup = new FakerFileBackup();
$output = '<div class="panel">';
$output .= '<h2>'.$this->l('Exporting a file snapshot').'</h2>';
$output .= '<div>Status: '.$file_backup->run().'</div>';
if($file_backup->run()) {
$output .= '<div class="alert-success">'.$this->l('Snapshot successfully created').'</div>';
} else {
$output .= '<div class="alert-error">'.$this->l('An error occured when creating the snapshot').'</div>';
}
$output .= '</div>';

return $output;
Expand Down

0 comments on commit 71bbe61

Please sign in to comment.