[freeside-commits] freeside/httemplate/view cust_bill.cgi, 1.47, 1.48 cust_pay.html, 1.8, 1.9 cust_refund.html, 1.3, 1.4 svc_acct.cgi, 1.64, 1.65 svc_phone.cgi, 1.28, 1.29

Erik Levinson levinse at wavetail.420.am
Sun May 15 21:20:49 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv17444/view

Modified Files:
	cust_bill.cgi cust_pay.html cust_refund.html svc_acct.cgi 
	svc_phone.cgi 
Log Message:
internationalization/localization, RT12515

Index: cust_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill.cgi,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -w -d -r1.47 -r1.48
--- cust_bill.cgi	16 Feb 2011 07:39:04 -0000	1.47
+++ cust_bill.cgi	16 May 2011 04:20:47 -0000	1.48
@@ -1,6 +1,6 @@
-<% include("/elements/header.html",'Invoice View', menubar(
-  "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
-)) %>
+<& /elements/header.html, mt('Invoice View'), menubar(
+  mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
+) &>
 
 % if ( $conf->exists('deleteinvoices')
 %      && $curuser->access_right('Delete invoices' )
@@ -16,10 +16,10 @@
 
     <A HREF  = "javascript:areyousure(
                   '<%$p%>misc/delete-cust_bill.html?<% $invnum %>',
-                  'Are you sure you want to delete this invoice?'
+                  '<% mt('Are you sure you want to delete this invoice?') |h %>'
                )"
-       TITLE = "Delete this invoice from the database completely"
-    >Delete this invoice</A>
+       TITLE = "<% mt('Delete this invoice from the database completely') |h %>"
+    ><% mt('Delete this invoice') |h %></A>
     <BR><BR>
 
 % }
@@ -32,42 +32,42 @@
 % {
 %     my $s = 0;
 
-      Post 
+      <% mt('Post') |h %> 
 
 %     if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) { 
           <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>">check</A>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>"><% mt('check') |h %></A>
 %     } 
 
 %     if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { 
           <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>">cash</A>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>"><% mt('cash') |h %></A>
 %     } 
 
 %     if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { 
           <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>">Western Union</A>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>"><% mt('Western Union') |h %></A>
 %     } 
 
 %     if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { 
           <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>">manual credit card</A>
+          <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>"><% mt('manual credit card') |h %></A>
 %     } 
 
-      payment against this invoice<BR><BR>
+      <% mt('payment against this invoice') |h %><BR><BR>
 
 % } 
 
 % if ( $curuser->access_right('Resend invoices') ) {
 
-    <A HREF="<% $p %>misc/send-invoice.cgi?method=print;<% $link %>">Re-print this invoice</A>
+    <A HREF="<% $p %>misc/send-invoice.cgi?method=print;<% $link %>"><% mt('Re-print this invoice') |h %></A>
 
 %   if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { 
-        | <A HREF="<% $p %>misc/send-invoice.cgi?method=email;<% $link %>">Re-email this invoice</A>
+        | <A HREF="<% $p %>misc/send-invoice.cgi?method=email;<% $link %>"><% mt('Re-email this invoice') |h %></A>
 %   } 
 
 %   if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { 
-        | <A HREF="<% $p %>misc/send-invoice.cgi?method=fax;<% $link %>">Re-fax this invoice</A>
+        | <A HREF="<% $p %>misc/send-invoice.cgi?method=fax;<% $link %>"><% mt('Re-fax this invoice') |h %></A>
 %   } 
 
     <BR><BR>
@@ -76,17 +76,17 @@
 
 % if ( $conf->exists('invoice_latex') ) { 
 
-  <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>">View typeset invoice PDF</A>
+  <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>"><% mt('View typeset invoice PDF') |h %></A>
   <BR><BR>
 % } 
 
 % my $br = 0;
 % if ( $cust_bill->num_cust_event ) { $br++;
-<A HREF="<%$p%>search/cust_event.html?invnum=<% $cust_bill->invnum %>">(&nbsp;View invoice events&nbsp;)</A> 
+<A HREF="<%$p%>search/cust_event.html?invnum=<% $cust_bill->invnum %>">( <% mt('View invoice events') |h %> )</A> 
 % } 
 
 % if ( $cust_bill->num_cust_bill_event ) { $br++;
-<A HREF="<%$p%>search/cust_bill_event.cgi?invnum=<% $cust_bill->invnum %>">(&nbsp;View deprecated, old-style invoice events&nbsp;)</A> 
+<A HREF="<%$p%>search/cust_bill_event.cgi?invnum=<% $cust_bill->invnum %>">( <% mt('View deprecated, old-style invoice events') |h %> )</A> 
 % }
 
 <% $br ? '<BR><BR>' : '' %>
@@ -97,7 +97,7 @@
   <PRE><% join('', $cust_bill->print_text(\%opt) ) %></PRE>
 % } 
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 <%init>
 
 my $curuser = $FS::CurrentUser::CurrentUser;

Index: cust_refund.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_refund.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- cust_refund.html	3 Dec 2008 21:12:19 -0000	1.3
+++ cust_refund.html	16 May 2011 04:20:47 -0000	1.4
@@ -1,83 +1,82 @@
 % if ( $link eq 'popup' ) { 
 
-  <% include('/elements/header-popup.html', "Refund Receipt" ) %>
+  <& /elements/header-popup.html, mt('Refund Receipt') &>
 
-  <CENTER><A HREF="javascript:self.parent.location = '<% $pr_link %>'">Print</A></CENTER><BR>
+  <CENTER><A HREF="javascript:self.parent.location = '<% $pr_link %>'"><% mt('Print') |h %></A></CENTER><BR>
 
 % } elsif ( $link eq 'print' ) { 
 
-  <% include('/elements/header-popup.html', "Refund Receipt" ) %>
+  <& /elements/header-popup.html, mt('Refund Receipt') &>
   
 % #it would be nice if the menubar could be hidden for print, but better to
 % # have it available than not, otherwise the user winds up at a dead end
   <% menubar(
-       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
+       mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
      )
   %>
   <BR><BR>
 
 % } else { 
 
-  <% include('/elements/header.html', "Refund Receipt", menubar(
-       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
-       'Print receipt' => $pr_link,
-     ))
-  %>
+  <& /elements/header.html, mt('Refund Receipt'), menubar(
+       mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
+       mt('Print receipt') => $pr_link,
+     )
+  &>
 
 % }
 
 % unless ($link eq 'popup' ) {
-  <% include('/elements/small_custview.html',
+  <& /elements/small_custview.html,
                $custnum,
                scalar($conf->config('countrydefault')),
                1, #no balance
-            )
-  %>
+  &>
   <BR><BR>
 % } 
 
 <% ntable("#cccccc", 2) %>
 
 <TR>
-  <TD ALIGN="right">Refund#</TD>
+  <TD ALIGN="right"><% mt('Refund') |h %>#</TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->refundnum %></B></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Date</TD>
+  <TD ALIGN="right"><% mt('Date') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% time2str"%a&nbsp;%b&nbsp;%o,&nbsp;%Y&nbsp;%r", $cust_refund->_date %></B></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Amount</TD>
+  <TD ALIGN="right"><% mt('Amount') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $money_char. $cust_refund->refund %></B></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Reason</TD>
+  <TD ALIGN="right"><% mt('Reason') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->reason %></B></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Refund method</TD>
+  <TD ALIGN="right"><% mt('Refund method') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->payby_name %><% $cust_refund->paymask ? ' #'.$cust_refund->paymask : '' %></B></TD>
 </TR>
 
 % if ( $cust_refund->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_refund->paybatch ) { 
 
     <TR>
-      <TD ALIGN="right">Processor</TD>
+      <TD ALIGN="right"><% mt('Processor') |h %></TD>
       <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->processor %></B></TD>
     </TR>
 
     <TR>
-      <TD ALIGN="right">Authorization#</TD>
+      <TD ALIGN="right"><% mt('Authorization') |h %>#</TD>
       <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->authorization %></B></TD>
     </TR>
 
 %   if ( $cust_refund->order_number ) {
       <TR>
-        <TD ALIGN="right">Order#</TD>
+        <TD ALIGN="right"><% mt('Order') |h %>#</TD>
         <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->order_number %></B></TD>
       </TR>
 %   }
@@ -98,7 +97,7 @@
     </BODY>
   </HTML>
 % } else {
-  <% include('/elements/footer.html') %>
+  <& /elements/footer.html &>
 % }
 
 <%init>

Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_acct.cgi,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -w -d -r1.64 -r1.65
--- svc_acct.cgi	1 Apr 2011 02:52:19 -0000	1.64
+++ svc_acct.cgi	16 May 2011 04:20:47 -0000	1.65
@@ -1,71 +1,66 @@
 % if ( $custnum ) { 
 
-  <% include("/elements/header.html","View $svc account") %>
-  <% include( '/elements/small_custview.html', $custnum, '', 1,
-     "${p}view/cust_main.cgi") %>
+  <& /elements/header.html, mt("View $svc account") &>
+  <& /elements/small_custview.html, $custnum, '', 1,
+     "${p}view/cust_main.cgi" &> 
   <BR>
 
 % } else { 
+% my $delmsg = mt('Permanently delete this account?');
 
   <SCRIPT>
   function areyousure(href) {
-      if (confirm("Permanently delete this account?") == true)
+      if (confirm("<% $delmsg %>") == true)
           window.location.href = href;
   }
   </SCRIPT>
   
-  <% include("/elements/header.html",'View account', menubar(
-    "Cancel this (unaudited) account" =>
+  <& /elements/header.html, mt('View account'), menubar(
+    mt("Cancel this (unaudited) account") =>
             "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')",
-  )) %>
+  ) &>
 
 % } 
 
-<% include( 'svc_acct/radius_usage.html',
+<& svc_acct/radius_usage.html,
               'svc_acct' => $svc_acct,
               'part_svc' => $part_svc,
               'cust_pkg' => $cust_pkg,
               %gopt,
-          )
-%>
+&>
 
-<% include( 'svc_acct/change_svc_form.html',
+<& svc_acct/change_svc_form.html,
               'part_svc' => \@part_svc,
               'svcnum'   => $svcnum,
               'pkgnum'   => $pkgnum,
               %gopt,
-          )
-%>
+&>
 
-Service #<B><% $svcnum %></B>
+<% mt('Service') |h %> #<B><% $svcnum %></B>
 |
-<% include('/view/elements/svc_edit_link.html', 'svc' => $svc_acct) %>
-<% include( 'svc_acct/change_svc.html',
+<& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &>
+<& svc_acct/change_svc.html,
               'part_svc' => \@part_svc,
               %gopt,
-          )
-%>
+&>
 
-<% include( 'svc_acct/basics.html',
+<& svc_acct/basics.html,
               'svc_acct' => $svc_acct,
               'part_svc' => $part_svc,
               %gopt,
-          )
-%>
+&>
 
 </FORM>
 <BR>
 
-<% include( 'svc_acct/cardfortress.html',
+<& svc_acct/cardfortress.html,
               'svc_acct' => $svc_acct,
               %gopt,
-          )
-%>
+&>
 
-<% include( 'svc_acct/hosting.html',
+<& svc_acct/hosting.html,
               %gopt,
-          )
-%>
+&>
 
 %#remove this?  does anybody even use it?  it was a misunderstood customer
 %#request IIRC?
@@ -76,11 +71,11 @@
 <BR><BR>
 % }
 
-<% include('elements/svc_export_settings.html', $svc_acct) %>
+<& elements/svc_export_settings.html, $svc_acct &>
 
 <% joblisting({'svcnum'=>$svcnum}, 1) %>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 <%init>
 
 die "access denied"

Index: cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_pay.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- cust_pay.html	4 Nov 2010 00:54:36 -0000	1.8
+++ cust_pay.html	16 May 2011 04:20:47 -0000	1.9
@@ -1,100 +1,97 @@
 % if ( $link eq 'popup' ) { 
 
-  <% include('/elements/header-popup.html', "$thing Receipt" ) %>
+  <& /elements/header-popup.html, mt("$thing Receipt") &>
 
   <div align="center">
-    <A HREF="javascript:self.parent.location = '<% $pr_link %>'">Print</A> | 
-    <A HREF="javascript:self.location = '<% $email_link %>'">Re-email</A>
+    <A HREF="javascript:self.parent.location = '<% $pr_link %>'"><% mt('Print') |h %></A> | 
+    <A HREF="javascript:self.location = '<% $email_link %>'"><% mt('Re-email') |h %></A>
   </div><BR>
 
 % } elsif ( $link eq 'print' ) { 
 
-  <% include('/elements/header-popup.html', "$thing Receipt" ) %>
+  <& /elements/header-popup.html, mt("$thing Receipt") &>
   
 % #it would be nice if the menubar could be hidden for print, but better to
 % # have it available than not, otherwise the user winds up at a dead end
   <% menubar(
-       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
+       mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
      )
   %>
   <BR><BR>
 % } elsif ( $link eq 'email' ) {
 %  if ( $email_error ) {
-      <% include('/elements/header-popup.html', "Error re-emailing receipt: $email_error" ) %>
+      <& /elements/header-popup.html, mt("Error re-emailing receipt: $email_error") &>
 %  } else {
-      <% include('/elements/header-popup.html', "Re-emailed receipt" ) %>
+      <& /elements/header-popup.html, mt("Re-emailed receipt") &>
 %  }
 % } else { 
 
-  <% include('/elements/header.html', "$thing Receipt", menubar(
-       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
-       'Print receipt' => $pr_link,
-     ))
-  %>
+  <& /elements/header.html, mt("$thing Receipt"), menubar(
+       mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
+       mt('Print receipt') => $pr_link,
+     )
+  &>
 
 % }
 
 % unless ($link =~ /^(popup|email)$/ ) {
-  <% include('/elements/small_custview.html',
+  <& /elements/small_custview.html,
                $custnum,
                scalar($conf->config('countrydefault')),
                1, #no balance
-            )
-  %>
+  &>
   <BR><BR>
 % } 
 
 <% ntable("#cccccc", 2) %>
 
 <TR>
-  <TD ALIGN="right">Payment#</TD>
+  <TD ALIGN="right"><% mt('Payment') |h %>#</TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->paynum %></B></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Date</TD>
+  <TD ALIGN="right"><% mt('Date') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% time2str"%a&nbsp;%b&nbsp;%o,&nbsp;%Y&nbsp;%r", $cust_pay->_date %></B></TD>
 </TR>
 
 % if ( $void ) {
 
   <TR>
-    <TD ALIGN="right">Void Date</TD>
+    <TD ALIGN="right"><% mt('Void Date') |h %></TD>
     <TD BGCOLOR="#FFFFFF"><B><% time2str"%a&nbsp;%b&nbsp;%o,&nbsp;%Y&nbsp;%r", $cust_pay->void_date %></B></TD>
   </TR>
 
 %#  <TR>
-%#    <TD ALIGN="right">Void reason</TD>
+%#    <TD ALIGN="right"><% mt('Void reason') |h %></TD>
 %#    <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->reason %></B></TD>
 %#  </TR>
 
 % }
-
 <TR>
-  <TD ALIGN="right">Amount</TD>
+  <TD ALIGN="right"><% mt('Amount') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $money_char. $cust_pay->paid %></B></TD>
 </TR>
-
 <TR>
-  <TD ALIGN="right">Payment method</TD>
+  <TD ALIGN="right"><% mt('Payment method') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->payby_name %> #<% $cust_pay->paymask %></B></TD>
 </TR>
 
 % if ( $cust_pay->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_pay->paybatch ) { 
 
     <TR>
-      <TD ALIGN="right">Processor</TD>
+      <TD ALIGN="right"><% mt('Processor') |h %></TD>
       <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->processor %></B></TD>
     </TR>
 
     <TR>
-      <TD ALIGN="right">Authorization#</TD>
+      <TD ALIGN="right"><% mt('Authorization') |h %>#</TD>
       <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->authorization %></B></TD>
     </TR>
 
 %   if ( $cust_pay->order_number ) {
       <TR>
-        <TD ALIGN="right">Order#</TD>
+        <TD ALIGN="right"><% mt('Order') |h %>#</TD>
         <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->order_number %></B></TD>
       </TR>
 %   }
@@ -104,7 +101,7 @@
 % if ( $conf->exists('pkg-balances') && $cust_pay->pkgnum ) {
 %   my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay->pkgnum } );
     <TR>
-      <TD ALIGN="right">For package</TD>
+      <TD ALIGN="right"><% mt('For package') |h %></TD>
       <TD BGCOLOR="#FFFFFF"><B><% $cust_pkg->pkg_label_long %></B></TD>
     </TR>
 
@@ -129,7 +126,7 @@
     </BODY>
   </HTML>
 % } else {
-  <% include('/elements/footer.html') %>
+  <& /elements/footer.html &>
 % }
 
 <%init>

Index: svc_phone.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_phone.cgi,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -w -d -r1.28 -r1.29
--- svc_phone.cgi	10 Apr 2011 18:04:12 -0000	1.28
+++ svc_phone.cgi	16 May 2011 04:20:47 -0000	1.29
@@ -1,10 +1,9 @@
-<% include('elements/svc_Common.html',
+<& elements/svc_Common.html,
               'table'     => 'svc_phone',
               'fields'    => \@fields,
 	      'labels'    => \%labels,
               'html_foot' => $html_foot,
-          )
-%>
+&>
 <%init>
 
 my $conf = new FS::Conf;
@@ -42,7 +41,7 @@
   my $e911 = 
     'E911 Information'.
     &ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
-      '<TR><TD>Location</TD>'.
+      '<TR><TD>'.mt('Location').'</TD>'.
       '<TD BGCOLOR="#FFFFFF">'.
         $svc_phone->location_label( 'join_string'     => '<BR>',
                                     'double_space'    => ' &nbsp; ',



More information about the freeside-commits mailing list