From b2ceb29484dccbf60fcce4a01a140ec7a00614a8 Mon Sep 17 00:00:00 2001 From: rakekniven Date: Fri, 16 Mar 2018 18:45:20 +0100 Subject: [PATCH 1/3] Update ThemingController.php Changed wording according to discussion at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/121491259?issue=yes Aligned ending of error messages --- apps/theming/lib/Controller/ThemingController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index 74f6a6f036d..c156b9854a2 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -218,14 +218,14 @@ class ThemingController extends Controller { $newBackgroundLogo = $this->request->getUploadedFile('upload-login-background'); $error = null; $phpFileUploadErrors = [ - UPLOAD_ERR_OK => $this->l10n->t('There is no error, the file uploaded with success'), + UPLOAD_ERR_OK => $this->l10n->t('The file was uploaded'), UPLOAD_ERR_INI_SIZE => $this->l10n->t('The uploaded file exceeds the upload_max_filesize directive in php.ini'), UPLOAD_ERR_FORM_SIZE => $this->l10n->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'), UPLOAD_ERR_PARTIAL => $this->l10n->t('The file was only partially uploaded'), UPLOAD_ERR_NO_FILE => $this->l10n->t('No file was uploaded'), UPLOAD_ERR_NO_TMP_DIR => $this->l10n->t('Missing a temporary folder'), - UPLOAD_ERR_CANT_WRITE => $this->l10n->t('Failed to write file to disk.'), - UPLOAD_ERR_EXTENSION => $this->l10n->t('A PHP extension stopped the file upload.'), + UPLOAD_ERR_CANT_WRITE => $this->l10n->t('Failed to write file to disk'), + UPLOAD_ERR_EXTENSION => $this->l10n->t('A PHP extension stopped the file upload'), ]; if (empty($newLogo) && empty($newBackgroundLogo)) { $error = $this->l10n->t('No file uploaded'); From d88db9b496ad49b2e53d65023e0769e082d003c2 Mon Sep 17 00:00:00 2001 From: rakekniven Date: Mon, 19 Mar 2018 15:00:27 +0100 Subject: [PATCH 2/3] Update ThemingController.php Changed file according to discussion on PR. --- apps/theming/lib/Controller/ThemingController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index c156b9854a2..47f806d16f9 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -224,7 +224,7 @@ class ThemingController extends Controller { UPLOAD_ERR_PARTIAL => $this->l10n->t('The file was only partially uploaded'), UPLOAD_ERR_NO_FILE => $this->l10n->t('No file was uploaded'), UPLOAD_ERR_NO_TMP_DIR => $this->l10n->t('Missing a temporary folder'), - UPLOAD_ERR_CANT_WRITE => $this->l10n->t('Failed to write file to disk'), + UPLOAD_ERR_CANT_WRITE => $this->l10n->t('Could not write file to disk'), UPLOAD_ERR_EXTENSION => $this->l10n->t('A PHP extension stopped the file upload'), ]; if (empty($newLogo) && empty($newBackgroundLogo)) { From 789221a0fcef435ae95b6aec22382b6757dd0469 Mon Sep 17 00:00:00 2001 From: rakekniven Date: Mon, 19 Mar 2018 15:07:49 +0100 Subject: [PATCH 3/3] Update ThemingControllerTest.php Adjusted test --- apps/theming/tests/Controller/ThemingControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 25c5686dda1..08af13f994b 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -529,8 +529,8 @@ class ThemingControllerTest extends TestCase { [UPLOAD_ERR_PARTIAL, 'The file was only partially uploaded'], [UPLOAD_ERR_NO_FILE, 'No file was uploaded'], [UPLOAD_ERR_NO_TMP_DIR, 'Missing a temporary folder'], - [UPLOAD_ERR_CANT_WRITE, 'Failed to write file to disk.'], - [UPLOAD_ERR_EXTENSION, 'A PHP extension stopped the file upload.'], + [UPLOAD_ERR_CANT_WRITE, 'Could not write file to disk'], + [UPLOAD_ERR_EXTENSION, 'A PHP extension stopped the file upload'], ]; }