diff options
author | levinse <levinse> | 2011-05-16 21:35:44 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-05-16 21:35:44 +0000 |
commit | e141dcae4712d6fc9d5207ad42f864605788309f (patch) | |
tree | 1c57a92410630fae405bf651038933e19e594ffd | |
parent | d21d7864c1f1bc4fed05a01c0b037628a4ca5b99 (diff) |
internationalization/localization, RT12515
-rw-r--r-- | httemplate/view/cust_main/billing.html | 110 | ||||
-rw-r--r-- | httemplate/view/cust_main/misc.html | 26 | ||||
-rw-r--r-- | httemplate/view/cust_main/order_pkg_link.html | 11 | ||||
-rwxr-xr-x | httemplate/view/cust_main/packages.html | 42 |
4 files changed, 94 insertions, 95 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index c770833ec..95ae985b9 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,16 +1,16 @@ -Billing information +<% mt('Billing information') |h %> %# If we can't see the unencrypted card, then bill now is an exercise in %# frustration (without some sort of job queue magic to send it to a secure %# machine, anyway) %if ( $FS::CurrentUser::CurrentUser->access_right('Bill customer now') % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { -%# (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>) - (<% include('/elements/bill.html', +%# (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>"><% mt('Bill now') |h %></A>) + (<& /elements/bill.html, custnum => $cust_main->custnum, - label => 'Bill now', + label => mt('Bill now'), url => $p.'view/cust_main.cgi?'.$cust_main->custnum, - ) %>) + &>) % } <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %> @@ -19,30 +19,30 @@ Billing information % =~ s/^(\-?)(.*)$/<FONT SIZE=+1>$1<\/FONT>$money_char$2/; <TR> - <TD ALIGN="right">Balance due</TD> + <TD ALIGN="right"><% mt('Balance due') |h %></TD> <TD BGCOLOR="#ffffff"><B><% $balance %></B></TD> </TR> % if ( $conf->exists('cust_main-select-billday') % && ($cust_main->payby eq 'CARD' || $cust_main->payby eq 'CHEK') ) { <TR> - <TD ALIGN="right">Billing day of month</TD> + <TD ALIGN="right"><% mt('Billing day of month') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->billday %> </TD> </TR> % } <TR> - <TD ALIGN="right">Billing type</TD> + <TD ALIGN="right"><% mt('Billing type') |h %></TD> <TD BGCOLOR="#ffffff"> % if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) { - - Credit card <% $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' %> +% my $autodemand = $cust_main->payby eq 'CARD' ? 'automatic' : 'on-demand'; + <% mt("Credit card ([_1])",$autodemand) |h %> </TD> </TR> <TR> - <TD ALIGN="right">Card number</TD> + <TD ALIGN="right"><% mt('Card number') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->paymask %></TD> </TR> % @@ -60,49 +60,50 @@ Billing information % <TR> - <TD ALIGN="right">Expiration</TD> + <TD ALIGN="right"><% mt('Expiration') |h %></TD> <TD BGCOLOR="#ffffff"><% "$mon/$year" %></TD> </TR> % if ( $cust_main->paystart_month ) { <TR> - <TD ALIGN="right">Start date</TD> + <TD ALIGN="right"><% mt('Start date') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->paystart_month. '/'. $cust_main->paystart_year %> </TR> % } elsif ( $cust_main->payissue ) { <TR> - <TD ALIGN="right">Issue #</TD> + <TD ALIGN="right"><% mt('Issue #') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payissue %> </TR> % } <TR> - <TD ALIGN="right">Name on card</TD> + <TD ALIGN="right"><% mt('Name on card') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD> </TR> % } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') { % my( $account, $aba ) = split('@', $cust_main->paymask ); - Electronic check <% $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %> +% my $autodemand = $cust_main->payby eq 'CHEK' ? 'automatic' : 'on-demand'; + <% mt("Electronic check ([_1])",$autodemand) |h %> </TD> </TR> <TR> - <TD ALIGN="right">ABA/Routing code</TD> + <TD ALIGN="right"><% mt('ABA/Routing code') |h %></TD> <TD BGCOLOR="#ffffff"><% $aba %></TD> </TR> <TR> - <TD ALIGN="right">Account number</TD> + <TD ALIGN="right"><% mt('Account number') |h %></TD> <TD BGCOLOR="#ffffff"><% $account %></TD> </TR> <TR> - <TD ALIGN="right">Account type</TD> + <TD ALIGN="right"<% mt('>Account type') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->paytype %></TD> </TR> <TR> - <TD ALIGN="right">Bank name</TD> + <TD ALIGN="right"<% mt('>Bank name') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD> </TR> % if ( $conf->exists('show_bankstate') ) { @@ -114,43 +115,39 @@ Billing information % } elsif ( $cust_main->payby eq 'LECB' ) { % $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/; % my $payinfo = "$1-$2-$3"; -% - - Phone bill billing + <% mt('Phone bill billing') |h %> </TD> </TR> <TR> - <TD ALIGN="right">Phone number</TD> + <TD ALIGN="right"><% mt('Phone number') |h %></TD> <TD BGCOLOR="#ffffff"><% $payinfo %></TD> </TR> % } elsif ( $cust_main->payby eq 'BILL' ) { - - Billing + <% mt('Billing') |h %> </TD> </TR> % if ( $cust_main->payinfo ) { <TR> - <TD ALIGN="right">P.O. </TD> + <TD ALIGN="right"<% mt('>P.O.') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payinfo %></TD> </TR> % } <TR> - <TD ALIGN="right">Attention</TD> + <TD ALIGN="right"><% mt('Attention') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payname |h %></TD> </TR> % } elsif ( $cust_main->payby eq 'COMP' ) { - - Complimentary + <% mt('Complimentary') |h %> </TD> </TR> <TR> - <TD ALIGN="right">Authorized by</TD> + <TD ALIGN="right"><% mt('Authorized by') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->payinfo %></TD> </TR> % @@ -168,55 +165,58 @@ Billing information % <TR> - <TD ALIGN="right">Expiration</TD> + <TD ALIGN="right"><% mt('Expiration') |h %></TD> <TD BGCOLOR="#ffffff"><% "$mon/$year" %></TD> </TR> % } +% my $yes = mt('yes'); +% my $no = mt('no'); + % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); <TR> - <TD ALIGN="right">Tax exempt<% @exempt_groups ? ' (all taxes)' : '' %></TD> - <TD BGCOLOR="#ffffff"><% $cust_main->tax ? 'yes' : 'no' %></TD> + <TD ALIGN="right"><% mt('Tax exempt') |h %><% @exempt_groups ? ' ('.mt('all taxes').')' : '' %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->tax ? $yes : $no %></TD> </TR> % foreach my $exempt_group ( @exempt_groups ) { <TR> - <TD ALIGN="right">Tax exempt (<% $exempt_group %> taxes)</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->tax_exemption($exempt_group) ? 'yes' : 'no' %></TD> + <TD ALIGN="right"><% mt('Tax exempt') |h %> (<% $exempt_group %> taxes)</TD> + <TD BGCOLOR="#ffffff"><% $cust_main->tax_exemption($exempt_group) ? $yes : $no %></TD> </TR> % } % if ( $conf->exists('enable_taxproducts') ) { <TR> - <TD ALIGN="right">Tax location</TD> + <TD ALIGN="right"><% mt('Tax location') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->geocode('cch') %></TD> </TR> % } <TR> - <TD ALIGN="right">Postal invoices</TD> + <TD ALIGN="right"><% mt('Postal invoices') |h %></TD> <TD BGCOLOR="#ffffff"> - <% ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no' %> + <% ( grep { $_ eq 'POST' } @invoicing_list ) ? $yes : $no %> </TD> </TR> <TR> - <TD ALIGN="right">FAX invoices</TD> + <TD ALIGN="right"><% mt('FAX invoices') |h %></TD> <TD BGCOLOR="#ffffff"> - <% ( grep { $_ eq 'FAX' } @invoicing_list ) ? 'yes' : 'no' %> + <% ( grep { $_ eq 'FAX' } @invoicing_list ) ? $yes : $no %> </TD> </TR> <TR> - <TD ALIGN="right">Email invoices</TD> + <TD ALIGN="right"><% mt('Email invoices') |h %></TD> <TD BGCOLOR="#ffffff"> - <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %> + <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> </TD> </TR> <TR> - <TD ALIGN="right">Invoice terms</TD> + <TD ALIGN="right"><% mt('Invoice terms') |h %></TD> <TD BGCOLOR="#ffffff"> - <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %> + <% $cust_main->invoice_terms || mt('Default').' ('. ( $conf->config('invoice_default_terms') || mt('Payable upon receipt') ). ')' %> </TD> </TR> <TR> - <TD ALIGN="right">Credit limit</TD> + <TD ALIGN="right"><% mt('Credit limit') |h %></TD> <TD BGCOLOR="#ffffff"> <% length($cust_main->credit_limit) ? $money_char.sprintf("%.2f", $cust_main->credit_limit) : @@ -226,35 +226,35 @@ Billing information % if ( $conf->exists('voip-cust_cdr_spools') ) { <TR> - <TD ALIGN="right">Spool CDRs</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->spool_cdr ? 'yes' : 'no' %></TD> + <TD ALIGN="right"><% mt('Spool CDRs') |h %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->spool_cdr ? $yes : $no %></TD> </TR> % } % if ( $conf->exists('voip-cust_cdr_squelch') ) { <TR> - <TD ALIGN="right">Print CDRs</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->squelch_cdr ? 'no' : 'yes' %></TD> + <TD ALIGN="right"><% mt('Print CDRs') |h %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->squelch_cdr ? $no : $yes %></TD> </TR> % } % if ( $conf->exists('voip-cust_accountcode_cdr') ) { <TR> - <TD ALIGN="right">Breakdown CDRs by accountcode</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->accountcode_cdr ? 'yes' : 'no' %></TD> + <TD ALIGN="right"><% mt('Breakdown CDRs by accountcode') |h %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->accountcode_cdr ? $yes : $no %></TD> </TR> % } % if ( $conf->exists('voip-cust_email_csv_cdr') ) { <TR> - <TD ALIGN="right">Email CDRs as CSV</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->email_csv_cdr ? 'yes' : 'no' %></TD> + <TD ALIGN="right"><% mt('Email CDRs as CSV') |h %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->email_csv_cdr ? $yes : $no %></TD> </TR> % } % if ( $show_term || $cust_main->cdr_termination_percentage ) { <TR> - <TD ALIGN="right">CDR termination settlement</TD> + <TD ALIGN="right"><% mt('CDR termination settlement') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->cdr_termination_percentage %><% $cust_main->cdr_termination_percentage =~ /\d/ ? '%' : '' %></TD> </TR> % } diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 6e90a0b4c..8c23a3f68 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -1,19 +1,19 @@ <% ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %> <TR> - <TD ALIGN="right">Customer number</TD> + <TD ALIGN="right"><% mt('Customer number') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->display_custnum %></TD> </TR> <TR> - <TD ALIGN="right">Status</TD> + <TD ALIGN="right"><% mt('Status') |h %></TD> <TD BGCOLOR="#ffffff"><FONT COLOR="#<% $cust_main->statuscolor %>"><B><% ucfirst($cust_main->status) %></B></FONT></TD> </TR> % my @part_tag = $cust_main->part_tag; % if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) { <TR> - <TD ALIGN="right">Tags</TD> + <TD ALIGN="right"><% mt('Tags') |h %></TD> <TD BGCOLOR="#ffffff"> % foreach my $part_tag ( @part_tag ) { <FONT <% length($part_tag->tagcolor) @@ -30,7 +30,7 @@ % && !$curuser->access_right('View customers of all agents') ) { % my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } ); <TR> - <TD ALIGN="right">Agent</TD> + <TD ALIGN="right"><% mt('Agent') |h %></TD> <TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD> </TR> % } @@ -39,7 +39,7 @@ % && ! $conf->exists('cust_main-default_agent_custid') ) { <TR> - <TD ALIGN="right">Agent customer ref#</TD> + <TD ALIGN="right"><% mt('Agent customer ref#') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->agent_custid %></TD> </TR> % @@ -47,8 +47,8 @@ % #if ( $cust_main->classnum ) { <TR> - <TD ALIGN="right">Class</TD> - <TD BGCOLOR="#ffffff"><% $cust_main->classname || '(none)' %></TD> + <TD ALIGN="right"><% mt('Class') |h %></TD> + <TD BGCOLOR="#ffffff"><% $cust_main->classname || '('.mt('none').')' %></TD> </TR> % #} @@ -58,14 +58,14 @@ % } ); <TR> - <TD ALIGN="right">Advertising source</TD> + <TD ALIGN="right"><% mt('Advertising source') |h %></TD> <TD BGCOLOR="#ffffff"><% $referral->refnum %>: <% $referral->referral%></TD> </TR> % } <TR> - <TD ALIGN="right">Referring Customer</TD> + <TD ALIGN="right"><% mt('Referring Customer') |h %></TD> <TD BGCOLOR="#ffffff"> % % my $referring_cust_main = ''; @@ -93,12 +93,12 @@ </TR> <TR> - <TD ALIGN="right">Order taker</TD> + <TD ALIGN="right"><% mt('Order taker') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->otaker %></TD> </TR> <TR> - <TD ALIGN="right">Signup Date</TD> + <TD ALIGN="right"><% mt('Signup Date') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %></TD> </TR> @@ -110,7 +110,7 @@ % : ''; <TR> - <TD ALIGN="right">Date of Birth</TD> + <TD ALIGN="right"><% mt('Date of Birth') |h %></TD> <TD BGCOLOR="#ffffff"><% $dt ? $dt->strftime($date_format) : '' %></TD> </TR> @@ -119,7 +119,7 @@ % if ( $conf->exists('cust_main-require_censustract') ) { <TR> - <TD ALIGN="right">Census tract</TD> + <TD ALIGN="right"><% mt('Census tract') |h %></TD> <TD BGCOLOR="#ffffff"><% $cust_main->censustract %></TD> </TR> diff --git a/httemplate/view/cust_main/order_pkg_link.html b/httemplate/view/cust_main/order_pkg_link.html index ba731ae11..e6abbd13c 100644 --- a/httemplate/view/cust_main/order_pkg_link.html +++ b/httemplate/view/cust_main/order_pkg_link.html @@ -1,15 +1,14 @@ -<% include( '/elements/popup_link-cust_main.html', +<& /elements/popup_link-cust_main.html, 'action' => $p. 'misc/order_pkg.html', - 'label' => $opt{'label'} || 'Order new package', - 'actionlabel' => 'Order new package', + 'label' => $opt{'label'} || mt('Order new package'), + 'actionlabel' => mt('Order new package'), 'color' => '#333399', 'cust_main' => $cust_main, - 'closetext' => 'Close', + 'closetext' => mt('Close'), 'width' => 763, 'height' => $height, %optional, - ) -%> +&> <%init> my($cust_main, %opt) = @_; diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 383c2a75e..740d1544a 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -2,24 +2,24 @@ % if ( $curuser->access_right('Qualify service') ) { <% $s++ ? ' | ' : '' %> - <% include('qual_link.html', $cust_main) %> + <& qual_link.html, $cust_main &> % } % if ( $curuser->access_right('Order customer package') ) { <% $s++ ? ' | ' : '' %> - <% include('order_pkg_link.html', $cust_main) %> + <& order_pkg_link.html, $cust_main &> % } % if ( $curuser->access_right('One-time charge') % && $conf->config('payby-default') ne 'HIDE' % ) { <% $s++ ? ' | ' : '' %> - <% include('one_time_charge_link.html', $cust_main) %> + <& one_time_charge_link.html, $cust_main &> % } % if ( $curuser->access_right('Bulk change customer packages') ) { <% $s++ ? ' | ' : '' %> - <A HREF="<% $p %>edit/cust_pkg.cgi?<% $cust_main->custnum %>">Bulk order and cancel packages</A> (preserves services) + <A HREF="<% $p %>edit/cust_pkg.cgi?<% $cust_main->custnum %>"><% mt('Bulk order and cancel packages') |h %></A> (<% mt('preserves services') |h %>) % } <BR><BR> @@ -30,7 +30,7 @@ % if ( @$packages ) { -Current packages +<% mt('Current packages') |h %> % } % if ( $cust_main->num_cancelled_pkgs ) { % if ( $cgi->param('showcancelledpackages') eq '0' #see if it was set by me @@ -41,53 +41,53 @@ Current packages % { % my $prev = $cgi->param('showcancelledpackages'); % $cgi->param('showcancelledpackages', 1); - ( <a href="<% $cgi->self_url %>">show + ( <a href="<% $cgi->self_url %>"><% mt('show') |h %> % $cgi->param('showcancelledpackages', $prev); % } else { % $cgi->param('showcancelledpackages', 0); - ( <a href="<% $cgi->self_url %>">hide + ( <a href="<% $cgi->self_url %>"><% mt('hide') |h %> % $cgi->param('showcancelledpackages', 1); % } - cancelled packages</a> ) + <% mt('cancelled packages') |h %></a> ) % } % if ( $num_old_packages ) { % $cgi->param('showoldpackages', 1); - ( <a href="<% $cgi->self_url %>">show old packages</a> ) + ( <a href="<% $cgi->self_url %>"><% mt('show old packages') |h %></a> ) % } elsif ( $cgi->param('showoldpackages') ) { % $cgi->param('showoldpackages', 0); - ( <a href="<% $cgi->self_url %>">hide old packages</a> ) + ( <a href="<% $cgi->self_url %>"><% mt('hide old packages') |h %></a> ) % } </TD> <TD ALIGN="right"> - <A HREF="<%$p%>search/report_cust_pkg.html?custnum=<% $cust_main->custnum %>">Package reports</A> + <A HREF="<%$p%>search/report_cust_pkg.html?custnum=<% $cust_main->custnum %>"><% mt('Package reports') |h %></A> % if ( $curuser->access_right('Qualify service') ) { - | <A HREF="<%$p%>search/qual.cgi?custnum=<% $cust_main->custnum %>">View Qualifications</A> + | <A HREF="<%$p%>search/qual.cgi?custnum=<% $cust_main->custnum %>"><% mt('View Qualifications') |h %></A> % } <BR> - Service reports: - <A HREF="<%$p%>search/report_svc_acct.html?custnum=<% $cust_main->custnum %>">accounts</A><BR> - Usage reports: - <A HREF="<%$p%>search/report_cdr.html?custnum=<% $cust_main->custnum %>">CDRs</A> + <% mt('Service reports:') |h %> + <A HREF="<%$p%>search/report_svc_acct.html?custnum=<% $cust_main->custnum %>"><% mt('accounts') |h %></A><BR> + <% mt('Usage reports:') |h %> + <A HREF="<%$p%>search/report_cdr.html?custnum=<% $cust_main->custnum %>"><% mt('CDRs') |h %></A> </TD> </TR> <TR> <TD COLSPAN=2> % if ( $conf->exists('cust_pkg-group_by_location') and $show_location ) { -<% include('locations.html', +<& locations.html, 'cust_main' => $cust_main, 'packages' => $packages, -) %> + &> % } % else { % # in this format, put all packages in one section -<% include('/elements/table-grid.html') %> -<% include('packages/section.html', +<& /elements/table-grid.html &> +<& packages/section.html, 'packages' => $packages, 'show_location' => $show_location, -) %> + &> </TABLE> % } </TD> |