From: levinse Date: Sat, 21 May 2011 18:46:33 +0000 (+0000) Subject: internationalization/localization, RT12515 X-Git-Tag: freeside_2_3_0~220 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e168ca3db2702bd9a540316cd9bd840238dd19ce internationalization/localization, RT12515 --- diff --git a/httemplate/search/cust_pay_void.html b/httemplate/search/cust_pay_void.html index 431bb2c6b..5b247367b 100755 --- a/httemplate/search/cust_pay_void.html +++ b/httemplate/search/cust_pay_void.html @@ -1,13 +1,11 @@ -<% include( 'elements/cust_pay_or_refund.html', +<& elements/cust_pay_or_refund.html, 'thing' => 'pay_void', 'amount_field' => 'paid', - 'name_singular' => 'voided payment', - 'name_verb' => 'voided', # 'paid', + 'name_singular' => emt('voided payment'), + 'name_verb' => emt('voided'), 'disable_by' => 1, #showing original not voiding otaker - 'addl_header' => [ 'Void Date', ], # 'Void Reason' ], + 'addl_header' => [ emt('Void Date'), ], 'addl_fields' => [ sub { time2str('%b %d %Y', shift->void_date ) }, - #'reason', ], - ) -%> +&> diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 2b6db8c75..3606a3d24 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -1,39 +1,35 @@ -<% include( 'elements/search.html', +<& elements/search.html, 'html_init' => $html_init, - 'title' => 'Package Search Results', + 'title' => emt('Package Search Results'), 'name' => 'packages', 'query' => $sql_query, 'count_query' => $count_query, - #'redirect' => $link, - 'header' => [ '#', - 'Quan.', - 'Package', - 'Class', - 'Status', - 'Setup', - 'Base Recur', - 'Freq.', - 'Setup', - 'Last bill', - 'Next bill', - 'Adjourn', - 'Susp.', - 'Expire', - 'Contract end', - 'Cancel', - 'Reason', + 'header' => [ emt('#'), + emt('Quan.'), + emt('Package'), + emt('Class'), + emt('Status'), + emt('Setup'), + emt('Base Recur'), + emt('Freq.'), + emt('Setup'), + emt('Last bill'), + emt('Next bill'), + emt('Adjourn'), + emt('Susp.'), + emt('Expire'), + emt('Contract end'), + emt('Cancel'), + emt('Reason'), FS::UI::Web::cust_header( $cgi->param('cust_fields') ), - 'Services', + emt('Services'), ], 'fields' => [ 'pkgnum', 'quantity', - sub { #my $part_pkg = $part_pkg{shift->pkgpart}; - #$part_pkg->pkg; # ' - '. $part_pkg->comment; - $_[0]->pkg; # ' - '. $_[0]->comment; - }, + sub { $_[0]->pkg; }, 'classname', sub { ucfirst(shift->status); }, sub { sprintf( $money_char.'%.2f', @@ -45,20 +41,8 @@ $c->part_pkg->base_recur($c) ); }, - sub { #shift->part_pkg->freq_pretty; - - #my $part_pkg = $part_pkg{shift->pkgpart}; - #$part_pkg->freq_pretty; - - FS::part_pkg::freq_pretty(shift); - }, + sub { FS::part_pkg::freq_pretty(shift); }, - #sub { time2str('%b %d %Y', shift->setup); }, - #sub { time2str('%b %d %Y', shift->last_bill); }, - #sub { time2str('%b %d %Y', shift->bill); }, - #sub { time2str('%b %d %Y', shift->susp); }, - #sub { time2str('%b %d %Y', shift->expire); }, - #sub { time2str('%b %d %Y', shift->get('cancel')); }, ( map { time_or_blank($_) } qw( setup last_bill bill adjourn susp expire contract_end cancel ) ), @@ -73,13 +57,6 @@ }, \&FS::UI::Web::cust_fields, - #sub { ''. - # join('', map { '' } - # shift->labels - # ). - # '
'. $_->[0]. - # ':'. $_->[1]. '
'; - # }, sub { my $cust_pkg = shift; my $type = $cgi->param('_type') || ''; @@ -159,8 +136,7 @@ ), '', ], - ) -%> +&> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -171,8 +147,6 @@ die "access denied" my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; -# my %part_pkg = map { $_->pkgpart => $_ } qsearch('part_pkg', {}); - my %search_hash = (); #some false laziness w/misc/bulk_change_pkg.cgi @@ -243,23 +217,6 @@ my $clink = sub { : ''; }; -#if ( scalar(@cust_pkg) == 1 ) { -# print $cgi->redirect("${p}view/cust_main.cgi?". $cust_pkg[0]->custnum. -# "#cust_pkg". $cust_pkg[0]->pkgnum ); - -# my @cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ); -# my $rowspan = scalar(@cust_svc) || 1; - -# my $n2 = ''; -# foreach my $cust_svc ( @cust_svc ) { -# my($label, $value, $svcdb) = $cust_svc->label; -# my $svcnum = $cust_svc->svcnum; -# my $sview = $p. "view"; -# print $n2,qq!$label!, -# qq!$value!; -# $n2=""; -# } - sub time_or_blank { my $column = shift; return sub { @@ -277,18 +234,18 @@ my $html_init = sub { if ( $curuser->access_right('Bulk change customer packages') ) { $text .= include('/elements/init_overlib.html'). include( '/elements/popup_link.html', - 'label' => 'Change these packages', + 'label' => emt('Change these packages'), 'action' => "${p}misc/bulk_change_pkg.cgi?$query", - 'actionlabel' => 'Change Packages', + 'actionlabel' => emt('Change Packages'), 'width' => 569, 'height' => 210, ). '
'; if ( $curuser->access_right('Edit customer package dates') ) { $text .= include( '/elements/popup_link.html', - 'label' => 'Increment next bill date', + 'label' => emt('Increment next bill date'), 'action' => "${p}misc/bulk_pkg_increment_bill.cgi?$query", - 'actionlabel' => 'Increment Bill Date', + 'actionlabel' => emt('Increment Bill Date'), 'width' => 569, 'height' => 210, ). '
'; diff --git a/httemplate/search/report_receivables.html b/httemplate/search/report_receivables.html index e85d78697..e19877d06 100755 --- a/httemplate/search/report_receivables.html +++ b/httemplate/search/report_receivables.html @@ -1,4 +1,4 @@ -<% include('/elements/header.html', 'Accounts Receivable Aging Summary' ) %> +<& /elements/header.html, emt('Accounts Receivable Aging Summary') &>
@@ -6,19 +6,18 @@ - Search options + <% mt('Search options') |h %> - <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %> + <& /elements/tr-select-agent.html, 'disable_empty'=>0 &> - <% include( '/elements/tr-select-cust_main-status.html', - 'label' => 'Customer Status' - ) - %> + <& /elements/tr-select-cust_main-status.html, + 'label' => emt('Customer Status'), + &> - Customers + <% mt('Customers') |h %> - - - - - - + + + + + + + + + + + +
All customers (even those without an outstanding balance)
Customers with a balance over days old
 Including customers with credit balances
<% mt('All customers (even those without an outstanding balance)') |h %>
+% my $daysinput = qq!!; +% my $str = emt("Customers with a balance over [_1] days old",'XXXDAYSXXX'); # yeah it's a hack +% $str =~ s/XXXDAYSXXX/$daysinput/; + <% $str %> +
 <% mt('Including customers with credit balances') |h %>
- <% include( '/elements/tr-input-date-field.html', { + <& /elements/tr-input-date-field.html, { 'name' => 'as_of', 'value' => time, - 'label' => 'As of date ', + 'label' => emt('As of date '), 'format' => FS::Conf->new->config('date_format') || '%m/%d/%Y', - } ) %> + } + &>
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init>