changes l10n after review
This commit is contained in:
parent
efd629462e
commit
5dd865a57f
|
@ -16,7 +16,7 @@ use OCA\Encryption;
|
||||||
$l = OC_L10N::get('files_encryption');
|
$l = OC_L10N::get('files_encryption');
|
||||||
|
|
||||||
$return = false;
|
$return = false;
|
||||||
|
$action = '';
|
||||||
// Enable recoveryAdmin
|
// Enable recoveryAdmin
|
||||||
|
|
||||||
$recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId');
|
$recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId');
|
||||||
|
@ -24,7 +24,7 @@ $recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId');
|
||||||
if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === "1") {
|
if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === "1") {
|
||||||
|
|
||||||
$return = \OCA\Encryption\Helper::adminEnableRecovery($recoveryKeyId, $_POST['recoveryPassword']);
|
$return = \OCA\Encryption\Helper::adminEnableRecovery($recoveryKeyId, $_POST['recoveryPassword']);
|
||||||
$action = "enable";
|
$action = $l->t('enable');
|
||||||
|
|
||||||
// Disable recoveryAdmin
|
// Disable recoveryAdmin
|
||||||
} elseif (
|
} elseif (
|
||||||
|
@ -32,17 +32,17 @@ if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === "1
|
||||||
&& "0" === $_POST['adminEnableRecovery']
|
&& "0" === $_POST['adminEnableRecovery']
|
||||||
) {
|
) {
|
||||||
$return = \OCA\Encryption\Helper::adminDisableRecovery($_POST['recoveryPassword']);
|
$return = \OCA\Encryption\Helper::adminDisableRecovery($_POST['recoveryPassword']);
|
||||||
$action = "disable";
|
$action = $l->t('disable');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return success or failure
|
// Return success or failure
|
||||||
if ($return) {
|
if ($return) {
|
||||||
\OCP\JSON::success(array("data" => array("message" => $l->t('Recovery key successfully ' . $action . 'd'))));
|
\OCP\JSON::success(array("data" => array("message" => $l->t('Recovery key successfully %sd', array($action)))));
|
||||||
} else {
|
} else {
|
||||||
\OCP\JSON::error(array(
|
\OCP\JSON::error(array(
|
||||||
"data" => array(
|
"data" => array(
|
||||||
"message" => $l->t(
|
"message" => $l->t(
|
||||||
'Could not ' . $action . ' recovery key. Please check your recovery key password!')
|
'Could not %s recovery key. Please check your recovery key password!', array($action))
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue