diff --git a/lib/base.php b/lib/base.php
index 83f54a8e4db4584a6cf881d67cc66aaae0dc277a..0f55c1175c7ded58e1380c02413c17e1903fa4a3 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -698,6 +698,7 @@ class OC {
 	 * @brief Handle the request
 	 */
 	public static function handleRequest() {
+		$l = \OC_L10N::get('lib');
 		// load all the classpaths from the enabled apps so they are available
 		// in the routing files of each app
 		OC::loadAppClassPaths();
@@ -719,8 +720,8 @@ class OC {
 			header('HTTP/1.1 400 Bad Request');
 			header('Status: 400 Bad Request');
 			OC_Template::printErrorPage(
-				'You are accessing the server from an untrusted domain.',
-				'Please contact your administrator'
+				$l->t('You are accessing the server from an untrusted domain.'),
+				$l->t('Please contact your administrator')
 			);
 			return;
 		}
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 3751b035bd4e3577a4e89512e72d31cc9ce0825b..fe756b5ae7f6dbf006d3bdcce87b5d516ffc1451 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -477,9 +477,10 @@ class Share extends \OC\Share\Constants {
 		if ($itemType === 'file' or $itemType === 'folder') {
 			$path = \OC\Files\Filesystem::getPath($itemSource);
 			if (!$path) {
-				$message = 'Sharing ' . $itemSourceName . ' failed, because the file does not exist';
-				\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
-				throw new \Exception($message);
+				$message = 'Sharing %s failed, because the file does not exist';
+				$message_t = $l->t('Sharing %s failed, because the file does not exist', array($itemSourceName));
+				\OC_Log::write('OCP\Share', sprintf($message, $itemSourceName), \OC_Log::ERROR);
+				throw new \Exception($message_t);
 			}
 		}