[freeside-commits] freeside/httemplate/edit cust_pay.cgi, 1.34, 1.35 quick-charge.html, 1.19, 1.20 svc_acct.cgi, 1.71, 1.72

Erik Levinson levinse at wavetail.420.am
Sun May 22 15:09:11 PDT 2011


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

Modified Files:
	cust_pay.cgi quick-charge.html svc_acct.cgi 
Log Message:
internationalization/localization, RT12515

Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_pay.cgi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -w -d -r1.34 -r1.35
--- cust_pay.cgi	24 Jan 2011 01:02:32 -0000	1.34
+++ cust_pay.cgi	22 May 2011 22:09:08 -0000	1.35
@@ -1,12 +1,12 @@
 % if ( $link eq 'popup' ) { 
-  <% include('/elements/header-popup.html', $title ) %>
+  <& /elements/header-popup.html, $title  &>
 % } else { 
-  <%  include("/elements/header.html", $title, '') %>
+  <& /elements/header.html, $title, '' &>
 % } 
 
-<% include('/elements/init_calendar.html') %>
+<& /elements/init_calendar.html &>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 % unless ( $link eq 'popup' ) { 
     <% small_custview($custnum, $conf->config('countrydefault')) %>
@@ -20,14 +20,14 @@
 
 <BR><BR>
 
-Payment
+<% mt('Payment') |h %> 
 <% ntable("#cccccc", 2) %>
 
 <TR>
-  <TD ALIGN="right">Date</TD>
+  <TD ALIGN="right"><% mt('Date') |h %></TD>
   <TD COLSPAN=2>
     <INPUT TYPE="text" NAME="_date" ID="_date_text" VALUE="<% time2str($date_format.' %r',$_date) %>">
-    <IMG SRC="../images/calendar.png" ID="_date_button" STYLE="cursor: pointer" TITLE="Select date">
+    <IMG SRC="../images/calendar.png" ID="_date_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>">
   </TD>
 </TR>
 
@@ -41,20 +41,19 @@
 </SCRIPT>
 
 <TR>
-  <TD ALIGN="right">Amount</TD>
+  <TD ALIGN="right"><% mt('Amount') |h %></TD>
   <TD BGCOLOR="#ffffff" ALIGN="right"><% $money_char %></TD>
   <TD><INPUT TYPE="text" NAME="paid" VALUE="<% $paid %>" SIZE=8 MAXLENGTH=9> by <B><% FS::payby->payname($payby) %></B></TD>
 </TR>
 
-  <% include('/elements/tr-select-discount_term.html',
+  <& /elements/tr-select-discount_term.html,
                'custnum' => $custnum,
                'cgi'     => $cgi
-            )
-  %>
+  &>
 
 % if ( $payby eq 'BILL' ) { 
   <TR>
-    <TD ALIGN="right">Check #</TD>
+    <TD ALIGN="right"><% mt('Check #') |h %></TD>
     <TD COLSPAN=2><INPUT TYPE="text" NAME="payinfo" VALUE="<% $payinfo %>" SIZE=10></TD>
   </TR>
 % } 
@@ -62,16 +61,16 @@
 <TR>
 % if ( $link eq 'custnum' || $link eq 'popup' ) { 
 
-  <TD ALIGN="right">Auto-apply<BR>to invoices</TD>
+  <TD ALIGN="right"><% mt('Auto-apply to invoices') |h %></TD>
   <TD COLSPAN=2>
     <SELECT NAME="apply">
-      <OPTION VALUE="yes" SELECTED>yes
-      <OPTION>no</SELECT>
+      <OPTION VALUE="yes" SELECTED><% mt('yes') |h %> 
+      <OPTION><% mt('no') |h %></SELECT>
     </TD>
 
 % } elsif ( $link eq 'invnum' ) { 
 
-  <TD ALIGN="right">Apply to</TD>
+  <TD ALIGN="right"><% mt('Apply to') |h %></TD>
   <TD COLSPAN=2 BGCOLOR="#ffffff">Invoice #<B><% $linknum %></B> only</TD>
   <INPUT TYPE="hidden" NAME="apply" VALUE="no">
 
@@ -79,11 +78,10 @@
 </TR>
 
 % if ( $conf->exists('pkg-balances') ) {
-  <% include('/elements/tr-select-cust_pkg-balances.html',
+  <& /elements/tr-select-cust_pkg-balances.html,
                'custnum' => $custnum,
                'cgi'     => $cgi
-            )
-  %>
+  &>
 % } else {
   <INPUT TYPE="hidden" NAME="pkgnum" VALUE="">
 % }
@@ -91,7 +89,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" VALUE="Post payment">
+<INPUT TYPE="submit" VALUE="<% mt('Post payment') |h %>">
 
 </FORM>
 
@@ -99,7 +97,7 @@
     </BODY>
     </HTML>
 % } else { 
-    <% include('/elements/footer.html') %>
+    <& /elements/footer.html &>
 % } 
 
 <%init>
@@ -144,8 +142,8 @@
 
 my $paybatch = "webui-$_date-$$-". rand() * 2**32;
 
-my $title = 'Post '. FS::payby->payname($payby). ' payment';
-$title .= " against Invoice #$linknum" if $link eq 'invnum';
+my $title = emt('Post '. FS::payby->payname($payby). ' payment');
+$title .= emt(" against Invoice #[_1]",$linknum) if $link eq 'invnum';
 
 my $custnum;
 if ( $link eq 'invnum' ) {

Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -w -d -r1.71 -r1.72
--- svc_acct.cgi	30 Apr 2011 21:20:50 -0000	1.71
+++ svc_acct.cgi	22 May 2011 22:09:09 -0000	1.72
@@ -1,4 +1,4 @@
-<% include('/elements/header.html', "$action $svc account") %>
+<& /elements/header.html, "$action $svc account" &>
 
 <% include('/elements/error.html') %>
 

Index: quick-charge.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/quick-charge.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- quick-charge.html	18 Mar 2010 07:59:51 -0000	1.19
+++ quick-charge.html	22 May 2011 22:09:08 -0000	1.20
@@ -1,14 +1,13 @@
-<% include("/elements/header-popup.html", 'One-time charge', '',
+<& /elements/header-popup.html, emt('One-time charge'), '',
             ( $cgi->param('error') ? '' : 'onload="addRow()"' ),
-          )
-%>
+&>
 
 <LINK REL="stylesheet" TYPE="text/css" HREF="<%$fsurl%>elements/calendar-win2k-2.css" TITLE="win2k-2">
 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar_stripped.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-en.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <SCRIPT TYPE="text/javascript">
 
@@ -84,25 +83,25 @@
 <TABLE ID="QuickChargeTable" BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 STYLE="background-color: #cccccc">
 
 <TR>
-  <TD ALIGN="right">Amount </TD>
+  <TD ALIGN="right"><% mt('Amount') |h %> </TD>
   <TD>
-    $<INPUT TYPE="text" NAME="amount" SIZE=6 VALUE="<% $amount %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge()">
+    <% $money_char %><INPUT TYPE="text" NAME="amount" SIZE=6 VALUE="<% $amount %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge()">
   </TD>
 </TR>
 
 % if ( $conf->exists('invoice-unitprice') ) {
     <TR>
-      <TD ALIGN="right">Quantity </TD>
+      <TD ALIGN="right"><% mt('Quantity') |h %> </TD>
       <TD>
         <INPUT TYPE="text" NAME="quantity" SIZE=4 VALUE="<% $quantity %>">
       </TD>
     </TR>
 % }
 
-<% include('/elements/tr-select-pkg_class.html', 'curr_value' => $cgi->param('classnum') ) %>
+<& /elements/tr-select-pkg_class.html, 'curr_value' => $cgi->param('classnum')  &>
 
 <TR>
-  <TD ALIGN="right">Invoice now</TD>
+  <TD ALIGN="right"><% mt('Invoice now') |h %></TD>
   <TD>
     <INPUT TYPE  = "checkbox"
            NAME  = "bill_now"
@@ -110,19 +109,18 @@
            <% $cgi->param('bill_now') ? 'CHECKED' : '' %>
            onChange = "bill_now_changed(this);"
     >
-    with terms 
-    <% include('/elements/select-terms.html',
+    <% mt('with terms') |h %> 
+    <& /elements/select-terms.html,
                  'curr_value'  => scalar($cgi->param('invoice_terms')),
                  'empty_value' => $default_terms,
                  'disabled'    => ( $cgi->param('bill_now') ? 0 : 1 ),
-              )
-    %>
+    &>
   </TD>
 </TR>
 
 %# false laziness w/misc/order_pkg.html
 <TR>
-  <TD ALIGN="right">Charge date </TD>
+  <TD ALIGN="right"><% mt('Charge date') |h %> </TD>
   <TD>
     <INPUT TYPE  = "text"
            NAME  = "start_date"
@@ -133,14 +131,14 @@
     >
     <IMG SRC   = "<%$fsurl%>images/calendar.png"
          ID    = "start_date_button"
-         TITLE = "Select date"
+         TITLE = "<% mt('Select date') |h %>"
          STYLE = "cursor:pointer<% $cgi->param('bill_now') ? ';display:none' : '' %>"
     >
     <IMG SRC   = "<%$fsurl%>images/calendar-disabled.png"
          ID    = "start_date_button_disabled"
          <% $cgi->param('bill_now') ? '' : 'STYLE="display:none"' %>
     >
-    <FONT SIZE=-1>(leave blank to charge immediately)</FONT>
+    <FONT SIZE=-1>(<% mt('leave blank to charge immediately') |h %>)</FONT>
   </TD>
 </TR>
 
@@ -156,24 +154,24 @@
 % if ( $cust_main->payby =~ /^(CARD|CHEK)$/ ) {
 %   my $what = lc(FS::payby->shortname($cust_main->payby));
     <TR>
-      <TD ALIGN="right">Disable automatic <% $what %> charge </TD>
+      <TD ALIGN="right"><% mt('Disable automatic $what charge') |h %> </TD>
       <TD COLSPAN=6><INPUT TYPE="checkbox" NAME="no_auto" VALUE="Y"></TD>
     </TR>
 % }
 
 <TR>
-  <TD ALIGN="right">Tax exempt </TD>
+  <TD ALIGN="right"><% mt('Tax exempt') |h %> </TD>
   <TD><INPUT TYPE="checkbox" NAME="setuptax" VALUE="Y" <% $cgi->param('setuptax') ? 'CHECKED' : '' %>></TD>
 </TR>
 
-<% include('/elements/tr-select-taxclass.html', 'curr_value' => $cgi->param('taxclass') ) %>
+<& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass')  &>
 
-<% include('/elements/tr-select-taxproduct.html', 'label' => 'Tax product', 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum') ) %>
+<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum')  &>
 
-<% include('/elements/tr-select-taxoverride.html', 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') ) %>
+<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override')  &>
 
 <TR>
-  <TD ALIGN="right">Description </TD>
+  <TD ALIGN="right"><% mt('Description') |h %> </TD>
   <TD>
     <INPUT TYPE="text" NAME="pkg" SIZE="50" MAXLENGTH="50" VALUE="<% $pkg %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge()">
   </TD>
@@ -181,7 +179,7 @@
 
 <TR>
   <TD></TD>
-  <TD><FONT SIZE="-1">Optional additional description (also printed on invoice): </FONT></TD>
+  <TD><FONT SIZE="-1"><% mt('Optional additional description (also printed on invoice):') |h %> </FONT></TD>
 </TR>
 
 % my $row = 0;
@@ -203,7 +201,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="Add one-time charge" <% $cgi->param('error') ? '' :' DISABLED' %>>
+<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="<% mt('Add one-time charge') |h %>" <% $cgi->param('error') ? '' :' DISABLED' %>>
 
 </FORM>
 
@@ -258,6 +256,7 @@
 
 my $conf = new FS::Conf;
 my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+my $money_char = $conf->config('money_char') || '$';
 
 $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum';
 my $custnum = $1;
@@ -283,12 +282,11 @@
 
 my $default_terms;
 if ( $cust_main->invoice_terms ) {
-  $default_terms = 'Customer default ('. $cust_main->invoice_terms. ')';
+  $default_terms = emt("Customer default ([_1])", $cust_main->invoice_terms);
 } else {
-  $default_terms =
-    'Default ('.
-       ($conf->config('invoice_default_terms') || 'Payable upon receipt').
-    ')';
+  $default_terms = emt("Default ([_1])",
+            ($conf->config('invoice_default_terms') || emt('Payable upon receipt'))
+                      );
 }
 
 </%init>



More information about the freeside-commits mailing list