From e7e3f1b81a5026116ef0c9cd95a00fdd7ff6f5a2 Mon Sep 17 00:00:00 2001
From: kondou <kondou@ts.unde.re>
Date: Mon, 2 Sep 2013 17:07:38 +0200
Subject: [PATCH] Fix some of @jancborchardt's complaints in oc_avatars

---
 core/avatar/controller.php      | 6 +++---
 lib/avatar.php                  | 2 +-
 settings/js/personal.js         | 2 +-
 settings/templates/personal.php | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/core/avatar/controller.php b/core/avatar/controller.php
index 045d768dc1..5264327b64 100644
--- a/core/avatar/controller.php
+++ b/core/avatar/controller.php
@@ -34,7 +34,7 @@ class OC_Core_Avatar_Controller {
 			\OC_Response::setETagHeader(crc32($image->data()));
 			$image->show();
 		} elseif ($image === false) {
-			\OC_JSON::success(array('user' => \OC_User::getDisplayName($user), 'size' => $size));
+			\OC_JSON::success(array('user' => $user, 'size' => $size));
 		}
 	}
 
@@ -104,7 +104,7 @@ class OC_Core_Avatar_Controller {
 		$tmpavatar = \OC_Cache::get('tmpavatar');
 		if (is_null($tmpavatar)) {
 			$l = new \OC_L10n('core');
-			\OC_JSON::error(array("data" => array("message" => $l->t("No temporary avatar available, try again")) ));
+			\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
 			return;
 		}
 
@@ -128,7 +128,7 @@ class OC_Core_Avatar_Controller {
 		$tmpavatar = \OC_Cache::get('tmpavatar');
 		if (is_null($tmpavatar)) {
 			$l = new \OC_L10n('core');
-			\OC_JSON::error(array("data" => array("message" => $l->t("No temporary avatar available, try again")) ));
+			\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
 			return;
 		}
 
diff --git a/lib/avatar.php b/lib/avatar.php
index 5ecce050d2..9b2a7fe07c 100644
--- a/lib/avatar.php
+++ b/lib/avatar.php
@@ -46,7 +46,7 @@ class OC_Avatar {
 	public function set ($user, $data) {
 		if (\OC_Appconfig::getValue('files_encryption', 'enabled') === "yes") {
 			$l = \OC_L10N::get('lib');
-			throw new \Exception($l->t("Custom avatars don't work with encryption yet"));
+			throw new \Exception($l->t("Custom profile pictures don't work with encryption yet"));
 		}
 
 		$view = new \OC\Files\View('/'.$user);
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 9823b2804b..d9b6836568 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -212,7 +212,7 @@ $(document).ready(function(){
 	$('#uploadavatar').fileupload(uploadparms);
 
 	$('#selectavatar').click(function(){
-		OC.dialogs.filepicker(t('settings', "Select an avatar"), selectAvatar, false, "image");
+		OC.dialogs.filepicker(t('settings', "Select a profile picture"), selectAvatar, false, "image");
 	});
 
 	$('#removeavatar').click(function(){
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index d4a0e3b948..fcef0f8a57 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -83,14 +83,14 @@ if($_['passwordChangeSupported']) {
 <?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
 <form id="avatar" method="post" action="<?php p(\OC_Helper::linkToRoute('core_avatar_post')); ?>">
 	<fieldset class="personalblock">
-		<legend><strong><?php p($l->t('Profile Image')); ?></strong></legend>
+		<legend><strong><?php p($l->t('Profile picture')); ?></strong></legend>
 		<div class="avatardiv"></div><br>
-		<em><?php p($l->t('Has to be square and either PNG or JPG')); ?></em><br>
 		<div class="warning hidden"></div>
 		<div class="inlineblock button" id="uploadavatarbutton"><?php p($l->t('Upload new')); ?></div>
 		<input type="file" class="hidden" name="files[]" id="uploadavatar">
-		<div class="inlineblock button" id="selectavatar"><?php p($l->t('Select new from files')); ?></div>
-		<div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div>
+		<div class="inlineblock button" id="selectavatar"><?php p($l->t('Select new from Files')); ?></div>
+		<div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div><br>
+		<?php p($l->t('Either png or jpg. Ideally square but you will be able to crop it.')); ?>
 	</fieldset>
 </form>
 <?php endif; ?>
-- 
GitLab