diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-03-26 07:10:47 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-26 07:10:47 +0000 |
commit | a142aee609ec078a45303184d8f24dba643249a6 (patch) | |
tree | eeece11e339eb4414e91b1c12cff00d6b4a5fe73 /core/helpers/core_task.php | |
parent | 9f784818da36b7779cb9dec6622cdb32d943dbce (diff) |
Convert language updates over to task form. It's still very rough,
the task only has one step from zero to 100.
Diffstat (limited to 'core/helpers/core_task.php')
-rw-r--r-- | core/helpers/core_task.php | 16 |
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 |