Make the "user account expired" warning i18n-friendly
authorDan Scott <dscott@laurentian.ca>
Fri, 16 Nov 2012 21:01:10 +0000 (16:01 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 19 Nov 2012 20:15:22 +0000 (15:15 -0500)
The warning message is now capable of being translated, and we're
formatting of the date consistently with other uses throughout the TPAC.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/myopac/main_base.tt2

index c28ea71..dee5662 100644 (file)
     <div style="width:662px;">
         <div style="float:left;">
             <div style="padding:10px 0px;">
-               [% IF date.format(ctx.user.expire_date, '%s') < date.format(date.now , '%s') %]
-                <span class="alert">Your library card expired on [% date.format(ctx.user.expire_date, '%B %d, %Y') %]. Please contact a librarian to resolve this issue.</span>
-                [% END %]
-           </div>
+            [%- IF date.format(ctx.user.expire_date, '%s') < date.format(date.now , '%s');
+               fmt_expire_date = date.format(ctx.user.expire_date, DATE_FORMAT);
+            %]
+            <span class="alert">[% l("Your library card expired on [_1]. Please contact a librarian to resolve this issue.", fmt_expire_date) %]</span>
+            [% END %]
+            </div>
             <div class="acct_sum_row">
                 <table width="100%" cellspacing="0" cellpadding="0">
                     <tr>