summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/controllers/albums.php2
-rw-r--r--modules/gallery/controllers/l10n_client.php14
-rw-r--r--modules/gallery/views/l10n_client.html.php6
3 files changed, 19 insertions, 3 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 856709c2..17fdec6b 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -26,7 +26,7 @@ class Albums_Controller extends Items_Controller {
$page_size = module::get_var("gallery", "page_size", 9);
if (!access::can("view", $album)) {
if ($album->id == 1) {
- $view = new Theme_View("page.html", "page");
+ $view = new Theme_View("page.html", "login");
$view->page_title = t("Log in to Gallery");
$view->content = user::get_login_form("login/auth_html");
print $view;
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..01537e25 100644
--- a/modules/gallery/views/l10n_client.html.php
+++ b/modules/gallery/views/l10n_client.html.php
@@ -2,7 +2,11 @@
<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") ?>
+ <? if (!Input::instance()->get('show_all_l10n_messages')): ?>
+ <a style="background-color:#fff" href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show All)") ?></a>
+ <? endif; ?>
+ </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>