Fix some localization issues with file encryption/decription strings

This commit is contained in:
Volkan Gezer 2014-04-05 19:28:53 +02:00
parent 2124eaba92
commit 286323f7a4
3 changed files with 8 additions and 7 deletions

View File

@ -131,15 +131,15 @@ var Files = {
var encryptedFiles = $('#encryptedFiles').val();
var initStatus = $('#encryptionInitStatus').val();
if (initStatus === '0') { // enc not initialized, but should be
OC.Notification.show(t('files_encryption', 'Encryption App is enabled but your keys are not initialized, please log-out and log-in again'));
OC.Notification.show(t('files', 'Encryption App is enabled but your keys are not initialized, please log-out and log-in again'));
return;
}
if (initStatus === '1') { // encryption tried to init but failed
OC.Notification.showHtml(t('files_encryption', 'Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.'));
OC.Notification.showHtml(t('files', 'Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.'));
return;
}
if (encryptedFiles === '1') {
OC.Notification.show(t('files_encryption', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.'));
OC.Notification.show(t('files', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.'));
return;
}
},

View File

@ -12,6 +12,7 @@ $params = array('uid' => \OCP\User::getUser(),
$view = new OC_FilesystemView('/');
$util = new \OCA\Encryption\Util($view, \OCP\User::getUser());
$l = \OC_L10N::get('settings');
$result = $util->initEncryption($params);
@ -27,11 +28,11 @@ if ($result !== false) {
$util->closeEncryptionSession();
if ($successful === true) {
\OCP\JSON::success(array('data' => array('message' => 'Files decrypted successfully')));
\OCP\JSON::success(array('data' => array('message' => $l->t('Files decrypted successfully'))));
} else {
\OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt your files, please check your owncloud.log or ask your administrator')));
\OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t decrypt your files, please check your owncloud.log or ask your administrator'))));
}
} else {
\OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt your files, check your password and try again')));
\OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t decrypt your files, check your password and try again'))));
}

View File

@ -313,7 +313,7 @@ OC.Encryption.msg={
startDecrypting:function(selector){
var spinner = '<img src="'+ OC.imagePath('core', 'loading-small.gif') +'">';
$(selector)
.html( t('files_encryption', 'Decrypting files... Please wait, this can take some time.') + ' ' + spinner )
.html( t('settings', 'Decrypting files... Please wait, this can take some time.') + ' ' + spinner )
.removeClass('success')
.removeClass('error')
.stop(true, true)