This adds one more missing untranslated text from lib/share

Also displays the untrusted domain warning in English
This commit is contained in:
Volkan Gezer 2014-04-24 01:42:18 +02:00
parent 645ecb7644
commit ff0dab6e92
2 changed files with 7 additions and 5 deletions

View File

@ -698,6 +698,7 @@ class OC {
* @brief Handle the request * @brief Handle the request
*/ */
public static function handleRequest() { public static function handleRequest() {
$l = \OC_L10N::get('lib');
// load all the classpaths from the enabled apps so they are available // load all the classpaths from the enabled apps so they are available
// in the routing files of each app // in the routing files of each app
OC::loadAppClassPaths(); OC::loadAppClassPaths();
@ -719,8 +720,8 @@ class OC {
header('HTTP/1.1 400 Bad Request'); header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request'); header('Status: 400 Bad Request');
OC_Template::printErrorPage( OC_Template::printErrorPage(
'You are accessing the server from an untrusted domain.', $l->t('You are accessing the server from an untrusted domain.'),
'Please contact your administrator' $l->t('Please contact your administrator')
); );
return; return;
} }

View File

@ -477,9 +477,10 @@ class Share extends \OC\Share\Constants {
if ($itemType === 'file' or $itemType === 'folder') { if ($itemType === 'file' or $itemType === 'folder') {
$path = \OC\Files\Filesystem::getPath($itemSource); $path = \OC\Files\Filesystem::getPath($itemSource);
if (!$path) { if (!$path) {
$message = 'Sharing ' . $itemSourceName . ' failed, because the file does not exist'; $message = 'Sharing %s failed, because the file does not exist';
\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR); $message_t = $l->t('Sharing %s failed, because the file does not exist', array($itemSourceName));
throw new \Exception($message); \OC_Log::write('OCP\Share', sprintf($message, $itemSourceName), \OC_Log::ERROR);
throw new \Exception($message_t);
} }
} }