summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.dialog.js3
-rw-r--r--themes/default/views/page.html.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index 72c7cdf8..6d986aa0 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -50,7 +50,6 @@ function openDialog(element, on_success) {
var sHref = $(element).attr("href");
var sTitle = $(element).attr("title");
var eDialog = '<div id="gDialog"></div>';
- // @todo Fix i18n for Cancel link
var dialogWidth;
$("body").append(eDialog);
@@ -99,7 +98,7 @@ function openDialog(element, on_success) {
}
function on_form_loaded() {
- var eCancel = '<a href="javascript: closeDialog()" class="gCancel">Cancel</a>';
+ var eCancel = '<a href="javascript: closeDialog()" class="gCancel">' + MSG_CANCEL + '</a>';
if ($("#gDialog .submit").length) {
$("#gDialog .submit").addClass("ui-state-default ui-corner-all");
$("#gDialog .submit").parent().append(eCancel);
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index 519a0c39..a21e9eff 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -49,6 +49,10 @@
<?= $theme->script("lib/jquery.form.js") ?>
<?= $theme->script("lib/jquery-ui.js") ?>
<?= $theme->script("lib/gallery.common.js") ?>
+ <? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
+ <script type="text/javascript">
+ var MSG_CANCEL = "<?= t('Cancel') ?>";
+ </script>
<?= $theme->script("lib/gallery.dialog.js") ?>
<?= $theme->script("lib/gallery.form.js") ?>
<?= $theme->script("lib/superfish/js/superfish.js") ?>