From b67251b0ffbba5d52802ced8e1ff02f408be8cc7 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 7 Feb 2013 23:57:18 +0100 Subject: [PATCH] Files: add translation support back to move/rename --- apps/files/ajax/move.php | 6 +++--- apps/files/ajax/rename.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 78ed218c136..03d2a6a5624 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -12,7 +12,7 @@ $file = stripslashes($_POST["file"]); $target = stripslashes(rawurldecode($_POST["target"])); 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 +22,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..2364e477d93 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -17,8 +17,8 @@ if ( $newname !== '.' and ($dir != '' || $file != 'Shared') and $newname !== '.' 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") ))); } -- 2.39.5