From 286323f7a41a783543a646e7f8c949bb9a402159 Mon Sep 17 00:00:00 2001
From: Volkan Gezer <volkangezer@gmail.com>
Date: Sat, 5 Apr 2014 19:28:53 +0200
Subject: Fix some localization issues with file encryption/decription strings

---
 apps/files/js/files.js       | 6 +++---
 settings/ajax/decryptall.php | 7 ++++---
 settings/js/personal.js      | 2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index ceb096f0941..206fa561251 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -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;
 		}
 	},
diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php
index 4782a4cfc81..d12df230d41 100644
--- a/settings/ajax/decryptall.php
+++ b/settings/ajax/decryptall.php
@@ -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'))));
 }
 
diff --git a/settings/js/personal.js b/settings/js/personal.js
index f502037cfda..b659d1f1d39 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -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)
-- 
cgit v1.2.3