[freeside-commits] freeside/httemplate/edit cust_bill_pay.cgi, 1.19, 1.20 cust_credit.cgi, 1.30, 1.31 cust_main.cgi, 1.108, 1.109 msgcat.cgi, 1.5, 1.6 svc_acct.cgi, 1.72, 1.73

Erik Levinson levinse at wavetail.420.am
Mon May 23 09:25:29 PDT 2011


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

Modified Files:
	cust_bill_pay.cgi cust_credit.cgi cust_main.cgi msgcat.cgi 
	svc_acct.cgi 
Log Message:
internationalization/localization, RT12515

Index: cust_bill_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_bill_pay.cgi,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- cust_bill_pay.cgi	5 Jun 2008 05:06:35 -0000	1.19
+++ cust_bill_pay.cgi	23 May 2011 16:25:26 -0000	1.20
@@ -1,11 +1,10 @@
-<% include('elements/ApplicationCommon.html',
+<& elements/ApplicationCommon.html,
      'form_action' => 'process/cust_bill_pay.cgi',
      'src_table'   => 'cust_pay',
-     'src_thing'   => 'payment',
+     'src_thing'   => emt('payment'),
      'dst_table'   => 'cust_bill',
-     'dst_thing'   => 'invoice',
-   )
-%>
+     'dst_thing'   => emt('invoice'),
+&>
 <%init>
 
 die "access denied"

Index: cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_credit.cgi,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -w -d -r1.30 -r1.31
--- cust_credit.cgi	13 Apr 2011 04:21:55 -0000	1.30
+++ cust_credit.cgi	23 May 2011 16:25:26 -0000	1.31
@@ -1,6 +1,6 @@
-<% include('/elements/header-popup.html', 'Enter Credit') %>
+<& /elements/header-popup.html, emt('Enter Credit') &>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <FORM NAME="credit_popup" ACTION="<% $p1 %>process/cust_credit.cgi" METHOD=POST>
 <INPUT TYPE="hidden" NAME="crednum" VALUE="">
@@ -13,29 +13,24 @@
 <% ntable("#cccccc", 2) %>
 
   <TR>
-    <TD ALIGN="right">Date</TD>
+    <TD ALIGN="right"><% mt('Date') |h %></TD>
     <TD BGCOLOR="#ffffff"><% time2str($date_format, $_date) %></TD>
   </TR>
 
   <TR>
-    <TD ALIGN="right">Amount</TD>
+    <TD ALIGN="right"><% mt('Amount') |h %></TD>
     <TD BGCOLOR="#ffffff">$<INPUT TYPE="text" NAME="amount" VALUE="<% $amount |h %>" SIZE=8 MAXLENGTH=9></TD>
   </TR>
 
-%
-%#print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!;
-%
-
-<% include( '/elements/tr-select-reason.html',
+<& /elements/tr-select-reason.html,
               'field'          => 'reasonnum',
               'reason_class'   => 'R',
               'control_button' => "document.getElementById('confirm_credit_button')",
               'cgi'            => $cgi,
-           )
-%>
+&>
 
   <TR>
-    <TD ALIGN="right">Additional info</TD>
+    <TD ALIGN="right"><% mt('Additional info') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="addlinfo" VALUE="<% $cgi->param('addlinfo') |h %>">
     </TD>
@@ -44,17 +39,16 @@
         <INPUT TYPE="HIDDEN" NAME="apply" VALUE="no">
 % } else {
   <TR>
-    <TD ALIGN="right">Auto-apply<BR>to invoices</TD>
-    <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED>yes<OPTION>no</SELECT></TD>
+    <TD ALIGN="right"><% mt('Auto-apply to invoices') |h %></TD>
+    <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED><% mt('yes') |h %><OPTION><% mt('no') |h %></SELECT></TD>
   </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="">
 % }
@@ -63,7 +57,7 @@
 
 <BR>
 
-<CENTER><INPUT TYPE="submit" ID="confirm_credit_button" VALUE="Enter credit" DISABLED></CENTER>
+<CENTER><INPUT TYPE="submit" ID="confirm_credit_button" VALUE="<% mt('Enter credit') |h %>" DISABLED></CENTER>
 
 </FORM>
 </BODY>

Index: msgcat.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/msgcat.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- msgcat.cgi	25 Dec 2007 23:49:21 -0000	1.5
+++ msgcat.cgi	23 May 2011 16:25:26 -0000	1.6
@@ -1,7 +1,7 @@
-<% header("Edit Message catalog" ) %>
+<% header(emt("Edit Message catalog")) %>
 <BR>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <% $widget->html %>
 
@@ -20,9 +20,9 @@
   'layer_callback' => sub {
     my $layer = shift;
     my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
-               "<BR>Messages for locale $layer<BR>". table().
-               "<TR><TH COLSPAN=2>Code</TH>".
-               "<TH>Message</TH>";
+               "<BR>".emt("Messages for locale [_1]",$layer)."<BR>". table().
+               "<TR><TH COLSPAN=2>".emt('Code')."</TH>".
+               "<TH>".emt('Message')."</TH>";
     $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
     $html .= '</TR>';
 
@@ -44,7 +44,7 @@
       $html .= '</TR>';
     }
 
-    $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">';
+    $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="'.emt('Apply changes').'">';
 
     $html;
   },

Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main.cgi,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -w -d -r1.108 -r1.109
--- cust_main.cgi	27 Mar 2011 22:46:38 -0000	1.108
+++ cust_main.cgi	23 May 2011 16:25:26 -0000	1.109
@@ -1,16 +1,14 @@
-<% include('/elements/header.html',
+<& /elements/header.html,
       $title,
       '',
       ' onUnload="myclose()"' #hmm, in billing.html
-) %>
+&>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <FORM NAME   = "CustomerForm"
       METHOD = "POST"
       ACTION = "<% popurl(1) %>process/cust_main.cgi"
-%#      STYLE = "margin-bottom: 0"
-%#      STYLE="margin-top: 0; margin-bottom: 0">
 >
 
 <INPUT TYPE="hidden" NAME="custnum"     VALUE="<% $custnum %>">
@@ -25,12 +23,12 @@
 % } 
 
 %# agent, agent_custid, refnum (advertising source), referral_custnum
-<% include('cust_main/top_misc.html', $cust_main, 'custnum' => $custnum ) %>
+<& cust_main/top_misc.html, $cust_main, 'custnum' => $custnum  &>
 
 %# birthdate
 % if ( $conf->exists('cust_main-enable_birthdate') ) {
   <BR>
-  <% include('cust_main/birthdate.html', $cust_main) %>
+  <& cust_main/birthdate.html, $cust_main &>
 % }
 
 %# latitude and longitude
@@ -62,7 +60,7 @@
 <BR>
 <FONT SIZE="+1"><B>Billing address</B></FONT>
 
-<% include('cust_main/contact.html',
+<& cust_main/contact.html,
              'cust_main'    => $cust_main,
              'pre'          => '',
              'onchange'     => 'bill_changed(this)',
@@ -70,8 +68,7 @@
              'ss'           => $ss,
              'stateid'      => $stateid,
              'same_checked' => $same_checked, #for address2 "Unit #" labeling
-          )
-%>
+&>
 
 <SCRIPT>
 function bill_changed(what) {
@@ -138,29 +135,27 @@
 </SCRIPT>
 
 <BR>
-<FONT SIZE="+1"><B>Service address</B></FONT>
+<FONT SIZE="+1"><B><% mt('Service address') |h %></B></FONT>
 
-(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" <%$same_checked%>>same as billing address)
-<% include('cust_main/contact.html',
+(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" <%$same_checked%>><% mt('same as billing address') |h %>)
+<& cust_main/contact.html,
              'cust_main' => $cust_main,
              'pre'       => 'ship_',
              'onchange'  => '',
              'disabled'  => $ship_disabled,
              'style'     => \@ship_style
-          )
-%>
+&>
 
 %# billing info
-<% include( 'cust_main/billing.html', $cust_main,
+<& cust_main/billing.html, $cust_main,
                'payinfo'        => $payinfo,
                'invoicing_list' => \@invoicing_list,
-           )
-%>
+&>
 
 % my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly';
 % if (!$ro_comments || $cust_main->comments) {
 
-    <BR>Comments
+    <BR><% mt('Comments') |h %> 
     <% &ntable("#cccccc") %>
       <TR>
         <TD>
@@ -178,19 +173,17 @@
 
 % unless ( $custnum ) {
 
-    <% include('cust_main/first_pkg.html', $cust_main,
+    <& cust_main/first_pkg.html, $cust_main,
                  'pkgpart_svcpart' => $pkgpart_svcpart,
                  'disable_empty'   =>
                    scalar( $cgi->param('lock_pkgpart') =~ /^(\d+)$/ ),
-                 #svc_acct
                  'username'        => $username,
                  'password'        => $password,
                  'popnum'          => $popnum,
                  'saved_domsvc'    => $saved_domsvc,
                  %svc_phone,
                  %svc_dsl,
-              )
-    %>
+    &>
 
 % }
 
@@ -210,7 +203,7 @@
     <INPUT TYPE="hidden" NAME="<% $hidden %>" VALUE="">
 % } 
 
-<% include('cust_main/bottomfixup.html') %>
+<& cust_main/bottomfixup.html &>
 
 <BR>
 <INPUT TYPE    = "button"
@@ -221,7 +214,7 @@
 >
 </FORM>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 
 <%init>
 
@@ -373,6 +366,7 @@
 $cgi->delete( grep !$keep{$_}, $cgi->param );
 
 my $title = $custnum ? 'Edit Customer' : 'Add Customer';
+$title = emt($title);
 $title .= ": ". $cust_main->name if $custnum;
 
 my $r = qq!<font color="#ff0000">*</font>&nbsp;!;

Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -w -d -r1.72 -r1.73
--- svc_acct.cgi	22 May 2011 22:09:09 -0000	1.72
+++ svc_acct.cgi	23 May 2011 16:25:26 -0000	1.73
@@ -1,11 +1,11 @@
-<& /elements/header.html, "$action $svc account" &>
+<& /elements/header.html, emt("$action [_1] account",$svc) &>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 % if ( $cust_main ) { 
 
-  <% include( '/elements/small_custview.html', $cust_main, '', 1,
-              popurl(2) . "view/cust_main.cgi") %>
+  <& /elements/small_custview.html, $cust_main, '', 1,
+              popurl(2) . "view/cust_main.cgi" &>
   <BR>
 % } 
 
@@ -27,17 +27,24 @@
 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
 <INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>">
 
-Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
+% if ( $svcnum ) {
+% my $svclabel = emt("Service #[_1]",$svcnum);
+% $svclabel =~ s/$svcnum/<B>$svcnum<\/B>/;
+<% $svclabel %>
+% } else {
+<% mt("Service # (NEW)") |h %>
+% }
+<BR>
 
 <% ntable("#cccccc",2) %>
 
 <TR>
-  <TD ALIGN="right">Service</TD>
+  <TD ALIGN="right"><% mt('Service') |h %></TD>
   <TD BGCOLOR="#eeeeee"><% $part_svc->svc %></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Username</TD>
+  <TD ALIGN="right"><% mt('Username') |h %></TD>
   <TD>
     <INPUT TYPE="text" NAME="username" VALUE="<% $username %>" SIZE=<% $ulen2 %> MAXLENGTH=<% $ulen %>>
   </TD>
@@ -45,10 +52,10 @@
 
 %if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) {
 <TR>
-  <TD ALIGN="right">Password</TD>
+  <TD ALIGN="right"><% mt('Password') |h %></TD>
   <TD>
     <INPUT TYPE="text" NAME="clear_password" VALUE="<% $password %>" SIZE=<% $pmax2 %> MAXLENGTH=<% $pmax %>>
-    <INPUT TYPE="button" VALUE="Generate" onclick="randomPass();">
+    <INPUT TYPE="button" VALUE="<% mt('Generate') |h %>" onclick="randomPass();">
   </TD>
 </TR>
 %}else{
@@ -59,19 +66,16 @@
 %my $sec_phrase = $svc_acct->sec_phrase;
 %if ( $conf->exists('security_phrase') 
 %  && $part_svc->part_svc_column('sec_phrase')->columnflag ne 'F' ) {
-%
-
 
   <TR>
-    <TD ALIGN="right">Security phrase</TD>
+    <TD ALIGN="right"><% mt('Security phrase') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="sec_phrase" VALUE="<% $sec_phrase %>" SIZE=32>
-      (for forgotten passwords)
+      (<% mt('for forgotten passwords') |h %>)
     </TD>
   </TD>
 % } else { 
 
-
   <INPUT TYPE="hidden" NAME="sec_phrase" VALUE="<% $sec_phrase %>">
 % } 
 %
@@ -80,7 +84,6 @@
 %if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="domsvc" VALUE="<% $domsvc %>">
 % } else { 
 %
@@ -100,11 +103,9 @@
 %                                                 'pkgnum'  => $pkgnum,
 %                                                )
 %                );
-%
-
 
   <TR>
-    <TD ALIGN="right">Domain</TD>
+    <TD ALIGN="right"><% mt('Domain') |h %></TD>
     <TD>
       <SELECT NAME="domsvc" SIZE=1>
 % foreach my $svcnum (
@@ -114,7 +115,6 @@
 %             my $svc_domain = $svc_domain{$svcnum};
 %        
 
-
              <OPTION VALUE="<% $svcnum %>" <% $svcnum == $domsvc ? ' SELECTED' : '' %>><% $svc_domain{$svcnum} %>
 % } 
 
@@ -127,7 +127,7 @@
 % if ( $communigate ) {
 
     <TR>
-      <TD ALIGN="right">Aliases</TD>
+      <TD ALIGN="right"><% mt('Aliases') |h %></TD>
       <TD><INPUT TYPE="text" NAME="cgp_aliases" VALUE="<% $svc_acct->cgp_aliases %>"></TD>
     </TR>
 
@@ -136,25 +136,22 @@
 % }
 
 
-<% include('/elements/tr-select-svc_pbx.html',
+<& /elements/tr-select-svc_pbx.html,
              'curr_value' => $svc_acct->pbxsvc,
              'part_svc'   => $part_svc,
              'cust_pkg'   => $cust_pkg,
-          )
-%>
+&>
 
 %#pop
 %my $popnum = $svc_acct->popnum || 0;
 %if ( $part_svc->part_svc_column('popnum')->columnflag eq 'F' ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="popnum" VALUE="<% $popnum %>">
 % } else { 
 
-
   <TR>
-    <TD ALIGN="right">Access number</TD>
+    <TD ALIGN="right"><% mt('Access number') |h %></TD>
     <TD><% FS::svc_acct_pop::popselector($popnum) %></TD>
   </TR>
 % } 
@@ -167,7 +164,6 @@
 %  
 % if ( length($svc_acct->$xid()) ) { 
 
-  
       <TR>
         <TD ALIGN="right"><% uc($xid) %></TD>
           <TD BGCOLOR="#eeeeee"><% $svc_acct->$xid() %></TD>
@@ -176,11 +172,9 @@
       </TR>
 % } 
 
-  
     <INPUT TYPE="hidden" NAME="<% $xid %>" VALUE="<% $svc_acct->$xid() %>">
 % } else { 
 
-  
     <TR>
       <TD ALIGN="right"><% uc($xid) %></TD>
       <TD>
@@ -195,13 +189,12 @@
 %     && ! $svc_acct->finger ) { 
 %
 
-
   <INPUT TYPE="hidden" NAME="finger" VALUE="">
 % } else { 
 
 
   <TR>
-    <TD ALIGN="right">Real Name</TD>
+    <TD ALIGN="right"><% mt('Real Name') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="finger" VALUE="<% $svc_acct->finger %>">
     </TD>
@@ -219,7 +212,7 @@
 
 
   <TR>
-    <TD ALIGN="right">Home directory</TD>
+    <TD ALIGN="right"><% mt('Home directory') |h %></TD>
     <TD><INPUT TYPE="text" NAME="dir" VALUE="<% $svc_acct->dir %>"></TD>
   </TR>
 % } 
@@ -231,13 +224,12 @@
 %   ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="shell" VALUE="<% $shell %>">
 % } else { 
 
 
   <TR>
-    <TD ALIGN="right">Shell</TD>
+    <TD ALIGN="right"><% mt('Shell') |h %></TD>
     <TD>
       <SELECT NAME="shell" SIZE=1>
 %
@@ -245,7 +237,6 @@
 %           foreach $etc_shell (@shells) {
 %        
 
-
           <OPTION<% $etc_shell eq $shell ? ' SELECTED' : '' %>><% $etc_shell %>
 % } 
 
@@ -255,18 +246,17 @@
   </TR>
 % } 
 
-<% include('svc_acct/communigate.html',
+<& svc_acct/communigate.html,
              'svc_acct'    => $svc_acct,
              'part_svc'    => $part_svc,
              'communigate' => $communigate,
-          )
-%>
+&>
 
 % if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { 
   <INPUT TYPE="hidden" NAME="slipip" VALUE="<% $svc_acct->slipip %>">
 % } else { 
   <TR>
-    <TD ALIGN="right">IP</TD>
+    <TD ALIGN="right"><% mt('IP') |h %></TD>
     <TD><INPUT TYPE="text" NAME="slipip" VALUE="<% $svc_acct->slipip %>"></TD>
   </TR>
 % } 
@@ -280,12 +270,12 @@
 %   my $tf = $uf . "_threshold";
 %   if ( $curuser->access_right('Edit usage') ) { 
   <TR>
-    <TD ALIGN="right"><% $label{$uf} %> remaining</TD>
-    <TD><INPUT TYPE="text" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">(blank disables)</TD>
+    <TD ALIGN="right"><% mt("[_1] remaining",$label{$uf}) |h %> </TD>
+    <TD><INPUT TYPE="text" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">(<% mt('blank disables') |h %>)</TD>
   </TR>
   <TR>
-    <TD ALIGN="right"><% $label{$uf} %> threshold</TD>
-    <TD><INPUT TYPE="text" NAME="<% $tf %>" VALUE="<% $svc_acct->$tf %>">(blank disables)</TD>
+    <TD ALIGN="right"><% mt("[_1] threshold",$label{$uf}) |h %> </TD>
+    <TD><INPUT TYPE="text" NAME="<% $tf %>" VALUE="<% $svc_acct->$tf %>">(<% mt('blank disables') |h %>)</TD>
   </TR>
 %   }else{
       <INPUT TYPE="hidden" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">
@@ -299,11 +289,9 @@
 %
 % if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) { 
 
-
     <INPUT TYPE="hidden" NAME="<% $r %>" VALUE="<% $svc_acct->getfield($r) %>">
 % } else { 
 
-
     <TR>
       <TD ALIGN="right"><% $FS::raddb::attrib{$a} %></TD>
       <TD><INPUT TYPE="text" NAME="<% $r %>" VALUE="<% $svc_acct->getfield($r) %>"></TD>
@@ -312,37 +300,31 @@
 % } 
 
 
-
 <TR>
-  <TD ALIGN="right">RADIUS groups</TD>
+  <TD ALIGN="right"><% mt('RADIUS groups') |h %></TD>
 % if ( $part_svc->part_svc_column('usergroup')->columnflag eq 'F' ) { 
 
-
     <TD BGCOLOR="#eeeeee"><% join('<BR>', @groups) %></TD>
 % } else { 
 
-
     <TD><% FS::svc_acct::radius_usergroup_selector( \@groups ) %></TD>
 % } 
 
-
 </TR>
 % foreach my $field ($svc_acct->virtual_fields) { 
 % # If the flag is X, it won't even show up in $svc_acct->virtual_fields. 
 % if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) { 
 
-
     <% $svc_acct->pvf($field)->widget('HTML', 'edit', $svc_acct->getfield($field)) %>
 % } 
 % } 
 
-  
 </TABLE>
 <BR>
 
 % if ( $captcha_url ) {
 <IMG SRC="<% $captcha_url %>"><BR>
-Enter the word shown above: <INPUT TYPE="text" NAME="captcha_response"><BR>
+<% mt('Enter the word shown above:') |h %> <INPUT TYPE="text" NAME="captcha_response"><BR>
 <BR>
 % }
 
@@ -350,7 +332,7 @@
 
 </FORM>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 
 <%init>
 



More information about the freeside-commits mailing list