From: levinse Date: Sat, 21 May 2011 18:24:20 +0000 (+0000) Subject: internationalization/localization, RT12515 X-Git-Tag: freeside_2_3_0~221 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2db5d3e1c4d5a48ad15b59efd2f66957937421aa internationalization/localization, RT12515 --- diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html index 91e039d28..cc1601455 100644 --- a/httemplate/search/elements/cust_main_dayranges.html +++ b/httemplate/search/elements/cust_main_dayranges.html @@ -15,7 +15,7 @@ Example: }; -<% include( 'search.html', +<& search.html, 'name' => 'customers', 'query' => $sql_query, 'count_query' => $count_sql, @@ -25,7 +25,7 @@ Example: '30-60', '60-90', '90+', - 'Total', + emt('Total'), @pay_head, ], 'footer' => [ @@ -68,12 +68,9 @@ Example: '', @pay_links, ], - #'align' => 'rlccrrrrr', 'align' => FS::UI::Web::cust_aligns(). 'rrrrr'. ('c' x @pay_labels), - #'size' => [ '', '', '-1', '-1', '', '', '', '', '', ], - #'style' => [ '', '', 'b', 'b', '', '', '', '', 'b', ], 'size' => [ ( map '', FS::UI::Web::cust_header() ), #'-1', '', '', '', '', '', ], '', '', '', '', '', '', @@ -95,8 +92,7 @@ Example: ( map '', @pay_labels ), ], %opt, - ) -%> +&> <%init> my %opt = @_; @@ -118,7 +114,6 @@ if($cgi->param('as_of')) { $opt{'title'} .= ' ('.$cgi->param('as_of').')' if $offset > 0; } -#my $range_cols = join(',', map &{$range_sub}( @$_ ), @ranges ); my $range_cols = join(',', map call_range_sub($range_sub, @$_, 'offset' => $offset ), @$ranges ); my $select_count_pkgs = FS::cust_main->select_count_pkgs_sql; @@ -163,7 +158,6 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { #prospect active inactive suspended cancelled if ( grep { $cgi->param('status') eq $_ } FS::cust_main->statuses() ) { my $method = $cgi->param('status'). '_sql'; - #push @where, $class->$method(); push @where, FS::cust_main->$method(); } @@ -222,7 +216,7 @@ if($opt{'payment_links'} && $curuser->access_right('Process payment') && @payby) @pay_labels = (map { my $payby = $_; my $label = $label{$payby}; - sub {($payby eq $_[0]->payby) ? "$label (on file)" : $label} + sub {($payby eq $_[0]->payby) ? "".emt("$label (on file)")."" : emt($label)} } @payby ); @pay_links = (map { [ "${p}misc/payment.cgi?payby=$_;custnum=", 'custnum' ] } diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index fccb9eef7..8c32b79bd 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -39,8 +39,8 @@ Examples: ) -<% include( 'search.html', - 'title' => $title, +<& search.html, + 'title' => $title, # XXX: translate 'name_singular' => $name_singular, 'query' => $sql_query, 'count_query' => $count_query, @@ -53,8 +53,7 @@ Examples: 'links' => \@links, 'color' => \@color, 'style' => \@style, - ) -%> +&> <%init> my %opt = @_; @@ -158,21 +157,21 @@ push @fields, 'payby_payinfo_pretty', push @sort_fields, '', $amount_field; if ( $unapplied ) { - push @header, 'Unapplied'; + push @header, emt('Unapplied'); $align .= 'r'; push @links, ''; push @fields, sub { sprintf('$%.2f', shift->unapplied_amount) }; push @sort_fields, ''; } -push @header, 'Date'; +push @header, emt('Date'); $align .= 'r'; push @links, ''; push @fields, sub { time2str('%b %d %Y', shift->_date ) }; push @sort_fields, '_date'; unless ( $opt{'disable_by'} ) { - push @header, 'By'; + push @header, emt('By'); $align .= 'c'; push @links, ''; push @fields, sub { my $o = shift->otaker; @@ -183,7 +182,7 @@ unless ( $opt{'disable_by'} ) { } if ( $tax_names ) { - push @header, ('Tax names', 'Tax province'); + push @header, (emt('Tax names'), emt('Tax province')); $align .= 'cc'; push @links, ('',''); push @fields, sub { join (' + ', map { /^(.*?)(, \w\w)?$/; $1 } diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html index 9af4e33dc..ac63935a5 100644 --- a/httemplate/search/elements/report_cust_pay_or_refund.html +++ b/httemplate/search/elements/report_cust_pay_or_refund.html @@ -13,7 +13,7 @@ Examples: ) -<% include('/elements/header.html', $title ) %> +<& /elements/header.html, emt($title) &>
@@ -23,7 +23,7 @@ Examples: - Search options + <% mt('Search options') |h %> @@ -31,18 +31,18 @@ Examples: <% ucfirst(PL($name_singular)) %> of type: @@ -64,71 +64,66 @@ Examples: - Check #: + <% mt('Check #:') |h %> - <% include( '/elements/tr-select-agent.html', + <& /elements/tr-select-agent.html, 'curr_value' => scalar($cgi->param('agentnum')), - 'label' => 'for agent: ', + 'label' => emt('for agent: '), 'disable_empty' => 0, - ) - %> + &> - <% include( '/elements/tr-select-user.html' ) %> + <& /elements/tr-select-user.html &> - Payment + <% mt('Payment') |h %> - <% include( '/elements/tr-input-beginning_ending.html', + <& /elements/tr-input-beginning_ending.html, layout => 'horiz', - ) - %> + &>
% if ( $void ) { - Voided + <% mt('Voided') |h %> - <% include( '/elements/tr-input-beginning_ending.html', + <& /elements/tr-input-beginning_ending.html, prefix => 'void', layout => 'horiz', - ) - %> + &>
% } - <% include( '/elements/tr-input-lessthan_greaterthan.html', - 'label' => 'Amount', - 'field' => 'paid', - ) - %> + <& /elements/tr-input-lessthan_greaterthan.html, + 'label' => emt('Amount'), + 'field' => 'paid', + &> % if ( $table eq 'cust_pay' ) { - <% include( '/elements/tr-checkbox.html', - 'label' => 'Include tax names', - 'field' => 'tax_names', + <& /elements/tr-checkbox.html, + 'label' => emt('Include tax names'), + 'field' => 'tax_names', 'value' => 1, - ) - %> + &> % }
- +
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> my %opt = @_; diff --git a/httemplate/search/report_cust_bill.html b/httemplate/search/report_cust_bill.html index b1a252e6c..79f244f61 100644 --- a/httemplate/search/report_cust_bill.html +++ b/httemplate/search/report_cust_bill.html @@ -1,55 +1,51 @@ -<% include('/elements/header.html', 'Invoice Report' ) %> +<& /elements/header.html, emt('Invoice Report') &>
scalar( $cgi->param('agentnum') ), - 'label' => 'Invoices for agent: ', + 'label' => emt('Invoices for agent: '), 'disable_empty' => 0, - ) - %> + &> - <% include( '/elements/tr-input-beginning_ending.html' ) %> + <& /elements/tr-input-beginning_ending.html &> - <% include( '/elements/tr-input-lessthan_greaterthan.html', - label => 'Charged', + <& /elements/tr-input-lessthan_greaterthan.html, + label => emt('Charged'), field => 'charged', - ) - %> + &> - <% include( '/elements/tr-input-lessthan_greaterthan.html', - label => 'Owed', + <& /elements/tr-input-lessthan_greaterthan.html, + label => emt('Owed'), field => 'owed', - ) - %> - <% include( '/elements/tr-select-payby.html', - label => 'Payment method:', + &> + <& /elements/tr-select-payby.html, + label => emt('Payment method:'), payby_type => 'cust', multiple => 1, all_selected => 1, - ) - %> + &> - + - +
Show only open invoices<% mt('Show only open invoices') |h %>
Show only the single most recent invoice per-customer<% mt('Show only the single most recent invoice per-customer') |h %>

- +
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> die "access denied" diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index 672117499..d4ed2ad87 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -1,4 +1,4 @@ -<% include('/elements/header.html', 'Customer Report' ) %> +<& /elements/header.html, emt('Customer Report') &>
@@ -6,66 +6,56 @@ - + - <% include( '/elements/tr-select-agent.html', + <& /elements/tr-select-agent.html, 'curr_value' => scalar($cgi->param('agentnum')), 'disable_empty' => 0, - ) - %> + &> - <% include( '/elements/tr-select-cust_main-status.html', - 'label' => 'Status' - ) - %> + <& /elements/tr-select-cust_main-status.html, + 'label' => emt('Status'), + &> - <% include( '/elements/tr-select-cust_class.html', - 'label' => 'Class', + <& /elements/tr-select-cust_class.html, + 'label' => emt('Class'), 'multiple' => 1, - 'pre_options' => [ '' => '(none)' ], + 'pre_options' => [ '' => emt('(none)') ], 'all_selected' => 1, - ) - %> + &> - + -% foreach my $field (qw( signupdate )) { - - - + + - - -% } + - <% include( '/elements/tr-select-cust_tag.html', - 'cgi' => $cgi, - 'is_report' => 1, + <& /elements/tr-select-cust_tag.html, + 'cgi' => $cgi, + 'is_report' => 1, 'multiple' => 1, - ) - %> + &> - <% include( '/elements/tr-select-payby.html', + <& /elements/tr-select-payby.html, 'payby_type' => 'cust', 'multiple' => 1, 'all_selected' => 1, - ) - %> + &> - + - + - <% include( '/elements/tr-input-lessthan_greaterthan.html', - label => 'Current balance', + <& /elements/tr-input-lessthan_greaterthan.html, + label => emt('Current balance'), field => 'current_balance', - ) - %> + &> - + - + % if ( $conf->exists('enable_taxproducts') ) { - + @@ -136,22 +124,22 @@ - + - <% include( '/elements/tr-select-cust-fields.html' ) %> + <& /elements/tr-select-cust-fields.html &> - +
Search options<% mt('Search options') |h %>
Address<% mt('Address') |h %>
<% $label{$field} %>
<% mt('Signup date') |h %> - - <% include( '/elements/tr-input-beginning_ending.html', - prefix => $field, - layout => 'horiz', - ) - %> -
+ + <& /elements/tr-input-beginning_ending.html, + prefix => 'signupdate', + layout => 'horiz', + &> +
Payment expiration before<% mt('Payment expiration before') |h %>
Invoice terms<% mt('Invoice terms') |h %> - <% include( '/elements/select-terms.html', - 'pre_options' => [ '' => 'all' ], + <& /elements/select-terms.html, + 'pre_options' => [ '' => emt('all') ], 'empty_value' => 'NULL', - ) - %> + &>
Include cancelled packages<% mt('Include cancelled packages') |h %>
Without census tract<% mt('Without census tract') |h %>
With hardcoded tax location<% mt('With hardcoded tax location') |h %>
Display options<% mt('Display options') |h %>
Add package columns<% mt('Add package columns') |h %>

- +
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> die "access denied" @@ -162,10 +150,3 @@ die "access denied" my $conf = new FS::Conf; -<%once> - -my %label = ( - 'signupdate' => 'Signup date', -); - -