summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorMandragorat Wandystanu <wktir@wandystan.eu>2018-05-30 15:54:18 +0200
committerMandragorat Wandystanu <wktir@wandystan.eu>2018-05-30 15:54:18 +0200
commit458beb599281ae6a9179a37c27a006dd3721c3fe (patch)
tree77d2568be87be8bf7f2f3bba58598179e5c74457 /static
parent130669165c756c3ca8e730cdcdd2ce233ca1d856 (diff)
Translate messages into Polish.
It was planned to be done at first using GNU Gettext, but for our internal purposes it's an overkill.
Diffstat (limited to 'static')
-rw-r--r--static/js/app.js12
-rw-r--r--static/php/classes/UploadException.class.php18
-rw-r--r--static/php/upload.php10
3 files changed, 20 insertions, 20 deletions
diff --git a/static/js/app.js b/static/js/app.js
index b3cb2c5..2812bf9 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -129,17 +129,17 @@ document.addEventListener('DOMContentLoaded', function() {
link.removeChild(element);
});
} else {
- bar.innerHTML = 'Error: ' + response.description;
+ bar.innerHTML = 'Błąd: ' + response.description;
}
} else if (respStatus === 413) {
- link.textContent = 'File too big!';
+ link.textContent = 'Plik jest za duży!';
url.appendChild(link);
} else {
try {
var response = JSON.parse(xhr.responseText);
- link.textContent = 'Error: ' + response.description;
+ link.textContent = 'Błąd: ' + response.description;
} catch (e) {
- link.textContent = 'Server error!';
+ link.textContent = 'Błąd serwera!';
}
url.appendChild(link);
}
@@ -193,7 +193,7 @@ document.addEventListener('DOMContentLoaded', function() {
function handleDrag(state, element, evt) {
stopDefaultEvent(evt);
if (state.dragCount == 1) {
- element.textContent = 'Drop it here~';
+ element.textContent = 'Upuść plik tutaj~';
}
state.dragCount += 1;
}
@@ -209,7 +209,7 @@ document.addEventListener('DOMContentLoaded', function() {
stopDefaultEvent(evt);
state.dragCount -= 1;
if (state.dragCount == 0) {
- element.textContent = 'Select or drop file(s)';
+ element.textContent = 'Wybierz lub upuść plik(i)';
}
}
diff --git a/static/php/classes/UploadException.class.php b/static/php/classes/UploadException.class.php
index 8c9e4f6..a70314f 100644
--- a/static/php/classes/UploadException.class.php
+++ b/static/php/classes/UploadException.class.php
@@ -31,30 +31,30 @@ class UploadException extends Exception
{
switch ($code) {
case UPLOAD_ERR_INI_SIZE:
- $message = 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
+ $message = 'Przesłany plik przekracza rozmiar dozwolony przez dyrektywę upload_max_filesize w pliku php.ini';
break;
case UPLOAD_ERR_FORM_SIZE:
- $message = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was '.
- 'specified in the HTML form';
+ $message = 'Przesłany plik przekracza rozmiar dozwolony przez dyrektywę MAX_FILE_SIZE '.
+ 'podaną w formularzu HTML';
break;
case UPLOAD_ERR_PARTIAL:
- $message = 'The uploaded file was only partially uploaded';
+ $message = 'Plik został przesłany jedynie częściowo';
break;
case UPLOAD_ERR_NO_FILE:
- $message = 'No file was uploaded';
+ $message = 'Nie przesłano żadnego pliku';
break;
case UPLOAD_ERR_NO_TMP_DIR:
- $message = 'Missing a temporary folder';
+ $message = 'Brak katalogu tymczasowego';
break;
case UPLOAD_ERR_CANT_WRITE:
- $message = 'Failed to write file to disk';
+ $message = 'Nie udało się zapisać pliku na dysku';
break;
case UPLOAD_ERR_EXTENSION:
- $message = 'File upload stopped by extension';
+ $message = 'Niedozwolony format pliku';
break;
default:
- $message = 'Unknown upload error';
+ $message = 'Nieznany błąd przesyłania';
break;
}
diff --git a/static/php/upload.php b/static/php/upload.php
index 9bb9d3f..c8bae73 100644
--- a/static/php/upload.php
+++ b/static/php/upload.php
@@ -39,7 +39,7 @@ function generateName($file)
// Iterate until we reach the maximum number of retries
if ($tries-- === 0) {
throw new Exception(
- 'Gave up trying to find an unused name',
+ 'Nie udało się znaleźć nieużywanej nazwy pliku',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -128,7 +128,7 @@ function uploadFile($file)
// Attempt to move it to the static directory
if (!move_uploaded_file($file->tempfile, $uploadFile)) {
throw new Exception(
- 'Failed to move file to destination',
+ 'Nie udało się przenieść pliku do celu',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -136,7 +136,7 @@ function uploadFile($file)
// Need to change permissions for the new file to make it world readable
if (!chmod($uploadFile, 0644)) {
throw new Exception(
- 'Failed to change file permissions',
+ 'Nie udało się zmienić uprawnień pliku',
500
); // HTTP status code "500 Internal Server Error"
}
@@ -223,8 +223,8 @@ if ($login->isLoggedIn()) {
$response->error($e->getCode(), $e->getMessage());
}
} else {
- $response->error(400, 'No input file(s)');
+ $response->error(400, 'Nie przesłano żadnego pliku');
}
} else {
- $response->error(403, 'You are not logged in');
+ $response->error(403, 'Nie jesteś zalogowana/y');
}