diff --git a/lib/app.php b/lib/app.php index 115b7d60f5e..2437896157a 100644 --- a/lib/app.php +++ b/lib/app.php @@ -840,7 +840,8 @@ class OC_App{ } catch (Exception $e) { OC_Hook::emit('update', 'failure', 'Failed to update '.$info['name'].' app: '.$e->getMessage()); - throw new RuntimeException('Failed to upgrade "'.$app.'". Exception="'.$e->getMessage().'"'); + $l = OC_L10N::get('lib'); + throw new RuntimeException($l->t('Failed to upgrade "%s".', array($app)), 0, $e); } OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app)); } diff --git a/lib/files.php b/lib/files.php index 0e5b5d54ff2..c705d2adb1a 100644 --- a/lib/files.php +++ b/lib/files.php @@ -62,7 +62,8 @@ class OC_Files { $zip = new ZipArchive(); $filename = OC_Helper::tmpFile('.zip'); if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==true) { - throw new Exception("cannot open '$filename'\n"); + $l = OC_L10N::get('lib'); + throw new Exception($l->t('cannot open "%s"', array($filename))); } foreach ($files as $file) { $file = $dir . '/' . $file; @@ -93,7 +94,8 @@ class OC_Files { $zip = new ZipArchive(); $filename = OC_Helper::tmpFile('.zip'); if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==true) { - throw new Exception("cannot open '$filename'\n"); + $l = OC_L10N::get('lib'); + throw new Exception($l->t('cannot open "%s"', array($filename))); } $file = $dir . '/' . $files; self::zipAddDir($file, $zip); @@ -249,8 +251,8 @@ class OC_Files { header("HTTP/1.0 409 Conflict"); OC_Template::printErrorPage( $l->t('Selected files too large to generate zip file.'), - 'Download the files in smaller chunks, seperately' - .' or kindly ask your administrator.
' + $l->t('Download the files in smaller chunks, seperately or kindly ask your administrator.') + .'
' . $l->t('Back to Files') . '' ); exit; diff --git a/lib/template.php b/lib/template.php index 2b94fb6725c..339b30eb414 100644 --- a/lib/template.php +++ b/lib/template.php @@ -536,8 +536,9 @@ class OC_Template{ if (!empty($hint)) { $hint = '
'.$hint.'
'; } - while (method_exists($exception,'previous') && $exception = $exception->previous()) { - $error_msg .= '
Caused by: '; + $l = OC_L10N::get('lib'); + while (method_exists($exception, 'previous') && $exception = $exception->previous()) { + $error_msg .= '
'.$l->t('Caused by:').' '; if ($exception->getCode()) { $error_msg .= '['.$exception->getCode().'] '; }