mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-06 07:01:30 -04:00
Convert language updates over to task form. It's still very rough,
the task only has one step from zero to 100.
This commit is contained in:
@@ -22,7 +22,6 @@ class Admin_Languages_Controller extends Admin_Controller {
|
||||
$v = new Admin_View("admin.html");
|
||||
$v->content = new View("admin_languages.html");
|
||||
$v->content->settings_form = $this->_languages_form();
|
||||
$v->content->update_translations_form = $this->_translation_updates_form();
|
||||
if (empty($share_translations_form)) {
|
||||
$share_translations_form = $this->_share_translations_form();
|
||||
}
|
||||
@@ -41,16 +40,6 @@ class Admin_Languages_Controller extends Admin_Controller {
|
||||
url::redirect("admin/languages");
|
||||
}
|
||||
|
||||
public function fetch_updates() {
|
||||
$form = $this->_translation_updates_form();
|
||||
if ($form->validate()) {
|
||||
l10n_scanner::update_index();
|
||||
l10n_client::fetch_updates();
|
||||
message::success(t("Translations installed/updated"));
|
||||
}
|
||||
url::redirect("admin/languages");
|
||||
}
|
||||
|
||||
public function share() {
|
||||
$form = $this->_share_translations_form();
|
||||
if (!$form->validate()) {
|
||||
@@ -119,17 +108,6 @@ class Admin_Languages_Controller extends Admin_Controller {
|
||||
return $form;
|
||||
}
|
||||
|
||||
private function _translation_updates_form() {
|
||||
// TODO: Show a timestamp of the last update.
|
||||
// TODO: Show a note if you've changed the language settings but not fetched translations for
|
||||
// the selected languages yet.
|
||||
$form = new Forge("admin/languages/fetch_updates", "", "post", array("id" => "gLanguageUpdatesForm"));
|
||||
$group = $form->group("updates")
|
||||
->label(t("Download translations for all selected languages from the Gallery Translation Server:"));
|
||||
$group->submit("update")->value(t("Get updates"));
|
||||
return $form;
|
||||
}
|
||||
|
||||
private function _outgoing_translations_count() {
|
||||
return ORM::factory("outgoing_translation")->count_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user