From dbeee87d487220a1eea4a8f65534293bb6f82df6 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 16 May 2011 04:20:47 +0000 Subject: [PATCH] internationalization/localization, RT12515 --- httemplate/docs/cvv2.html | 14 +++++------ httemplate/view/cust_bill.cgi | 38 ++++++++++++++-------------- httemplate/view/cust_pay.html | 53 +++++++++++++++++++--------------------- httemplate/view/cust_refund.html | 41 +++++++++++++++---------------- httemplate/view/svc_acct.cgi | 53 ++++++++++++++++++---------------------- httemplate/view/svc_phone.cgi | 7 +++--- 6 files changed, 98 insertions(+), 108 deletions(-) diff --git a/httemplate/docs/cvv2.html b/httemplate/docs/cvv2.html index 845484d26..199aadf07 100644 --- a/httemplate/docs/cvv2.html +++ b/httemplate/docs/cvv2.html @@ -1,23 +1,23 @@ - CVV2 information + <% mt('CVV2 information') |h %> - The CVV2 number (also called CVC2 or CID) is a three- or four-digit - security code used to reduce credit card fraud.

+ <% mt('The CVV2 number (also called CVC2 or CID) is a three- or four-digit security code used to reduce credit card fraud') |h %> +

- - + +
Visa / MasterCard / DiscoverAmerican Express<% mt('Visa/MasterCard/Discover') |h %><% mt('American Express') |h %>
- Visa/MasterCard/Discover + <% mt('Visa/MasterCard/Discover') |h %> - American Express + <% mt('American Express') |h %>
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 3d3fb7028..0bcfacbf8 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -1,6 +1,6 @@ -<% include("/elements/header.html",'Invoice View', menubar( - "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", -)) %> +<& /elements/header.html, mt('Invoice View'), menubar( + mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", +) &> % if ( $conf->exists('deleteinvoices') % && $curuser->access_right('Delete invoices' ) @@ -16,10 +16,10 @@ Delete this invoice + TITLE = "<% mt('Delete this invoice from the database completely') |h %>" + ><% mt('Delete this invoice') |h %>

% } @@ -32,42 +32,42 @@ % { % my $s = 0; - Post + <% mt('Post') |h %> % if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) { <% $s++ ? ' | ' : '' %> - check + <% mt('check') |h %> % } % if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> - cash + <% mt('cash') |h %> % } % if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { <% $s++ ? ' | ' : '' %> - Western Union + <% mt('Western Union') |h %> % } % if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { <% $s++ ? ' | ' : '' %> - manual credit card + <% mt('manual credit card') |h %> % } - payment against this invoice

+ <% mt('payment against this invoice') |h %>

% } % if ( $curuser->access_right('Resend invoices') ) { - Re-print this invoice + <% mt('Re-print this invoice') |h %> % if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { - | Re-email this invoice + | <% mt('Re-email this invoice') |h %> % } % if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { - | Re-fax this invoice + | <% mt('Re-fax this invoice') |h %> % }

@@ -76,17 +76,17 @@ % if ( $conf->exists('invoice_latex') ) { - View typeset invoice PDF + <% mt('View typeset invoice PDF') |h %>

% } % my $br = 0; % if ( $cust_bill->num_cust_event ) { $br++; -( View invoice events ) +( <% mt('View invoice events') |h %> ) % } % if ( $cust_bill->num_cust_bill_event ) { $br++; -( View deprecated, old-style invoice events ) +( <% mt('View deprecated, old-style invoice events') |h %> ) % } <% $br ? '

' : '' %> @@ -97,7 +97,7 @@
<% join('', $cust_bill->print_text(\%opt) ) %>
% } -<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> my $curuser = $FS::CurrentUser::CurrentUser; diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html index 1408b3db2..b1e33e66c 100644 --- a/httemplate/view/cust_pay.html +++ b/httemplate/view/cust_pay.html @@ -1,100 +1,97 @@ % if ( $link eq 'popup' ) { - <% include('/elements/header-popup.html', "$thing Receipt" ) %> + <& /elements/header-popup.html, mt("$thing Receipt") &>
- Print | - Re-email + <% mt('Print') |h %> | + <% mt('Re-email') |h %>

% } elsif ( $link eq 'print' ) { - <% include('/elements/header-popup.html', "$thing Receipt" ) %> + <& /elements/header-popup.html, mt("$thing Receipt") &> % #it would be nice if the menubar could be hidden for print, but better to % # have it available than not, otherwise the user winds up at a dead end <% menubar( - "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", + mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", ) %>

% } elsif ( $link eq 'email' ) { % if ( $email_error ) { - <% include('/elements/header-popup.html', "Error re-emailing receipt: $email_error" ) %> + <& /elements/header-popup.html, mt("Error re-emailing receipt: $email_error") &> % } else { - <% include('/elements/header-popup.html', "Re-emailed receipt" ) %> + <& /elements/header-popup.html, mt("Re-emailed receipt") &> % } % } else { - <% include('/elements/header.html', "$thing Receipt", menubar( - "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", - 'Print receipt' => $pr_link, - )) - %> + <& /elements/header.html, mt("$thing Receipt"), menubar( + mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", + mt('Print receipt') => $pr_link, + ) + &> % } % unless ($link =~ /^(popup|email)$/ ) { - <% include('/elements/small_custview.html', + <& /elements/small_custview.html, $custnum, scalar($conf->config('countrydefault')), 1, #no balance - ) - %> + &>

% } <% ntable("#cccccc", 2) %> - Payment# + <% mt('Payment') |h %># <% $cust_pay->paynum %> - Date + <% mt('Date') |h %> <% time2str"%a %b %o, %Y %r", $cust_pay->_date %> % if ( $void ) { - Void Date + <% mt('Void Date') |h %> <% time2str"%a %b %o, %Y %r", $cust_pay->void_date %> %# -%# Void reason +%# <% mt('Void reason') |h %> %# <% $cust_pay->reason %> %# % } - - Amount + <% mt('Amount') |h %> <% $money_char. $cust_pay->paid %> - - Payment method + <% mt('Payment method') |h %> <% $cust_pay->payby_name %> #<% $cust_pay->paymask %> % if ( $cust_pay->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_pay->paybatch ) { - Processor + <% mt('Processor') |h %> <% $cust_pay->processor %> - Authorization# + <% mt('Authorization') |h %># <% $cust_pay->authorization %> % if ( $cust_pay->order_number ) { - Order# + <% mt('Order') |h %># <% $cust_pay->order_number %> % } @@ -104,7 +101,7 @@ % if ( $conf->exists('pkg-balances') && $cust_pay->pkgnum ) { % my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay->pkgnum } ); - For package + <% mt('For package') |h %> <% $cust_pkg->pkg_label_long %> @@ -129,7 +126,7 @@ % } else { - <% include('/elements/footer.html') %> + <& /elements/footer.html &> % } <%init> diff --git a/httemplate/view/cust_refund.html b/httemplate/view/cust_refund.html index 138c8780d..0bef89d05 100644 --- a/httemplate/view/cust_refund.html +++ b/httemplate/view/cust_refund.html @@ -1,83 +1,82 @@ % if ( $link eq 'popup' ) { - <% include('/elements/header-popup.html', "Refund Receipt" ) %> + <& /elements/header-popup.html, mt('Refund Receipt') &> -
Print

+
<% mt('Print') |h %>

% } elsif ( $link eq 'print' ) { - <% include('/elements/header-popup.html', "Refund Receipt" ) %> + <& /elements/header-popup.html, mt('Refund Receipt') &> % #it would be nice if the menubar could be hidden for print, but better to % # have it available than not, otherwise the user winds up at a dead end <% menubar( - "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", + mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", ) %>

% } else { - <% include('/elements/header.html', "Refund Receipt", menubar( - "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", - 'Print receipt' => $pr_link, - )) - %> + <& /elements/header.html, mt('Refund Receipt'), menubar( + mt('View this customer')." (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", + mt('Print receipt') => $pr_link, + ) + &> % } % unless ($link eq 'popup' ) { - <% include('/elements/small_custview.html', + <& /elements/small_custview.html, $custnum, scalar($conf->config('countrydefault')), 1, #no balance - ) - %> + &>

% } <% ntable("#cccccc", 2) %> - Refund# + <% mt('Refund') |h %># <% $cust_refund->refundnum %> - Date + <% mt('Date') |h %> <% time2str"%a %b %o, %Y %r", $cust_refund->_date %> - Amount + <% mt('Amount') |h %> <% $money_char. $cust_refund->refund %> - Reason + <% mt('Reason') |h %> <% $cust_refund->reason %> - Refund method + <% mt('Refund method') |h %> <% $cust_refund->payby_name %><% $cust_refund->paymask ? ' #'.$cust_refund->paymask : '' %> % if ( $cust_refund->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_refund->paybatch ) { - Processor + <% mt('Processor') |h %> <% $cust_refund->processor %> - Authorization# + <% mt('Authorization') |h %># <% $cust_refund->authorization %> % if ( $cust_refund->order_number ) { - Order# + <% mt('Order') |h %># <% $cust_refund->order_number %> % } @@ -98,7 +97,7 @@ % } else { - <% include('/elements/footer.html') %> + <& /elements/footer.html &> % } <%init> diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 291298d1e..e966715dc 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -1,71 +1,66 @@ % if ( $custnum ) { - <% include("/elements/header.html","View $svc account") %> - <% include( '/elements/small_custview.html', $custnum, '', 1, - "${p}view/cust_main.cgi") %> + <& /elements/header.html, mt("View $svc account") &> + <& /elements/small_custview.html, $custnum, '', 1, + "${p}view/cust_main.cgi" &>
% } else { +% my $delmsg = mt('Permanently delete this account?'); - <% include("/elements/header.html",'View account', menubar( - "Cancel this (unaudited) account" => + <& /elements/header.html, mt('View account'), menubar( + mt("Cancel this (unaudited) account") => "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')", - )) %> + ) &> % } -<% include( 'svc_acct/radius_usage.html', +<& svc_acct/radius_usage.html, 'svc_acct' => $svc_acct, 'part_svc' => $part_svc, 'cust_pkg' => $cust_pkg, %gopt, - ) -%> +&> -<% include( 'svc_acct/change_svc_form.html', +<& svc_acct/change_svc_form.html, 'part_svc' => \@part_svc, 'svcnum' => $svcnum, 'pkgnum' => $pkgnum, %gopt, - ) -%> +&> -Service #<% $svcnum %> +<% mt('Service') |h %> #<% $svcnum %> | -<% include('/view/elements/svc_edit_link.html', 'svc' => $svc_acct) %> -<% include( 'svc_acct/change_svc.html', +<& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &> +<& svc_acct/change_svc.html, 'part_svc' => \@part_svc, %gopt, - ) -%> +&> -<% include( 'svc_acct/basics.html', +<& svc_acct/basics.html, 'svc_acct' => $svc_acct, 'part_svc' => $part_svc, %gopt, - ) -%> +&>
-<% include( 'svc_acct/cardfortress.html', +<& svc_acct/cardfortress.html, 'svc_acct' => $svc_acct, %gopt, - ) -%> +&> -<% include( 'svc_acct/hosting.html', +<& svc_acct/hosting.html, %gopt, - ) -%> +&> %#remove this? does anybody even use it? it was a misunderstood customer %#request IIRC? @@ -76,11 +71,11 @@ Service #<% $svcnum %>

% } -<% include('elements/svc_export_settings.html', $svc_acct) %> +<& elements/svc_export_settings.html, $svc_acct &> <% joblisting({'svcnum'=>$svcnum}, 1) %> -<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> die "access denied" diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 6e40fea54..18c89009b 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -1,10 +1,9 @@ -<% include('elements/svc_Common.html', +<& elements/svc_Common.html, 'table' => 'svc_phone', 'fields' => \@fields, 'labels' => \%labels, 'html_foot' => $html_foot, - ) -%> +&> <%init> my $conf = new FS::Conf; @@ -42,7 +41,7 @@ my $html_foot = sub { my $e911 = 'E911 Information'. &ntable("#cccccc"). ''. ntable("#cccccc",2). - 'Location'. + ''.mt('Location').''. ''. $svc_phone->location_label( 'join_string' => '
', 'double_space' => '   ', -- 2.11.0