From 2238711675eefa60cd2feb47c8d3e43d3e6f1860 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 16 May 2011 16:31:08 +0000 Subject: [PATCH] internationalization/localization, RT12515 --- httemplate/view/cust_main/contacts.html | 40 +++++----- httemplate/view/cust_main/locations.html | 13 ++-- httemplate/view/cust_main/notes.html | 4 +- httemplate/view/cust_main/payment_history.html | 102 +++++++++++-------------- httemplate/view/cust_main/tickets.html | 22 +++--- httemplate/view/cust_pay.html | 6 +- httemplate/view/cust_refund.html | 6 +- httemplate/view/svc_acct.cgi | 2 +- httemplate/view/svc_phone.cgi | 2 +- 9 files changed, 91 insertions(+), 106 deletions(-) diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index a86c35cdd..0b754d097 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -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") %><% ntable("#cccccc",2) %> - Contact name + <% mt('Contact name') |h %> <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> @@ -18,11 +18,11 @@ % } - Company + <% mt('Company') |h %> <% $cust_main->get("${pre}company") |h %> - Address + <% mt('Address') |h %> <% $cust_main->get("${pre}address1") |h %> @@ -31,8 +31,8 @@ % ( $conf->exists('cust_main-require_address2') % && ! ( $pre xor $cust_main->has_ship_address ) % ) -% ? 'Unit #' -% : ' '; +% ? mt('Unit #') +% : ' '; <% $address2_label %> @@ -42,43 +42,41 @@ % } - City + <% mt('City') |h %> <% $cust_main->get("${pre}city") |h %> % if ( $cust_main->get("${pre}county") ) { - County + <% mt('County') |h %> <% $cust_main->get("${pre}county") |h %> % } - State + <% mt('State') |h %> <% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %> - Zip + <% mt('Zip') |h %> <% $cust_main->get("${pre}zip") %> - Country + <% mt('Country') |h %> <% code2country( $cust_main->get("${pre}country") ) %> <% $daytime_label %> - <% include('/elements/phonenumber.html', + <& /elements/phonenumber.html, $cust_main->get("${pre}daytime"), 'callable'=>1 - ) - %> + &> <% $night_label %> - <% include('/elements/phonenumber.html', + <& /elements/phonenumber.html, $cust_main->get("${pre}night"), 'callable'=>1 - ) - %> + &> - Fax + <% mt('Fax') |h %> <% $cust_main->get("${pre}fax") || ' ' %> @@ -96,7 +94,7 @@
% } % } -<% include('contacts_new.html', $cust_main) %> +<& contacts_new.html, $cust_main &> <%once> my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ diff --git a/httemplate/view/cust_main/locations.html b/httemplate/view/cust_main/locations.html index ea6216ea9..c95850b78 100755 --- a/httemplate/view/cust_main/locations.html +++ b/httemplate/view/cust_main/locations.html @@ -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 &> '(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'), ); } - diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index 71c4fb4d5..3a4b05a36 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -30,7 +30,7 @@ - <% include('/elements/init_overlib.html') %> + <& /elements/init_overlib.html &> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; @@ -81,7 +81,7 @@
- <% include("/elements/table-grid.html") %> + <& /elements/table-grid.html &> <% mt('Date') |h %> % if ( $conf->exists('cust_main_note-display_times') ) { diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 046899e5e..732e417db 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -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++ ? ' | ' : '' %> - Enter Western Union payment + <% mt('Enter Western Union payment') |h %> % } % if ( ( $payby{'CARD'} || $payby{'DCRD'} ) @@ -37,7 +33,7 @@ % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> - Process credit card payment + <% mt('Process credit card payment') |h %> % } % if ( ( $payby{'CHEK'} || $payby{'DCHK'} ) @@ -45,12 +41,12 @@ % && ! $cust_main->is_encrypted($cust_main->payinfo) % ) { <% $s++ ? ' | ' : '' %> - Process electronic check (ACH) payment + <% mt('Process electronic check (ACH) payment') |h %> % } % if ( $payby{'MCRD'} && $curuser->access_right('Post payment') ) { <% $s++ ? ' | ' : '' %> - Post manual (offline/POS) credit card payment + <% mt('Post manual (offline/POS) credit card payment') |h %> % }
@@ -58,15 +54,13 @@ %# 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, - ) - %> + &>
% } @@ -75,28 +69,24 @@ % $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. @@ -120,7 +110,7 @@ % if ( $payby{'MCRD'} && $curuser->access_right('Post refund') ) { <% $s++ ? ' | ' : '' %> - Post manual (offline/POS) credit card refund + <% mt('Post manual (offline/POS) credit card refund') |h %> % }
@@ -134,22 +124,20 @@ % if ( $view_exemptions || $add_adjustment ) { % if ( $view_exemptions ) { - View tax exemptions + <% mt('View tax exemptions') |h %> <% $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, - }) - %> + } + &> | - View tax adjustments + <% mt('View tax adjustments') |h %> % }
@@ -161,9 +149,9 @@ % && $curuser->access_right('View customer batched payments') % ) % { - View batched payments: + <% mt('View batched payments:') |h %> % foreach my $status (qw( Queued In-transit Complete All )) { - <% $status %> + <% mt($status) |h %> <% $status ne 'All' ? '|' : '' %> % }
@@ -175,24 +163,24 @@ % && scalar($cust_main->cust_pay_pending) % ) % { - View pending payments
+ <% mt('View pending payments') |h %>
% } %# and now the table -<% include("/elements/table-grid.html") %> +<& /elements/table-grid.html &> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; - Date - Description - Invoice - Payment - In-house
Credit
- Refund - Balance + <% mt('Date') |h %> + <% mt('Description') |h %> + <% mt('Invoice') |h %> + <% mt('Payment') |h %> + In-house Credit + <% mt('Refund') |h %> + <% mt('Balance') |h %> %#display payment history @@ -209,8 +197,8 @@ - Starting balance on <% time2str($date_format, $date) %> - (show prior history) + <% mt("Starting balance on [_1]", time2str($date_format, $date) ) |h %> + (<% mt('show prior history') |h %>) diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 064f51147..2175110e4 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -9,8 +9,8 @@ function updateTicketLink() { keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value; } -Create new ticket - in queue +<% mt('Create new ticket') |h %> + <% 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() {
-(View <% $openlabel %> tickets for this customer) -(View resolved tickets for this customer) +(<% mt("View $openlabel tickets for this customer") |h %>) +(<% mt('View resolved tickets for this customer') |h %>)

-<% include("/elements/table-grid.html") %> +<& /elements/table-grid.html &> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; - # - Subject - Status - Queue - Owner - Priority + <% mt('#') |h %> + <% mt('Subject') |h %> + <% mt('Status') |h %> + <% mt('Queue') |h %> + <% mt('Owner') |h %> + <% mt('Priority') |h %> % foreach my $ticket ( @tickets ) { diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html index cdce2ca92..0fb514aa3 100644 --- a/httemplate/view/cust_pay.html +++ b/httemplate/view/cust_pay.html @@ -47,7 +47,7 @@ <% ntable("#cccccc", 2) %> - <% mt('Payment') |h %># + <% mt('Payment #') |h %> <% $cust_pay->paynum %> @@ -86,13 +86,13 @@ - <% mt('Authorization') |h %># + <% mt('Authorization #') |h %> <% $cust_pay->authorization %> % if ( $cust_pay->order_number ) { - <% mt('Order') |h %># + <% mt('Order #') |h %> <% $cust_pay->order_number %> % } diff --git a/httemplate/view/cust_refund.html b/httemplate/view/cust_refund.html index 9cda1a6a8..7f6a34f5d 100644 --- a/httemplate/view/cust_refund.html +++ b/httemplate/view/cust_refund.html @@ -38,7 +38,7 @@ <% ntable("#cccccc", 2) %> - <% mt('Refund') |h %># + <% mt('Refund #') |h %> <% $cust_refund->refundnum %> @@ -70,13 +70,13 @@ - <% mt('Authorization') |h %># + <% mt('Authorization #') |h %> <% $cust_refund->authorization %> % if ( $cust_refund->order_number ) { - <% mt('Order') |h %># + <% mt('Order #') |h %> <% $cust_refund->order_number %> % } diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index e966715dc..47dc36919 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -36,7 +36,7 @@ %gopt, &> -<% mt('Service') |h %> #<% $svcnum %> +<% mt('Service #') |h %><% $svcnum %> | <& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &> <& svc_acct/change_svc.html, diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 18c89009b..4bdbbf25c 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -39,7 +39,7 @@ my $html_foot = sub { ### my $e911 = - 'E911 Information'. + mt('E911 Information'). &ntable("#cccccc"). ''. ntable("#cccccc",2). ''.mt('Location').''. ''. -- 2.11.0