summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/l10n_client.html.php41
-rw-r--r--modules/gallery/views/move_tree.html.php4
-rw-r--r--modules/gallery/views/permissions_browse.html.php2
-rw-r--r--modules/gallery/views/simple_uploader.html.php2
4 files changed, 43 insertions, 6 deletions
diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php
index 8f4092c7..faa6e939 100644
--- a/modules/gallery/views/l10n_client.html.php
+++ b/modules/gallery/views/l10n_client.html.php
@@ -11,21 +11,58 @@
<ul class="string-list">
<? foreach ($string_list as $string): ?>
<li class="<?= $string["translation"] === "" ? "untranslated" : "translated" ?>">
+ <? if (is_array($string["source"])): ?>
+ [one] - <?= $string["source"]["one"] ?><br/>
+ [other] - <?= $string["source"]["other"] ?>
+ <? else: ?>
<?= $string["source"] ?>
+ <? endif; ?>
</li>
<? endforeach; ?>
</ul>
+
<?= $l10n_search_form ?>
</div>
<div id="l10n-client-string-editor">
<div class="source">
- <div class="source-text"></div>
+ <pre class="source-text"></pre>
</div>
<div class="translation">
- <?= $l10n_form ?>
+ <form method="post" action="<?= url::site("l10n_client/save") ?>" id="gL10nClientSaveForm">
+ <?= access::csrf_form_field() ?>
+ <?= form::hidden("l10n-message-key") ?>
+ <?= form::textarea("l10n-edit-translation", "", ' rows="5" class="translationField"') ?>
+ <div id="plural-zero" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-zero">[zero]</label>
+ <?= form::textarea("l10n-edit-plural-translation-zero", "", ' rows="2"') ?>
+ </div>
+ <div id="plural-one" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-one">[one]</label>
+ <?= form::textarea("l10n-edit-plural-translation-one", "", ' rows="2"') ?>
+ </div>
+ <div id="plural-two" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-two">[two]</label>
+ <?= form::textarea("l10n-edit-plural-translation-two", "", ' rows="2"') ?>
+ </div>
+ <div id="plural-few" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-few">[few]</label>
+ <?= form::textarea("l10n-edit-plural-translation-few", "", ' rows="2"') ?>
+ </div>
+ <div id="plural-many" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-many">[many]</label>
+ <?= form::textarea("l10n-edit-plural-translation-many", "", ' rows="2"') ?>
+ </div>
+ <div id="plural-other" class="translationField hidden">
+ <label for="l10n-edit-plural-translation-other">[other]</label>
+ (<a href="http://www.unicode.org/cldr/data/charts/supplemental/language_plural_rules.html"><?= t("learn more about plural forms") ?></a>)
+ <?= form::textarea("l10n-edit-plural-translation-other", "", ' rows="2"') ?>
+ </div>
+ <input type="submit" name="l10n-edit-save" value="<?= t("Save translation") ?>"/>
+ </form>
</div>
</div>
<script type="text/javascript">
var l10n_client_data = <?= json_encode($string_list) ?>;
+ var plural_forms = <?= json_encode($plural_forms) ?>;
</script>
</div>
diff --git a/modules/gallery/views/move_tree.html.php b/modules/gallery/views/move_tree.html.php
index 91a2f9da..5f70cf67 100644
--- a/modules/gallery/views/move_tree.html.php
+++ b/modules/gallery/views/move_tree.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<?= $parent->thumb_tag(array(), 25); ?>
+<?= $parent->thumb_img(array(), 25); ?>
<? if (!access::can("edit", $parent) || $source->is_descendant($parent)): ?>
<a href="javascript:load_tree('<?= $parent->id ?>',1)"> <?= p::clean($parent->title) ?> <?= t("(locked)") ?> </a>
<? else: ?>
@@ -8,7 +8,7 @@
<ul id="tree_<?= $parent->id ?>">
<? foreach ($children as $child): ?>
<li id="node_<?= $child->id ?>" class="node">
- <?= $child->thumb_tag(array(), 25); ?>
+ <?= $child->thumb_img(array(), 25); ?>
<? if (!access::can("edit", $child) || $source->is_descendant($child)): ?>
<a href="javascript:load_tree('<?= $child->id ?>',1)"> <?= p::clean($child->title) ?> <?= t("(locked)") ?></a>
<? else: ?>
diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php
index 5cd9cf82..8bb2e830 100644
--- a/modules/gallery/views/permissions_browse.html.php
+++ b/modules/gallery/views/permissions_browse.html.php
@@ -27,7 +27,7 @@
<? if (!$htaccess_works): ?>
<ul id="gMessage">
<li class="gError">
- <?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to set <a href=\"%url\"><i>AllowOverride FileInfo Options</i></a> to fix this.", array("url" => "http://httpd.apache.org/docs/2.0/mod/gallery.html#allowoverride")) ?>
+ <?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to set <a %attrs><i>AllowOverride FileInfo Options</i></a> to fix this.", array("attrs" => "href=\"http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride\" target=\"_blank\"")) ?>
</li>
</ul>
<? endif ?>
diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php
index abda6d26..7b90c5be 100644
--- a/modules/gallery/views/simple_uploader.html.php
+++ b/modules/gallery/views/simple_uploader.html.php
@@ -3,7 +3,7 @@
<script type="text/javascript" src="<?= url::file("lib/swfupload/swfupload.queue.js") ?>"></script>
<!-- hack to set the title for the dialog -->
-<form id="gAddPhotosForm" action="<?= url::site("simple_uploader/finish") ?>">
+<form id="gAddPhotosForm" action="<?= url::site("simple_uploader/finish?csrf=$csrf") ?>">
<fieldset>
<legend> <?= t("Add photos to %album_title", array("album_title" => p::clean($item->title))) ?> </legend>
</fieldset>