diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-06-17 11:25:01 +0800 |
---|---|---|
committer | <unostar@danalan.info> | 2009-06-17 13:51:31 +0800 |
commit | 022d12cb860f57e4ece95686537e5aaa8291d713 (patch) | |
tree | b4d7f34f752ceac0dc541da0474641e9b743fc5a | |
parent | 236d5ff76dfae5d52a3b3d81b28332b3a33b122e (diff) |
Add option to list *all* l10n messages (that have been indexed) in l10n UI
TODO: The "Show All" link is almost invisible (link color ~= background)
Signed-off-by: <unostar@danalan.info>
-rw-r--r-- | modules/gallery/controllers/l10n_client.php | 14 | ||||
-rw-r--r-- | modules/gallery/views/l10n_client.html.php | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/modules/gallery/controllers/l10n_client.php b/modules/gallery/controllers/l10n_client.php index aa93a758..831c79c1 100644 --- a/modules/gallery/controllers/l10n_client.php +++ b/modules/gallery/controllers/l10n_client.php @@ -106,7 +106,19 @@ class L10n_Client_Controller extends Controller { } public static function l10n_form() { - $calls = I18n::instance()->call_log(); + if (Input::instance()->get("show_all_l10n_messages")) { + $calls = array(); + foreach (Database::instance() + ->select("key", "message") + ->from("incoming_translations") + ->where(array("locale" => 'root')) + ->get() + ->as_array() as $row) { + $calls[$row->key] = array(unserialize($row->message), array()); + } + } else { + $calls = I18n::instance()->call_log(); + } $locale = I18n::instance()->locale(); if ($calls) { diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index 2e53f48f..18f39537 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -2,7 +2,7 @@ <div id="l10n-client" class="hidden"> <div class="labels"> <span class="toggle"><?= t("Translate Text") ?></span> - <div class="label strings"><h2><?= t("Page Text") ?></h2></div> + <div class="label strings"><h2><?= t("Page Text") ?> <a href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show All)") ?></a></h2></div> <div class="label source"><h2><?= t("Source") ?></div> <div class="label translation"><h2><?= t("Translation to %language", array("language" => locale::display_name())) ?></h2></div> |