summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-29 14:02:29 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-29 14:02:29 -0600
commita9fcec755a835e284465bafcc9aba9ec9c2f0f62 (patch)
tree1b6a6029d18ee7cb350f47dd5be54a9bbbbebd17 /modules/gallery/views
parent5db0b68a70434a16d8881a6e560a9526530a8a60 (diff)
parent6b633e87489acbe79d65fc5e089d35cc27ee691c (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/admin_languages.html.php80
-rw-r--r--modules/gallery/views/l10n_client.html.php5
2 files changed, 59 insertions, 26 deletions
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php
index fc3a87dc..4025437a 100644
--- a/modules/gallery/views/admin_languages.html.php
+++ b/modules/gallery/views/admin_languages.html.php
@@ -2,7 +2,7 @@
<div id="gLanguages">
<h1> <?= t("Languages") ?> </h1>
<p>
- <?= t("Here you can install new languages, update installed ones and set the default language for your Gallery.") ?>
+ <?= t("Install new languages, update installed ones and set the default language for your Gallery.") ?>
</p>
<form id="gLanguagesForm" method="post" action="<?= url::site("admin/languages/save") ?>">
@@ -40,31 +40,61 @@
</form>
<script type="text/javascript">
- var old_default_locale = "<?= $default_locale ?>";
-
- $("input[name='installed_locales[]']").change(function (event) {
- if (this.checked) {
- $("input[type='radio'][value='" + this.value + "']").enable();
- } else {
- if ($("input[type='radio'][value='" + this.value + "']").selected()) { // if you deselect your default language, switch to some other installed language
- $("input[type='radio'][value='" + old_default_locale + "']").attr("checked", "checked");
- }
- $("input[type='radio'][value='" + this.value + "']").attr("disabled", "disabled");
- }
- });
-
+ var old_default_locale = "<?= $default_locale ?>";
+
+ $("input[name='installed_locales[]']").change(function (event) {
+ if (this.checked) {
+ $("input[type='radio'][value='" + this.value + "']").enable();
+ } else {
+ if ($("input[type='radio'][value='" + this.value + "']").selected()) { // if you deselect your default language, switch to some other installed language
+ $("input[type='radio'][value='" + old_default_locale + "']").attr("checked", "checked");
+ }
+ $("input[type='radio'][value='" + this.value + "']").attr("disabled", "disabled");
+ }
+ });
+
$("#gLanguagesForm").ajaxForm({
- dataType: "json",
- success: function(data) {
- if (data.result == "success") {
- el = $('<a href="<?= url::site("admin/maintenance/start/gallery_task::update_l10n?csrf=$csrf") ?>"></a>'); // this is a little hack to trigger the update_l10n task in a dialog
- el.gallery_dialog();
- el.trigger('click');
- }
- }
- });
- </script>
+ dataType: "json",
+ success: function(data) {
+ if (data.result == "success") {
+ el = $('<a href="<?= url::site("admin/maintenance/start/gallery_task::update_l10n?csrf=$csrf") ?>"></a>'); // this is a little hack to trigger the update_l10n task in a dialog
+ el.gallery_dialog();
+ el.trigger('click');
+ }
+ }
+ });
+ </script>
+</div>
- <h2> <?= t("Your Own Translations") ?> </h2>
+<div id="gTranslations">
+ <h1> <?= t("Translations") ?> </h1>
+ <p>
+ <?= t("Create your own translations and share them with the rest of the Gallery community.") ?>
+ </p>
+
+ <h3><?= t("Translating Gallery") ?></h3>
+
+ <div class="gBlock">
+ <a href="http://codex.gallery2.org/Gallery3:Localization" target="_blank"
+ class="gDocLink ui-state-default ui-corner-all ui-icon ui-icon-help"
+ title="<?= t("Localization documentation") ?>">
+ <?= t("Localization documentation") ?>
+ </a>
+
+ <p><strong><?= t("Step 1") ?>:</strong> <?= t("Make sure the target language is installed and updated (check above).") ?></p>
+
+ <p><strong><?= t("Step 2") ?>:</strong> <?= t("Make sure the target language is the active one (currently '").locales::display_name()."')." ?></p>
+
+ <p><strong><?= t("Step 3") ?>:</strong> <?= t("Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></p>
+
+ <a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>"
+ class="gButtonLink ui-state-default ui-corner-all ui-icon-left">
+ <span class="ui-icon ui-icon-power"></span>
+ <?= t((Session::instance()->get("l10n_mode", false)) ? "Stop translation mode" : "Start translation mode") ?>
+ </a>
+ </div>
+
+ <h3>Sharing your translations</h3>
+
<?= $share_translations_form ?>
</div>
diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php
index c73719ca..5ee7eca3 100644
--- a/modules/gallery/views/l10n_client.html.php
+++ b/modules/gallery/views/l10n_client.html.php
@@ -1,7 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="l10n-client" class="hidden">
<div class="labels">
- <span id="l10n-client-toggler">X</span>
+ <span id="l10n-client-toggler">
+ <a id="gMinimizeL10n">_</a>
+ <a id="gCloseL10n" href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>">X</a>
+ </span>
<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>