diff options
author | Sam Tuke <samtuke@owncloud.com> | 2013-02-09 11:52:11 +0000 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2013-02-09 11:52:11 +0000 |
commit | b95bc663af4135eff12a6a0c97afe37859f35094 (patch) | |
tree | 3ebb198e5f10ae34b9478b925e4a58d0be3c4aea /apps/files_versions/history.php | |
parent | d2b288ca704af4d74d1fa13e44966b1c34cf56bd (diff) | |
parent | ab4ae2b952fedf7bac2810bb6be7997fb661a1fc (diff) | |
download | nextcloud-server-b95bc663af4135eff12a6a0c97afe37859f35094.tar.gz nextcloud-server-b95bc663af4135eff12a6a0c97afe37859f35094.zip |
Merge branch 'master' into files_encryption-style-fixes
Conflicts:
apps/files_encryption/lib/crypt.php
apps/files_encryption/lib/util.php
Diffstat (limited to 'apps/files_versions/history.php')
-rw-r--r-- | apps/files_versions/history.php | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 6071240e583..437a3fec065 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -24,27 +24,34 @@ OCP\User::checkLoggedIn( ); OCP\Util::addStyle('files_versions', 'versions'); $tmpl = new OCP\Template( 'files_versions', 'history', 'user' ); +$l = OC_L10N::get('files_versions'); if ( isset( $_GET['path'] ) ) { $path = $_GET['path']; $tmpl->assign( 'path', $path ); - $versions = new OCA_Versions\Storage(); + $versions = new OCA\Files_Versions\Storage(); // roll back to old version if button clicked if( isset( $_GET['revert'] ) ) { if( $versions->rollback( $path, $_GET['revert'] ) ) { - $tmpl->assign( 'outcome_stat', 'success' ); + $tmpl->assign( 'outcome_stat', $l->t('success') ); - $tmpl->assign( 'outcome_msg', "File {$_GET['path']} was reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); + $message = $l->t('File %s was reverted to version %s', + array($_GET['path'], OCP\Util::formatDate( doubleval($_GET['revert']) ) ) ); + + $tmpl->assign( 'outcome_msg', $message); } else { - $tmpl->assign( 'outcome_stat', 'failure' ); + $tmpl->assign( 'outcome_stat', $l->t('failure') ); + + $message = $l->t('File %s could not be reverted to version %s', + array($_GET['path'], OCP\Util::formatDate( doubleval($_GET['revert']) ) ) ); - $tmpl->assign( 'outcome_msg', "File {$_GET['path']} could not be reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); + $tmpl->assign( 'outcome_msg', $message); } @@ -52,18 +59,18 @@ if ( isset( $_GET['path'] ) ) { // show the history only if there is something to show $count = 999; //show the newest revisions - if( ($versions = OCA_Versions\Storage::getVersions( $path, $count)) ) { + if( ($versions = OCA\Files_Versions\Storage::getVersions( $path, $count)) ) { $tmpl->assign( 'versions', array_reverse( $versions ) ); }else{ - $tmpl->assign( 'message', 'No old versions available' ); + $tmpl->assign( 'message', $l->t('No old versions available') ); } }else{ - $tmpl->assign( 'message', 'No path specified' ); + $tmpl->assign( 'message', $l->t('No path specified') ); } |