summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax')
-rw-r--r--apps/files/ajax/move.php8
-rw-r--r--apps/files/ajax/rename.php6
-rw-r--r--apps/files/ajax/upload.php2
3 files changed, 10 insertions, 6 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php
index 78ed218c136..93063e52eb0 100644
--- a/apps/files/ajax/move.php
+++ b/apps/files/ajax/move.php
@@ -11,8 +11,10 @@ $dir = stripslashes($_POST["dir"]);
$file = stripslashes($_POST["file"]);
$target = stripslashes(rawurldecode($_POST["target"]));
+$l = OC_L10N::get('files');
+
if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) {
- OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) )));
exit;
}
@@ -22,8 +24,8 @@ if ($dir != '' || $file != 'Shared') {
if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) {
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
} else {
- OCP\JSON::error(array("data" => array( "message" => "Could not move $file" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s", array($file)) )));
}
}else{
- OCP\JSON::error(array("data" => array( "message" => "Could not move $file" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s", array($file)) )));
}
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php
index 970aaa638da..9fd2ce3ad4b 100644
--- a/apps/files/ajax/rename.php
+++ b/apps/files/ajax/rename.php
@@ -11,14 +11,16 @@ $dir = stripslashes($_GET["dir"]);
$file = stripslashes($_GET["file"]);
$newname = stripslashes($_GET["newname"]);
+$l = OC_L10N::get('files');
+
if ( $newname !== '.' and ($dir != '' || $file != 'Shared') and $newname !== '.') {
$targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname);
$sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file);
if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) {
OCP\JSON::success(array("data" => array( "dir" => $dir, "file" => $file, "newname" => $newname )));
} else {
- OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to rename file") )));
}
}else{
- OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to rename file") )));
}
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 676612c0e42..07977f5ddf1 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -49,7 +49,7 @@ foreach ($files['size'] as $size) {
$totalSize += $size;
}
if ($totalSize > \OC\Files\Filesystem::free_space($dir)) {
- OCP\JSON::error(array('data' => array('message' => $l->t('Not enough space available'),
+ OCP\JSON::error(array('data' => array('message' => $l->t('Not enough storage available'),
'uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize)));
exit();