l10n support enhanced in files_trashbin
This commit is contained in:
parent
488ab0dba2
commit
18a288a3c3
2 changed files with 6 additions and 3 deletions
|
@ -18,6 +18,7 @@ if ($path_parts['dirname'] == '.') {
|
||||||
if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) {
|
if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) {
|
||||||
OCP\JSON::success(array("data" => array("filename" => $file)));
|
OCP\JSON::success(array("data" => array("filename" => $file)));
|
||||||
} else {
|
} else {
|
||||||
OCP\JSON::error(array("data" => array("message" => "Couldn't delete ".$file. " permanently")));
|
$l = OC_L10N::get('files_trashbin');
|
||||||
|
OCP\JSON::error(array("data" => array("message" => $l->t("Couldn't delete %s permanently", array($file)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,10 @@ if ( $error ) {
|
||||||
foreach ( $error as $e ) {
|
foreach ( $error as $e ) {
|
||||||
$filelist .= $e.', ';
|
$filelist .= $e.', ';
|
||||||
}
|
}
|
||||||
OCP\JSON::error(array("data" => array("message" => "Couldn't restore ".rtrim($filelist,', '), "success" => $success, "error" => $error)));
|
$l = OC_L10N::get('files_trashbin');
|
||||||
|
$message = $l->t("Couldn't restore %s", array(rtrim($filelist,', ')));
|
||||||
|
OCP\JSON::error(array("data" => array("message" => $message,
|
||||||
|
"success" => $success, "error" => $error)));
|
||||||
} else {
|
} else {
|
||||||
OCP\JSON::success(array("data" => array("success" => $success)));
|
OCP\JSON::success(array("data" => array("success" => $success)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue