summaryrefslogtreecommitdiffstats
path: root/core/ajax
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2013-08-29 10:50:55 +0200
committerGeorg Ehrke <developer@georgehrke.com>2013-08-29 10:50:55 +0200
commitb7758d0f8d52b2f9653cfee549558327c00c8e01 (patch)
tree309fb713ed25f35f746c59c668521bf9023bc331 /core/ajax
parent70b6e2161ec654f7049027bf6dc5072c1eda4d5e (diff)
parentea6e74ca9546ca95b3a6372c6106cd8ab2ea2ee9 (diff)
downloadnextcloud-server-b7758d0f8d52b2f9653cfee549558327c00c8e01.tar.gz
nextcloud-server-b7758d0f8d52b2f9653cfee549558327c00c8e01.zip
Merge master into oc_preview
Diffstat (limited to 'core/ajax')
-rw-r--r--core/ajax/share.php6
-rw-r--r--core/ajax/update.php25
2 files changed, 18 insertions, 13 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index bdcb61284ec..d3c6a8456a6 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -213,6 +213,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
}
}
$count = 0;
+
+ // enable l10n support
+ $l = OC_L10N::get('core');
+
foreach ($groups as $group) {
if ($count < 15) {
if (stripos($group, $_GET['search']) !== false
@@ -221,7 +225,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|| !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])
|| !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]))) {
$shareWith[] = array(
- 'label' => $group.' (group)',
+ 'label' => $group.' ('.$l->t('group').')',
'value' => array(
'shareType' => OCP\Share::SHARE_TYPE_GROUP,
'shareWith' => $group
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 43ed75b07f1..d6af84e95b1 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -4,25 +4,26 @@ $RUNTIME_NOAPPS = true;
require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
+ $l = new \OC_L10N('core');
$eventSource = new OC_EventSource();
$updater = new \OC\Updater(\OC_Log::$object);
- $updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource) {
- $eventSource->send('success', 'Turned on maintenance mode');
+ $updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
});
- $updater->listen('\OC\Updater', 'maintenanceEnd', function () use ($eventSource) {
- $eventSource->send('success', 'Turned off maintenance mode');
+ $updater->listen('\OC\Updater', 'maintenanceEnd', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
});
- $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource) {
- $eventSource->send('success', 'Updated database');
+ $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Updated database'));
});
- $updater->listen('\OC\Updater', 'filecacheStart', function () use ($eventSource) {
- $eventSource->send('success', 'Updating filecache, this may take really long...');
+ $updater->listen('\OC\Updater', 'filecacheStart', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Updating filecache, this may take really long...'));
});
- $updater->listen('\OC\Updater', 'filecacheDone', function () use ($eventSource) {
- $eventSource->send('success', 'Updated filecache');
+ $updater->listen('\OC\Updater', 'filecacheDone', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Updated filecache'));
});
- $updater->listen('\OC\Updater', 'filecacheProgress', function ($out) use ($eventSource) {
- $eventSource->send('success', '... ' . $out . '% done ...');
+ $updater->listen('\OC\Updater', 'filecacheProgress', function ($out) use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('... %d%% done ...', array('percent' => $out)));
});
$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource) {
$eventSource->send('failure', $message);