Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkan Gezer <volkangezer@gmail.com>2014-06-12 22:31:07 +0400
committerVolkan Gezer <volkangezer@gmail.com>2014-06-12 22:31:07 +0400
commit565f0b281c75e795071215e2c122b06c96fa5c8a (patch)
tree07719a4b7ffbe76d6d0e8d77c23e148d8c2b06bb /apps/files_external/ajax
parentb595c982d0cc27c9e6e3ee3a04c8f9a567ec0dc8 (diff)
some strings to localize external mount api responses. fix #8094
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r--apps/files_external/ajax/dropbox.php7
-rw-r--r--apps/files_external/ajax/google.php5
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php
index 91c465500d0..bbedf8e9cac 100644
--- a/apps/files_external/ajax/dropbox.php
+++ b/apps/files_external/ajax/dropbox.php
@@ -5,6 +5,7 @@ require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+$l = OC_L10N::get('files_external');
if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
$oauth = new Dropbox_OAuth_Curl($_POST['app_key'], $_POST['app_secret']);
@@ -23,7 +24,7 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
'request_token_secret' => $token['token_secret'])));
} catch (Exception $exception) {
OCP\JSON::error(array('data' => array('message' =>
- 'Fetching request tokens failed. Verify that your Dropbox app key and secret are correct.')
+ $l->t('Fetching request tokens failed. Verify that your Dropbox app key and secret are correct.'))
));
}
break;
@@ -36,7 +37,7 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
'access_token_secret' => $token['token_secret']));
} catch (Exception $exception) {
OCP\JSON::error(array('data' => array('message' =>
- 'Fetching access tokens failed. Verify that your Dropbox app key and secret are correct.')
+ $l->t('Fetching access tokens failed. Verify that your Dropbox app key and secret are correct.'))
));
}
}
@@ -44,5 +45,5 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
}
}
} else {
- OCP\JSON::error(array('data' => array('message' => 'Please provide a valid Dropbox app key and secret.')));
+ OCP\JSON::error(array('data' => array('message' => $l->t('Please provide a valid Dropbox app key and secret.'))));
}
diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index 2594a1780b3..13e74071846 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -6,6 +6,7 @@ require_once 'Google_Client.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+$l = OC_L10N::get('files_external');
if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST['redirect'])) {
$client = new Google_Client();
@@ -23,7 +24,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
)));
} catch (Exception $exception) {
OCP\JSON::error(array('data' => array(
- 'message' => 'Step 1 failed. Exception: '.$exception->getMessage()
+ 'message' => $l->t('Step 1 failed. Exception: %s', array($exception->getMessage()))
)));
}
} else if ($step == 2 && isset($_POST['code'])) {
@@ -34,7 +35,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
)));
} catch (Exception $exception) {
OCP\JSON::error(array('data' => array(
- 'message' => 'Step 2 failed. Exception: '.$exception->getMessage()
+ 'message' => $l->t('Step 2 failed. Exception: %s', array($exception->getMessage()))
)));
}
}