internationalization/localization, RT12515
authorlevinse <levinse>
Mon, 16 May 2011 16:31:08 +0000 (16:31 +0000)
committerlevinse <levinse>
Mon, 16 May 2011 16:31:08 +0000 (16:31 +0000)
httemplate/view/cust_main/contacts.html
httemplate/view/cust_main/locations.html
httemplate/view/cust_main/notes.html
httemplate/view/cust_main/payment_history.html
httemplate/view/cust_main/tickets.html
httemplate/view/cust_pay.html
httemplate/view/cust_refund.html
httemplate/view/svc_acct.cgi
httemplate/view/svc_phone.cgi

index a86c35c..0b754d0 100644 (file)
@@ -1,14 +1,14 @@
 % my %which = (
-%   ''      => 'Billing',
-%   'ship_' => 'Service',
+%   ''      => mt('Billing'),
+%   'ship_' => mt('Service'),
 % );
 % foreach my $which ( '', 'ship_' ) {
 %   my $pre = $cust_main->get("${which}last") ? $which : '';
 
-<% $which{$which} %> address
+<% $which{$which} %> <% mt('address') |h %>
 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
 <TR>
-  <TD ALIGN="right">Contact name</TD>
+  <TD ALIGN="right"><% mt('Contact name') |h %></TD>
   <TD COLSPAN=5 BGCOLOR="#ffffff">
     <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %>
   </TD>
 % } 
 </TR>
 <TR>
-  <TD ALIGN="right">Company</TD>
+  <TD ALIGN="right"><% mt('Company') |h %></TD>
   <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
 </TR>
 <TR>
-  <TD ALIGN="right">Address</TD>
+  <TD ALIGN="right"><% mt('Address') |h %></TD>
   <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
 </TR>
 
@@ -31,8 +31,8 @@
 %     ( $conf->exists('cust_main-require_address2')
 %       && ! ( $pre xor $cust_main->has_ship_address )
 %     )
-%       ? 'Unit&nbsp;#'
-%       : '&nbsp;';
+%       ? mt('Unit #')
+%       : ' ';
 
   <TR>
     <TD ALIGN="right"><% $address2_label %></TD>
 % } 
 
 <TR>
-  <TD ALIGN="right">City</TD>
+  <TD ALIGN="right"><% mt('City') |h %></TD>
   <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
 % if ( $cust_main->get("${pre}county") ) {
-    <TD ALIGN="right">County</TD>
+    <TD ALIGN="right"><% mt('County') |h %></TD>
     <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
 % }
-  <TD ALIGN="right">State</TD>
+  <TD ALIGN="right"><% mt('State') |h %></TD>
   <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
-  <TD ALIGN="right">Zip</TD>
+  <TD ALIGN="right"><% mt('Zip') |h %></TD>
   <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
 </TR>
 <TR>
-  <TD ALIGN="right">Country</TD>
+  <TD ALIGN="right"><% mt('Country') |h %></TD>
   <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
 </TR>
 <TR>
   <TD ALIGN="right"><% $daytime_label %></TD>
   <TD COLSPAN=3 BGCOLOR="#ffffff">
-    <% include('/elements/phonenumber.html',
+    <& /elements/phonenumber.html,
                   $cust_main->get("${pre}daytime"),
                   'callable'=>1
-               )
-    %>
+    &>
   </TD>
 </TR>
 <TR>
   <TD ALIGN="right"><% $night_label %></TD>
   <TD COLSPAN=3 BGCOLOR="#ffffff">
-    <% include('/elements/phonenumber.html',
+    <& /elements/phonenumber.html,
                   $cust_main->get("${pre}night"),
                   'callable'=>1
-               )
-    %>
+    &>
   </TD>
 </TR>
 <TR>
-  <TD ALIGN="right">Fax</TD>
+  <TD ALIGN="right"><% mt('Fax') |h %></TD>
   <TD COLSPAN=3 BGCOLOR="#ffffff">
     <% $cust_main->get("${pre}fax") || '&nbsp' %>
   </TD>
@@ -96,7 +94,7 @@
 <BR>
 % }
 % } 
-<% include('contacts_new.html', $cust_main) %>
+<& contacts_new.html, $cust_main &>
 <%once>
 
 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
index ea6216e..c95850b 100755 (executable)
@@ -10,7 +10,7 @@ span.loclabel {
 %   my $packages = $packages_in{$locationnum};
 %   my $loc = $locations{$locationnum};
 %   next if $loc->disabled and scalar(@$packages) == 0;
-<% include('/elements/table-grid.html') %>
+<& /elements/table-grid.html &>
 <TR><TH COLSPAN=3 ALIGN="left" VALIGN="bottom" 
 STYLE="padding-bottom: 0px; 
   padding-left: 0px; 
@@ -34,7 +34,7 @@ Default service location:
 % }
 </SPAN></TH></TR>
 %   if (@$packages) {
-<% include('packages/section.html', 'packages' => $packages ) %>
+<& packages/section.html, 'packages' => $packages &>
 %   }
 </TABLE><BR>
 % } #foreach $locationnum
@@ -69,8 +69,8 @@ sub edit_location_link {
   my $locationnum = shift;
   include( '/elements/popup_link.html',
     'action'      => $p. "edit/cust_location.cgi?locationnum=$locationnum",
-    'label'       => '(Edit location)',
-    'actionlabel' => 'Edit',
+    'label'       => '('.mt('Edit location').')',
+    'actionlabel' => mt('Edit'),
   );
 }
 
@@ -78,10 +78,9 @@ sub disable_location_link {
   my $locationnum = shift;
   include( '/elements/popup_link.html',
     'action'      => $p. "misc/disable-cust_location.cgi?locationnum=$locationnum",
-    'label'       => '(Disable location)',
-    'actionlabel' => 'Disable',
+    'label'       => '('.mt('Disable location').')',
+    'actionlabel' => mt('Disable'),
   );
 }
 
-
 </%init>
index 71c4fb4..3a4b05a 100755 (executable)
@@ -30,7 +30,7 @@
 
 </SCRIPT>
 
-  <% include('/elements/init_overlib.html') %>
+  <& /elements/init_overlib.html &>
 
 % my $bgcolor1 = '#eeeeee';
 % my $bgcolor2 = '#ffffff';
@@ -81,7 +81,7 @@
        <DIV    id="notes_<% $tmp_classnum %>"
                style="display:<% $display %>"
        >
-       <% include("/elements/table-grid.html") %>
+       <& /elements/table-grid.html &>
        <TR>
            <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
 %   if ( $conf->exists('cust_main_note-display_times') ) {
index 046899e..732e417 100644 (file)
@@ -3,33 +3,29 @@
 % my $s = 0;
 % if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { 
   <% $s++ ? ' | ' : '' %>
-  <% include('/elements/popup_link-cust_main.html',
-               'label'       => 'Enter check payment',
+  <& /elements/popup_link-cust_main.html,
+               'label'       => mt('Enter check payment'),
                'action'      => "${p}edit/cust_pay.cgi?popup=1;payby=BILL",
                'cust_main'   => $cust_main,
-               'actionlabel' => 'Enter check payment',
+               'actionlabel' => mt('Enter check payment'),
                'width'       => 392,
-               #default# 'height' => 336,
-            )
-  %>
+  &>
 % } 
 
 % if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { 
   <% $s++ ? ' | ' : '' %>
-  <% include('/elements/popup_link-cust_main.html',
-               'label'       => 'Enter cash payment',
+  <& /elements/popup_link-cust_main.html,
+               'label'       => mt('Enter cash payment'),
                'action'      => "${p}edit/cust_pay.cgi?popup=1;payby=CASH",
                'cust_main'   => $cust_main,
-               'actionlabel' => 'Enter cash payment',
+               'actionlabel' => mt('Enter cash payment'),
                'width'       => 392,
-               #default# 'height' => 336,
-            )
-  %>
+  &>
 % } 
 
 % if ( $payby{'WEST'} && $curuser->access_right('Post payment') ) { 
   <% $s++ ? ' | ' : '' %>
-  <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;custnum=<% $custnum %>">Enter Western Union payment</A>
+  <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;custnum=<% $custnum %>"><% mt('Enter Western Union payment') |h %></A>
 % } 
 
 % if ( ( $payby{'CARD'} || $payby{'DCRD'} )
@@ -37,7 +33,7 @@
 %        && ! $cust_main->is_encrypted($cust_main->payinfo)
 %      ) {
   <% $s++ ? ' | ' : '' %>
-  <A HREF="<% $p %>misc/payment.cgi?payby=CARD;custnum=<% $custnum %>">Process credit card payment</A>
+  <A HREF="<% $p %>misc/payment.cgi?payby=CARD;custnum=<% $custnum %>"><% mt('Process credit card payment') |h %></A>
 % } 
 
 % if ( ( $payby{'CHEK'} || $payby{'DCHK'} )
 %        && ! $cust_main->is_encrypted($cust_main->payinfo)
 %      ) {
   <% $s++ ? ' | ' : '' %>
-  <A HREF="<% $p %>misc/payment.cgi?payby=CHEK;custnum=<% $custnum %>">Process electronic check (ACH) payment</A>
+  <A HREF="<% $p %>misc/payment.cgi?payby=CHEK;custnum=<% $custnum %>"><% mt('Process electronic check (ACH) payment') |h %></A>
 % } 
 
 % if ( $payby{'MCRD'} && $curuser->access_right('Post payment') ) { 
   <% $s++ ? ' | ' : '' %>
-  <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<% $custnum %>">Post manual (offline/POS) credit card payment</A>
+  <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline/POS) credit card payment') |h %></A>
 % } 
 
 <BR>
 %# credit link
 
 % if ( $curuser->access_right('Post credit') ) { 
-  <% include('/elements/popup_link-cust_main.html',
-               'label'       => 'Enter credit',
+  <& /elements/popup_link-cust_main.html,
+               'label'       => mt('Enter credit'),
                'action'      => "${p}edit/cust_credit.cgi",
                'cust_main'   => $cust_main,
-               'actionlabel' => 'Enter credit',
+               'actionlabel' => mt('Enter credit'),
                'width'       => 616, #make room for reasons #540 default
-               #default# 'height' => 336,
-            )
-  %>
+  &>
   <BR>
 % } 
 
 % $s = 0;
 % if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { 
   <% $s++ ? ' | ' : '' %>
-  <% include('/elements/popup_link-cust_main.html',
-               'label'       => 'Enter check refund',
+  <& /elements/popup_link-cust_main.html,
+               'label'       => mt('Enter check refund'),
                'action'      => "${p}edit/cust_refund.cgi?popup=1;payby=BILL",
                'cust_main'   => $cust_main,
-               'actionlabel' => 'Enter check refund',
+               'actionlabel' => mt('Enter check refund'),
                'width'       => 392,
-               #default# 'height' => 336,
-            )
-  %>
+  &>
 % } 
 
 % if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { 
   <% $s++ ? ' | ' : '' %>
-  <% include('/elements/popup_link-cust_main.html',
-               'label'       => 'Enter cash refund',
+  <& /elements/popup_link-cust_main.html,
+               'label'       => mt('Enter cash refund'),
                'action'      => "${p}edit/cust_refund.cgi?popup=1;payby=CASH",
                'cust_main'   => $cust_main,
-               'actionlabel' => 'Enter cash refund',
+               'actionlabel' => mt('Enter cash refund'),
                'width'       => 392,
-               #default# 'height' => 336,
-            )
-  %>
+  &>
 % } 
 
 %# someday, perhaps.  very few gateways let you do unlinked refunds at all.
 
 % if ( $payby{'MCRD'} && $curuser->access_right('Post refund') ) { 
   <% $s++ ? ' | ' : '' %>
-  <A HREF="<% $p %>edit/cust_refund.cgi?payby=MCRD;custnum=<% $custnum %>">Post manual (offline/POS) credit card refund</A>
+  <A HREF="<% $p %>edit/cust_refund.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline/POS) credit card refund') |h %></A>
 % } 
 
 <BR>
 % if ( $view_exemptions || $add_adjustment ) {
 
 %   if ( $view_exemptions ) {
-      <A HREF="<% $p %>search/cust_tax_exempt_pkg.cgi?custnum=<% $custnum %>">View tax exemptions</A>
+      <A HREF="<% $p %>search/cust_tax_exempt_pkg.cgi?custnum=<% $custnum %>"><% mt('View tax exemptions') |h %></A>
       <% $add_adjustment ? '|' : '' %>
 %   } 
 
 %   if ( $add_adjustment ) {
-      <% include('/elements/popup_link.html', {
+      <& /elements/popup_link.html, {
            'action' => $p.'edit/cust_tax_adjustment.html?custnum='. $cust_main->custnum,
-           'label'  => 'Add tax adjustment',
-           'actionlabel' => 'Add tax adjustment',
-           #'color'  => '#333399',
-           #'width' => 763,
+           'label'  => mt('Add tax adjustment'),
+           'actionlabel' => mt('Add tax adjustment'),
            'height' => 200,
-         })
-      %>
+         }
+      &>
       |
-      <A HREF="<% $p %>search/cust_tax_adjustment.html?custnum=<% $custnum %>">View tax adjustments</A>
+      <A HREF="<% $p %>search/cust_tax_adjustment.html?custnum=<% $custnum %>"><% mt('View tax adjustments') |h %></A>
 %   } 
 
   <BR>
 %      && $curuser->access_right('View customer batched payments')
 %    )
 % { 
-    View batched payments:
+    <% mt('View batched payments:') |h %> 
 %   foreach my $status (qw( Queued In-transit Complete All )) {
-      <A HREF="<% $p %>search/cust_pay_batch.cgi?status=<% $status{$status} %>;custnum=<% $custnum %>"><% $status %></A> 
+      <A HREF="<% $p %>search/cust_pay_batch.cgi?status=<% $status{$status} %>;custnum=<% $custnum %>"><% mt($status) |h %></A> 
       <% $status ne 'All' ? '|' : '' %>
 %   }
     <BR>
 %      && scalar($cust_main->cust_pay_pending)
 %    )
 % {
-    <A HREF="<% $p %>search/cust_pay_pending.html?magic=_date;statusNOT=done;custnum=<% $custnum %>">View pending payments</A><BR>
+    <A HREF="<% $p %>search/cust_pay_pending.html?magic=_date;statusNOT=done;custnum=<% $custnum %>"><% mt('View pending payments') |h %></A><BR>
 % }
 
 %# and now the table
 
-<% include("/elements/table-grid.html") %>
+<& /elements/table-grid.html &>
 % my $bgcolor1 = '#eeeeee';
 %   my $bgcolor2 = '#ffffff';
 %   my $bgcolor = '';
 
 <TR>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Date</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Description</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Invoice</FONT></TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment</FONT></TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>In-house<BR>Credit</FONT></TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Refund</FONT></TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Balance</FONT></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Description') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1><% mt('Invoice') |h %></FONT></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1><% mt('Payment') |h %></FONT></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>In-house Credit</FONT></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1><% mt('Refund') |h %></FONT></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1><% mt('Balance') |h %></FONT></TH>
 </TR>
 
 %#display payment history
      </TD>
 
      <TD CLASS="grid" BGCOLOR="#dddddd">
-       <I>Starting balance on <% time2str($date_format, $date) %></I>
-       (<A HREF="javascript:void(0);" onClick="show_history();">show prior history</A>)
+       <I><% mt("Starting balance on [_1]", time2str($date_format, $date) ) |h %></I>
+       (<A HREF="javascript:void(0);" onClick="show_history();"><% mt('show prior history') |h %></A>)
      </TD>
 
      <TD CLASS="grid" BGCOLOR="#dddddd"></TD>
index 064f511..2175110 100644 (file)
@@ -9,8 +9,8 @@ function updateTicketLink() {
     keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
 }
 </SCRIPT>
-<A id="CreateTicketLink" HREF="<% $new_link %>">Create new ticket</A>
- in queue
+<A id="CreateTicketLink" HREF="<% $new_link %>"><% mt('Create new ticket') |h %></A>
+ <% mt('in queue') |h %> 
 %# fetch list of queues in which the user can create tickets
 % my $session = FS::TicketSystem->session();
 % my %queues = FS::TicketSystem->queues($session, 'CreateTicket');
@@ -31,22 +31,22 @@ function updateTicketLink() {
 </FORM>
 <BR>
 
-(<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>)
-(<A HREF="<% $res_link  %>">View resolved tickets for this customer</A>)
+(<A HREF="<% $open_link %>"><% mt("View $openlabel tickets for this customer") |h %></A>)
+(<A HREF="<% $res_link  %>"><% mt('View resolved tickets for this customer') |h %></A>)
 <BR><BR>
 
-<% include("/elements/table-grid.html") %>
+<& /elements/table-grid.html &>
 % my $bgcolor1 = '#eeeeee';
 %   my $bgcolor2 = '#ffffff';
 %   my $bgcolor = '';
 
 <TR>
-  <TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Subject</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Status</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Owner</TH>
-  <TH CLASS="grid" BGCOLOR="#cccccc">Priority</TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('#') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Subject') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Queue') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Owner') |h %></TH>
+  <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Priority') |h %></TH>
 </TR>
 
 % foreach my $ticket ( @tickets ) {
index cdce2ca..0fb514a 100644 (file)
@@ -47,7 +47,7 @@
 <% ntable("#cccccc", 2) %>
 
 <TR>
-  <TD ALIGN="right"><% mt('Payment') |h %>#</TD>
+  <TD ALIGN="right"><% mt('Payment #') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->paynum %></B></TD>
 </TR>
 
     </TR>
 
     <TR>
-      <TD ALIGN="right"><% mt('Authorization') |h %>#</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"><% mt('Order') |h %>#</TD>
+        <TD ALIGN="right"><% mt('Order #') |h %></TD>
         <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->order_number %></B></TD>
       </TR>
 %   }
index 9cda1a6..7f6a34f 100644 (file)
@@ -38,7 +38,7 @@
 <% ntable("#cccccc", 2) %>
 
 <TR>
-  <TD ALIGN="right"><% mt('Refund') |h %>#</TD>
+  <TD ALIGN="right"><% mt('Refund #') |h %></TD>
   <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->refundnum %></B></TD>
 </TR>
 
     </TR>
 
     <TR>
-      <TD ALIGN="right"><% mt('Authorization') |h %>#</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"><% mt('Order') |h %>#</TD>
+        <TD ALIGN="right"><% mt('Order #') |h %></TD>
         <TD BGCOLOR="#FFFFFF"><B><% $cust_refund->order_number %></B></TD>
       </TR>
 %   }
index e966715..47dc369 100755 (executable)
@@ -36,7 +36,7 @@
               %gopt,
 &>
 
-<% mt('Service') |h %> #<B><% $svcnum %></B>
+<% mt('Service #') |h %><B><% $svcnum %></B>
 |
 <& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &>
 <& svc_acct/change_svc.html,
index 18c8900..4bdbbf2 100644 (file)
@@ -39,7 +39,7 @@ my $html_foot = sub {
   ###
 
   my $e911 = 
-    'E911 Information'.
+    mt('E911 Information').
     &ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
       '<TR><TD>'.mt('Location').'</TD>'.
       '<TD BGCOLOR="#FFFFFF">'.