summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-08-27 00:26:44 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-08-27 00:26:44 +0200
commit9909b8b726a605b20e163c03614633297095206e (patch)
tree044dc67dfef9ee20c0ed7ff9b3b6001418950e2a /core
parent7d141656ee837199f58d6a29033ded7d5c2a4632 (diff)
downloadnextcloud-server-9909b8b726a605b20e163c03614633297095206e.tar.gz
nextcloud-server-9909b8b726a605b20e163c03614633297095206e.zip
adding translations to update events
Diffstat (limited to 'core')
-rw-r--r--core/ajax/update.php25
1 files changed, 13 insertions, 12 deletions
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);