From 6282f652b2897ded2319a4f1fce97cac7f45ca62 Mon Sep 17 00:00:00 2001 From: Sophie Meynieux Date: Thu, 17 Mar 2011 11:46:26 +0100 Subject: [PATCH] Bug 5889: Messages name in english for notifications on public interface. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Modification of template to allow multilanguage support. Alsa fixing columns overflow. BibLibre bug #5939 Tests: It works. Messages strings can now be extracted and placed in .po file for translation. Signed-off-by: Frédéric Demians Signed-off-by: Chris Cormack --- C4/Form/MessagingPreferences.pm | 1 + admin/categorie.pl | 8 +++++--- .../prog/en/includes/messaging-preference-form.inc | 12 +++++++++--- .../prog/en/modules/admin/categorie.tmpl | 8 +++++++- .../opac-tmpl/prog/en/modules/opac-messaging.tmpl | 12 +++++++++--- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/C4/Form/MessagingPreferences.pm b/C4/Form/MessagingPreferences.pm index bd1c22f4f3..808719f1c4 100644 --- a/C4/Form/MessagingPreferences.pm +++ b/C4/Form/MessagingPreferences.pm @@ -122,6 +122,7 @@ sub set_form_values { my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); PREF: foreach my $option ( @$messaging_options ) { my $pref = C4::Members::Messaging::GetMessagingPreferences( { %{ $target_params }, message_name => $option->{'message_name'} } ); + $option->{ $option->{'message_name'} } = 1; # make a hashref of the days, selecting one. if ( $option->{'takes_days'} ) { my $days_in_advance = $pref->{'days_in_advance'} ? $pref->{'days_in_advance'} : 0; diff --git a/admin/categorie.pl b/admin/categorie.pl index bda767481e..4a5d68390c 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -240,9 +240,11 @@ sub _get_brief_messaging_prefs { my $pref = C4::Members::Messaging::GetMessagingPreferences( { categorycode => $categorycode, message_name => $option->{'message_name'} } ); next unless $pref->{'transports'}; - my $brief_pref = { message_attribute_id => $option->{'message_attribute_id'}, - message_name => $option->{'message_name'}, - }; + my $brief_pref = { + message_attribute_id => $option->{'message_attribute_id'}, + message_name => $option->{'message_name'}, + $option->{'message_name'} => 1 + }; foreach my $transport ( @{$pref->{'transports'}} ) { push @{ $brief_pref->{'transports'} }, { transport => $transport }; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc index 28dc6333ff..f9af0766bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ -27,7 +27,13 @@ - + Item DUE + Advance Notice + Upcoming Events + Hold Filled + Item Check-in + Item Checkout + Unknown @@ -45,7 +51,7 @@ - - + - - + --> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl index 736f3bb60a..ba9e468b14 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl @@ -323,7 +323,13 @@ Confirm Deletion of Category - : + Item DUE + Advance Notice + Upcoming Events + Hold Filled + Item Check-in + Item Checkout + Unknown : diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl index 1793a86676..c585936970 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl @@ -39,7 +39,13 @@  Days in advanceSMSEmailDigests only?Do not notify - + Item DUE + Advance Notice + Upcoming Events + Hold Filled + Item Check-in + Item Checkout + Unknown " name="" value="sms" onclick = "document.opacmessaging.none.checked=false;" /> - - + -->