summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/core_task.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/helpers/core_task.php b/core/helpers/core_task.php
index 008c593f..b9d6253a 100644
--- a/core/helpers/core_task.php
+++ b/core/helpers/core_task.php
@@ -28,7 +28,12 @@ class core_task_Core {
"You have %count out of date photos",
$dirty_count)
: t("All your photos are up to date"))
- ->severity($dirty_count ? log::WARNING : log::SUCCESS));
+ ->severity($dirty_count ? log::WARNING : log::SUCCESS),
+ Task_Definition::factory()
+ ->callback("core_task::update_l10n")
+ ->name(t("Update translations"))
+ ->description(t("Download new and updated translated strings"))
+ ->severity(log::SUCCESS));
}
/**
@@ -73,4 +78,13 @@ class core_task_Core {
site_status::clear("graphics_dirty");
}
}
+
+ static function update_l10n($task) {
+ l10n_scanner::update_index();
+ l10n_client::fetch_updates();
+ $task->done = true;
+ $task->state = "success";
+ $task->percent_complete = 100;
+ $task->status = t("Translations installed/updated");
+ }
} \ No newline at end of file