From cc8090b15ad511fe61a9250f0869430093b4fca6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 3 Feb 2014 14:15:38 +0100 Subject: [PATCH] Bug 9016: (follow-up) fix some translate issues On tools/letter.pl and tools/overduerules.pl, some strings were not translatable. This patch should fix that. Signed-off-by: Marcel de Rooy Signed-off-by: Galen Charlton --- .../prog/en/modules/tools/letter.tt | 21 +++++++++++++++++-- .../prog/en/modules/tools/overduerules.tt | 17 ++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 7d2dbac627..a6608d745c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -34,7 +34,9 @@ $(document).ready(function() { || ( title.length > 0 && content.length == 0 ) ) { var mtt = $(this).find('input[name="message_transport_type"]').val(); - alert("You must specify a title and a content for " + mtt); + var msg = _("You must specify a title and a content for %s"); + msg = msg.replace( "%s", mtt ); + alert(msg) event.preventDefault(); } } ); @@ -290,7 +292,22 @@ $(document).ready(function() { [% FOREACH letter IN letters %]
  • - [% letter.message_transport_type %] + + [% SWITCH letter.message_transport_type %] + [% CASE 'email' %] + email + [% CASE 'print' %] + print + [% CASE 'sms' %] + sms + [% CASE 'feed' %] + feed + [% CASE 'phone' %] + phone + [% CASE %] + [% letter.message_transport_type %] + [% END %] +
    1. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt index a9ba122e80..dd90499e28 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt @@ -92,7 +92,22 @@ $(document).ready(function() { Letter Restrict [% FOREACH mtt IN message_transport_types %] - [% mtt %] + + [% SWITCH mtt %] + [% CASE 'email' %] + email + [% CASE 'print' %] + print + [% CASE 'sms' %] + sms + [% CASE 'feed' %] + feed + [% CASE 'phone' %] + phone + [% CASE %] + [% letter.message_transport_type %] + [% END %] + [% END %] -- 2.39.5