summaryrefslogtreecommitdiff
path: root/modules/gallery/views/admin_languages.html.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/views/admin_languages.html.php')
-rw-r--r--modules/gallery/views/admin_languages.html.php81
1 files changed, 42 insertions, 39 deletions
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php
index 4025437a..fa97d299 100644
--- a/modules/gallery/views/admin_languages.html.php
+++ b/modules/gallery/views/admin_languages.html.php
@@ -11,12 +11,11 @@
<tr>
<th> <?= t("Installed") ?> </th>
<th> <?= t("Language") ?> </th>
- <th> <?= t("Default language") ?> </th>
+ <th> <?= t("Default language") ?> </th>
</tr>
<? $i = 0 ?>
<? foreach ($available_locales as $code => $display_name): ?>
-
- <? if ($i == (count($available_locales)/2)): ?>
+ <? if ($i == (count($available_locales)/2)): ?>
<table>
<tr>
<th> <?= t("Installed") ?> </th>
@@ -24,24 +23,24 @@
<th> <?= t("Default language") ?> </th>
</tr>
<? endif ?>
-
+
<tr class="<?= (isset($installed_locales[$code])) ? "installed" : "" ?><?= ($default_locale == $code) ? " default" : "" ?>">
<td> <?= form::checkbox("installed_locales[]", $code, isset($installed_locales[$code])) ?> </td>
- <td> <?= $display_name ?> </td>
- <td>
- <?= form::radio("default_locale", $code, ($default_locale == $code), ((isset($installed_locales[$code]))?'':'disabled="disabled"') ) ?>
- </td>
+ <td> <?= $display_name ?> </td>
+ <td>
+ <?= form::radio("default_locale", $code, ($default_locale == $code), ((isset($installed_locales[$code]))?'':'disabled="disabled"') ) ?>
+ </td>
</tr>
<? $i++ ?>
-
+
<? endforeach ?>
</table>
- <input type="submit" value="<?= t("Update languages") ?>" />
+ <input type="submit" value="<?= t("Update languages")->for_html_attr() ?>" />
</form>
-
- <script type="text/javascript">
- var old_default_locale = "<?= $default_locale ?>";
-
+
+ <script type="text/javascript">
+ var old_default_locale = <?= html::js_string($default_locale) ?>;
+
$("input[name='installed_locales[]']").change(function (event) {
if (this.checked) {
$("input[type='radio'][value='" + this.value + "']").enable();
@@ -57,7 +56,7 @@
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 = $('<a href="' + <?= html::js_string(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');
}
@@ -68,33 +67,37 @@
<div id="gTranslations">
<h1> <?= t("Translations") ?> </h1>
- <p>
+ <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") ?>">
+
+ <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")->for_html_attr() ?>">
<?= 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>
-
+
+ <p><?= t("<strong>Step 1:</strong> Make sure the target language is installed and up to date (check above).") ?></p>
+
+ <p><?= t("<strong>Step 2:</strong> Make sure you have selected the right target language (currently %default_locale).",
+ array("default_locale" => locales::display_name())) ?></p>
+
+ <p><?= t("<strong>Step 3:</strong> 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>
+ <? if (Session::instance()->get("l10n_mode", false)): ?>
+ <?= t("Stop translation mode") ?>
+ <? else: ?>
+ <?= t("Start translation mode") ?>
+ <? endif ?>
+ </a>
+</div>
+
+<h3>Sharing your translations</h3>
<?= $share_translations_form ?>
</div>