]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed review issues
authorBart Visscher <bartv@thisnet.nl>
Mon, 22 Jul 2013 21:04:14 +0000 (23:04 +0200)
committerBart Visscher <bartv@thisnet.nl>
Mon, 22 Jul 2013 21:04:14 +0000 (23:04 +0200)
lib/app.php
lib/files.php
lib/template.php

index 115b7d60f5e2e2579f4839848207e8f9451e69c1..2437896157ae5c272556cfa82c852f84f8d3f356 100644 (file)
@@ -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));
                        }
index 0e5b5d54ff22edf79f2309d640b4ad169cd3bc52..c705d2adb1a20f7c0dcbc09871792a0b9a093b6f 100644 (file)
@@ -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.<br/><a href="javascript:history.back()">'
+                                               $l->t('Download the files in smaller chunks, seperately or kindly ask your administrator.')
+                                               .'<br/><a href="javascript:history.back()">'
                                                . $l->t('Back to Files') . '</a>'
                                );
                                exit;
index 2b94fb6725ca26f8b6bb4814c27969319a69d264..339b30eb414cd0d83584825ee4e7d0d831165946 100644 (file)
@@ -536,8 +536,9 @@ class OC_Template{
                        if (!empty($hint)) {
                                $hint = '<pre>'.$hint.'</pre>';
                        }
-                       while (method_exists($exception,'previous') && $exception = $exception->previous()) {
-                               $error_msg .= '<br/>Caused by: ';
+                       $l = OC_L10N::get('lib');
+                       while (method_exists($exception, 'previous') && $exception = $exception->previous()) {
+                               $error_msg .= '<br/>'.$l->t('Caused by:').' ';
                                if ($exception->getCode()) {
                                        $error_msg .= '['.$exception->getCode().'] ';
                                }