@@ -, +, @@ untranslatable string --- circ/ysearch.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 7 ++++++- koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc | 7 ++++--- 3 files changed, 11 insertions(+), 5 deletions(-) --- a/circ/ysearch.pl +++ a/circ/ysearch.pl @@ -85,7 +85,7 @@ while ( my $b = $borrowers_rs->next ) { firstname => $b->firstname // '', cardnumber => $b->cardnumber // '', dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', - age => $b->get_age // 'Age unknown', + age => $b->get_age // '', address => $b->address // '', city => $b->city // '', zipcode => $b->zipcode // '', --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -95,9 +95,14 @@ }).data( "ui-autocomplete" ); if( obj ) { obj._renderItem = function( ul, item ) { + var itemString = "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") "; + if( item.dateofbirth ) { + itemString += item.dateofbirth + " (" + item.age + " " + _("years") + "), "; + } + itemString += item.address + " " + item.city + " " + item.zipcode + " " + item.country + ""; return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " (" + item.age + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( itemString ) .appendTo( ul ); }; } --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc @@ -1,8 +1,9 @@ [%- USE KohaDates -%] +[%- USE I18N -%] [%- IF ( patron ) -%] [%- IF ( patron.dateofbirth ) -%] - [% patron.dateofbirth | $KohaDates -%] - [%- IF ( patron.get_age ) %] ([% patron.get_age | html %]) - [%- ELSIF ( patron.age ) %] ([% patron.age | html %])[% END -%] + [%- patron.dateofbirth | $KohaDates %] + [%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%] + [% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %] [%- END -%] [%- END -%] --