From 998f029ef805c73e90543b34192e16d38a23c69c Mon Sep 17 00:00:00 2001 From: levinse Date: Wed, 18 May 2011 01:08:08 +0000 Subject: [PATCH] internationalization/localization, RT12515 --- httemplate/view/cust_main/attachments.html | 20 +++---- httemplate/view/cust_main/billing.html | 12 ++-- httemplate/view/cust_main/contacts.html | 8 +-- httemplate/view/cust_main/locations.html | 10 ++-- httemplate/view/cust_main/misc.html | 2 +- httemplate/view/cust_main/notes.html | 6 +- .../view/cust_main/one_time_charge_link.html | 4 +- httemplate/view/cust_main/order_pkg_link.html | 18 +++--- httemplate/view/cust_main/packages/location.html | 8 +-- httemplate/view/cust_main/packages/package.html | 34 ++++++------ httemplate/view/cust_main/packages/services.html | 16 +++--- httemplate/view/cust_main/payment_history.html | 50 ++++++++--------- .../view/cust_main/payment_history/credit.html | 34 ++++++------ .../view/cust_main/payment_history/invoice.html | 12 ++-- .../view/cust_main/payment_history/payment.html | 54 +++++++++--------- .../cust_main/payment_history/pending_payment.html | 6 +- .../view/cust_main/payment_history/refund.html | 14 ++--- .../cust_main/payment_history/voided_payment.html | 8 +-- httemplate/view/elements/svc_edit_link.html | 9 ++- httemplate/view/svc_acct/basics.html | 64 ++++++++++------------ httemplate/view/svc_acct/change_svc.html | 4 +- 21 files changed, 193 insertions(+), 200 deletions(-) diff --git a/httemplate/view/cust_main/attachments.html b/httemplate/view/cust_main/attachments.html index 570b65120..1ad857e47 100755 --- a/httemplate/view/cust_main/attachments.html +++ b/httemplate/view/cust_main/attachments.html @@ -48,35 +48,35 @@ % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;". % "undelete=1", -% mt('Undelete attachment')); -% $edit .= linkstr($clickjs, mt('undelete')); +% emt('Undelete attachment')); +% $edit .= linkstr($clickjs, emt('undelete')); % } % if ($curuser->access_right('Purge attachment')) { % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;". % "purge=1", -% mt('Purge attachment'), -% mt('Permanently remove this file?') ); -% $edit .= linkstr($clickjs,mt('purge')); +% emt('Purge attachment'), +% emt('Permanently remove this file?') ); +% $edit .= linkstr($clickjs,emt('purge')); % } % } % else { # you can download or edit it % if ($curuser->access_right('Edit attachment') ) { % my $clickjs = popup('edit/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum", -% mt('Edit attachment properties')); -% $edit .= linkstr($clickjs,mt('edit')); +% emt('Edit attachment properties')); +% $edit .= linkstr($clickjs,emt('edit')); % } % if($curuser->access_right('Delete attachment') ) { % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;delete=1", % 'Delete attachment', % 'Delete this file?'); -% $edit .= linkstr($clickjs,mt('delete')); +% $edit .= linkstr($clickjs,emt('delete')); % } % if ($curuser->access_right('Download attachment') ) { % $edit .= qq!  (! -% . mt('download') .')'; +% . emt('download') .')'; % } % } @@ -134,7 +134,7 @@ sub note_datestr { sub linkstr { my ($clickjs, $label) = (shift,shift); - '  (' . mt($label) . ')'; + '  (' . emt($label) . ')'; } sub size_units { diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 95ae985b9..fec30f87a 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,4 +1,4 @@ -<% mt('Billing information') |h %> +<% emt('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) @@ -8,7 +8,7 @@ %# (<% mt('Bill now') |h %>) (<& /elements/bill.html, custnum => $cust_main->custnum, - label => mt('Bill now'), + label => emt('Bill now'), url => $p.'view/cust_main.cgi?'.$cust_main->custnum, &>) % } @@ -170,12 +170,12 @@ % } -% my $yes = mt('yes'); -% my $no = mt('no'); +% my $yes = emt('yes'); +% my $no = emt('no'); % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); - <% mt('Tax exempt') |h %><% @exempt_groups ? ' ('.mt('all taxes').')' : '' %> + <% mt('Tax exempt') |h %><% @exempt_groups ? ' ('.emt('all taxes').')' : '' %> <% $cust_main->tax ? $yes : $no %> % foreach my $exempt_group ( @exempt_groups ) { @@ -212,7 +212,7 @@ <% mt('Invoice terms') |h %> - <% $cust_main->invoice_terms || mt('Default').' ('. ( $conf->config('invoice_default_terms') || mt('Payable upon receipt') ). ')' %> + <% $cust_main->invoice_terms || emt('Default').' ('. ( $conf->config('invoice_default_terms') || emt('Payable upon receipt') ). ')' %> diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 0b754d097..9a55e5488 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -1,6 +1,6 @@ % my %which = ( -% '' => mt('Billing'), -% 'ship_' => mt('Service'), +% '' => emt('Billing'), +% 'ship_' => emt('Service'), % ); % foreach my $which ( '', 'ship_' ) { % my $pre = $cust_main->get("${which}last") ? $which : ''; @@ -13,7 +13,7 @@ <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> % if ( $which eq '' && $conf->exists('show_ss') ) { - SS# + <% mt('SS#') |h %> <% $cust_main->masked('ss') || ' ' %> % } @@ -31,7 +31,7 @@ % ( $conf->exists('cust_main-require_address2') % && ! ( $pre xor $cust_main->has_ship_address ) % ) -% ? mt('Unit #') +% ? emt('Unit #') % : ' '; diff --git a/httemplate/view/cust_main/locations.html b/httemplate/view/cust_main/locations.html index c95850b78..98c933645 100755 --- a/httemplate/view/cust_main/locations.html +++ b/httemplate/view/cust_main/locations.html @@ -19,7 +19,7 @@ STYLE="padding-bottom: 0px; border-bottom-width: 1px;"> % if (! $locationnum) { -Default service location: +<% mt('Default service location:') |h %> % } % elsif ( $loc->disabled ) { @@ -69,8 +69,8 @@ sub edit_location_link { my $locationnum = shift; include( '/elements/popup_link.html', 'action' => $p. "edit/cust_location.cgi?locationnum=$locationnum", - 'label' => '('.mt('Edit location').')', - 'actionlabel' => mt('Edit'), + 'label' => '('.emt('Edit location').')', + 'actionlabel' => emt('Edit'), ); } @@ -78,8 +78,8 @@ sub disable_location_link { my $locationnum = shift; include( '/elements/popup_link.html', 'action' => $p. "misc/disable-cust_location.cgi?locationnum=$locationnum", - 'label' => '('.mt('Disable location').')', - 'actionlabel' => mt('Disable'), + 'label' => '('.emt('Disable location').')', + 'actionlabel' => emt('Disable'), ); } diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 8c23a3f68..ed9b91a61 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -48,7 +48,7 @@ % #if ( $cust_main->classnum ) { <% mt('Class') |h %> - <% $cust_main->classname || '('.mt('none').')' %> + <% $cust_main->classname || '('.emt('none').')' %> % #} diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index 81ba6fb3d..1e9f464db 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -54,7 +54,7 @@ % 'edit/cust_main_note.cgi'. % "?custnum=$custnum". % ";notenum=$notenum", -% 'actionlabel' => mt('Edit customer note'), +% 'actionlabel' => emt('Edit customer note'), % 'width' => 616, % 'height' => 538, #575 % 'frame' => 'top', @@ -63,13 +63,13 @@ % % my $edit = ''; % if ($curuser->access_right('Edit customer note') ) { -% $edit = qq! (!.mt('edit').')'; +% $edit = qq! (!.emt('edit').')'; % } % % if ( $last_classnum != $note->classnum && !$skipheader ) { % my $tmp_classnum = $note->classnum ? $note->classnum : 0; % $classes{$tmp_classnum} = $note->classname ne '' ? $note->classname -% : mt('Other'); +% : emt('Other'); % if ( $last_classnum != -1 ) { diff --git a/httemplate/view/cust_main/one_time_charge_link.html b/httemplate/view/cust_main/one_time_charge_link.html index abb9a4384..ba6b7853c 100644 --- a/httemplate/view/cust_main/one_time_charge_link.html +++ b/httemplate/view/cust_main/one_time_charge_link.html @@ -76,8 +76,8 @@ function taxoverridequickchargemagic() { <% include('/elements/popup_link.html', { 'action' => $p.'edit/quick-charge.html?custnum='. $cust_main->custnum, - 'label' => mt('One-time charge'), - 'actionlabel' => mt('One-time charge'), + 'label' => emt('One-time charge'), + 'actionlabel' => emt('One-time charge'), 'color' => '#333399', 'width' => 763, 'height' => 460, #more for more room for lines of add'l description? diff --git a/httemplate/view/cust_main/order_pkg_link.html b/httemplate/view/cust_main/order_pkg_link.html index e6abbd13c..29398432e 100644 --- a/httemplate/view/cust_main/order_pkg_link.html +++ b/httemplate/view/cust_main/order_pkg_link.html @@ -1,13 +1,13 @@ <& /elements/popup_link-cust_main.html, - 'action' => $p. 'misc/order_pkg.html', - 'label' => $opt{'label'} || mt('Order new package'), - 'actionlabel' => mt('Order new package'), - 'color' => '#333399', - 'cust_main' => $cust_main, - 'closetext' => mt('Close'), - 'width' => 763, - 'height' => $height, - %optional, + 'action' => $p. 'misc/order_pkg.html', + 'label' => $opt{'label'} || emt('Order new package'), + 'actionlabel' => emt('Order new package'), + 'color' => '#333399', + 'cust_main' => $cust_main, + 'closetext' => emt('Close'), + 'width' => 763, + 'height' => $height, + %optional, &> <%init> diff --git a/httemplate/view/cust_main/packages/location.html b/httemplate/view/cust_main/packages/location.html index 5f36055d1..6658415b5 100644 --- a/httemplate/view/cust_main/packages/location.html +++ b/httemplate/view/cust_main/packages/location.html @@ -48,8 +48,8 @@ sub pkg_change_location_link { 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;". "address1=;address2=;city=;county=;state=$statedefault;". "zip=;country=$countrydefault", - 'label' => mt('Change location'), - 'actionlabel' => mt('Change'), + 'label' => emt('Change location'), + 'actionlabel' => emt('Change'), 'cust_pkg' => $cust_pkg, ); } @@ -58,8 +58,8 @@ sub edit_location_link { my $locationnum = shift; include( '/elements/popup_link.html', 'action' => $p. "edit/cust_location.cgi?locationnum=$locationnum", - 'label' => mt('Edit location'), - 'actionlabel' => mt('Edit'), + 'label' => emt('Edit location'), + 'actionlabel' => emt('Edit'), ); } diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index c79742b8b..494344586 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -89,8 +89,8 @@ % if ( $editi && ! $cust_pkg->get('cancel') ) { (<& /elements/popup_link.html, { 'action' => $editlink. 'I', - 'label' => mt('edit'), - 'actionlabel' => mt('Edit invoice details'), + 'label' => emt('edit'), + 'actionlabel' => emt('Edit invoice details'), 'color' => '#333399', 'width' => 763, } @@ -112,8 +112,8 @@ ( <% include('/elements/popup_link.html', { 'action' => $editlink. 'I', - 'label' => mt('Add invoice details'), - 'actionlabel' => mt('Add invoice details'), + 'label' => emt('Add invoice details'), + 'actionlabel' => emt('Add invoice details'), 'color' => '#333399', 'width' => 763, }) @@ -133,8 +133,8 @@ % if ( $editc ) { (<& /elements/popup_link.html, { 'action' => $editlink. 'C', - 'label' => mt('edit'), - 'actionlabel' => mt('Edit comments'), + 'label' => emt('edit'), + 'actionlabel' => emt('Edit comments'), 'color' => '#333399', 'width' => 763, } @@ -156,8 +156,8 @@ ( <& /elements/popup_link.html, { 'action' => $editlink. 'C', - 'label' => mt('Add comments'), - 'actionlabel' => mt('Add comments'), + 'label' => emt('Add comments'), + 'actionlabel' => emt('Add comments'), 'color' => '#333399', 'width' => 763, } @@ -210,8 +210,8 @@ sub pkg_change_link { my $locationnum = $cust_pkg->locationnum; include( '/elements/popup_link-cust_pkg.html', 'action' => $p. "misc/change_pkg.cgi?locationnum=$locationnum", - 'label' => mt('Change package'), - 'actionlabel' => mt('Change'), + 'label' => emt('Change package'), + 'actionlabel' => emt('Change'), 'cust_pkg' => $cust_pkg, ); } @@ -223,20 +223,20 @@ sub pkg_change_location_link { 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;". "address1=;address2=;city=;county=;state=$statedefault;". "zip=;country=$countrydefault", - 'label' => mt('Change location'), - 'actionlabel' => mt('Change'), + 'label' => emt('Change location'), + 'actionlabel' => emt('Change'), 'cust_pkg' => $cust_pkg, ); } -sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', mt('Edit dates'), @_ ); } +sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', emt('Edit dates'), @_ ); } sub pkg_discount_link { my $cust_pkg = shift or return ''; include( '/elements/popup_link-cust_pkg.html', 'action' => $p.'edit/cust_pkg_discount.html', - 'label' => mt('Discount'), - 'actionlabel' => mt('Discount'), + 'label' => emt('Discount'), + 'actionlabel' => emt('Discount'), 'cust_pkg' => $cust_pkg, 'width' => 616, ); @@ -249,13 +249,13 @@ sub pkg_customize_link { qq!!.mt('Customize').''; + qq!">!.emt('Customize').''; } sub pkg_event_link { my($cust_pkg) = @_; qq!!. - mt('View package events'). + emt('View package events'). ''; } diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index de8946248..d84d3297a 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -109,7 +109,7 @@ sub svc_provision_link { } my $link = qq!!. - mt("Provision [_1] ([_2])",$svc_nbsp,$num_avail).''; + emt("Provision [_1] ([_2])",$svc_nbsp,$num_avail).''; if ( $opt->{'legacy_link'} && $curuser->access_right('View/link unlinked services') ) @@ -117,18 +117,18 @@ sub svc_provision_link { $link .= '
'. qq!!. - mt("Link to legacy [_1] ([_2])",$svc_nbsp,$num_avail).''; + emt("Link to legacy [_1] ([_2])",$svc_nbsp,$num_avail).''; } $link; } my %hints = ( -svc_acct => mt('(user or email)'), -svc_domain => mt('(domain)'), -svc_broadband => mt('(ip or mac)'), -svc_forward => mt('(email)'), -svc_phone => mt('(phone)'), -svc_pbx => mt('(phone)'), +svc_acct => emt('(user or email)'), +svc_domain => emt('(domain)'), +svc_broadband => emt('(ip or mac)'), +svc_forward => emt('(email)'), +svc_phone => emt('(phone)'), +svc_pbx => emt('(phone)'), ); diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 4a49bfddb..f29ae164b 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -4,10 +4,10 @@ % if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment' ]) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter check payment'), + 'label' => emt('Enter check payment'), 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=BILL", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter check payment'), + 'actionlabel' => emt('Enter check payment'), 'width' => 392, &> % } @@ -15,10 +15,10 @@ % if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter cash payment'), + 'label' => emt('Enter cash payment'), 'action' => "${p}edit/cust_pay.cgi?popup=1;payby=CASH", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter cash payment'), + 'actionlabel' => emt('Enter cash payment'), 'width' => 392, &> % } @@ -55,10 +55,10 @@ % if ( $curuser->access_right('Post credit') ) { <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter credit'), + 'label' => emt('Enter credit'), 'action' => "${p}edit/cust_credit.cgi", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter credit'), + 'actionlabel' => emt('Enter credit'), 'width' => 616, #make room for reasons #540 default &>
@@ -70,10 +70,10 @@ % if ( $payby{'BILL'} && $curuser->access_right(['Post refund', 'Post check refund']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter check refund'), + 'label' => emt('Enter check refund'), 'action' => "${p}edit/cust_refund.cgi?popup=1;payby=BILL", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter check refund'), + 'actionlabel' => emt('Enter check refund'), 'width' => 392, &> % } @@ -81,10 +81,10 @@ % if ( $payby{'CASH'} && $curuser->access_right(['Post refund', 'Post cash refund']) ) { <% $s++ ? ' | ' : '' %> <& /elements/popup_link-cust_main.html, - 'label' => mt('Enter cash refund'), + 'label' => emt('Enter cash refund'), 'action' => "${p}edit/cust_refund.cgi?popup=1;payby=CASH", 'cust_main' => $cust_main, - 'actionlabel' => mt('Enter cash refund'), + 'actionlabel' => emt('Enter cash refund'), 'width' => 392, &> % } @@ -131,8 +131,8 @@ % if ( $add_adjustment ) { <& /elements/popup_link.html, { 'action' => $p.'edit/cust_tax_adjustment.html?custnum='. $cust_main->custnum, - 'label' => mt('Add tax adjustment'), - 'actionlabel' => mt('Add tax adjustment'), + 'label' => emt('Add tax adjustment'), + 'actionlabel' => emt('Add tax adjustment'), 'height' => 200, } &> @@ -453,14 +453,14 @@ foreach my $cust_refund ($cust_main->cust_refund) { sub translate_payby { my ($payby,$payinfo) = (shift,shift); my %payby = ( - BILL => $payinfo ? mt('Check #') : '', - CHEK => mt('Electronic check '), - PREP => mt('Prepaid card '), - CARD => mt('Credit card #'), - COMP => mt('Complimentary by '), - CASH => mt('Cash'), - WEST => mt('Western Union'), - MCRD => mt('Manual credit card'), + BILL => $payinfo ? emt('Check #') : '', + CHEK => emt('Electronic check '), + PREP => emt('Prepaid card '), + CARD => emt('Credit card #'), + COMP => emt('Complimentary by '), + CASH => emt('Cash'), + WEST => emt('Western Union'), + MCRD => emt('Manual credit card'), ); $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; $payby; @@ -469,10 +469,10 @@ sub translate_payby { sub translate_payby_refund { my ($payby,$payinfo) = (shift,shift); my %payby = ( - BILL => $payinfo ? mt('Check #') : mt('Check'), - CHEK => mt('Electronic check '), - CARD => mt('Credit card #'), - COMP => mt('Complimentary by '), + BILL => $payinfo ? emt('Check #') : emt('Check'), + CHEK => emt('Electronic check '), + CARD => emt('Credit card #'), + COMP => emt('Complimentary by '), ); $payby = (exists $payby{$payby}) ? $payby{$payby} : $payby; $payby; @@ -487,7 +487,7 @@ sub translate_payinfo { $payinfo = $object->paymask; } elsif ( $payby eq 'CHEK' ) { my( $account, $aba ) = split('@', $object->paymask ); - $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account); + $payinfo = emt("ABA [_1], Acct #[_2]",$aba,$account); } ($payby,$payinfo); diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html index f2b29b079..6dd8970c8 100644 --- a/httemplate/view/cust_main/payment_history/credit.html +++ b/httemplate/view/cust_main/payment_history/credit.html @@ -27,21 +27,21 @@ if ($conf->exists('cust_credit_bill_pkg-manual')) { } my( $apply, $ext ) = ( '', '', '', '' ); -my $credit = mt("Credit by [_1]", $cust_credit->otaker ); +my $credit = emt("Credit by [_1]", $cust_credit->otaker ); if ( scalar(@cust_credit_bill) == 0 && scalar(@cust_credit_refund) == 0 ) { #completely unapplied $credit = '' - . mt("Unapplied Credit by [_1]", $cust_credit->otaker ) + . emt("Unapplied Credit by [_1]", $cust_credit->otaker ) . ''; if ( $curuser->access_right('Apply credit') ) { if ( $cust_credit->cust_main->total_owed > 0 ) { $apply = ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply'), + 'label' => emt('apply'), 'action' => "${p}edit/cust_credit_bill.cgi?". $cust_credit->crednum, - 'actionlabel' => mt('Apply credit'), + 'actionlabel' => emt('Apply credit'), %cust_credit_bill_width, %cust_credit_bill_height, ). @@ -50,10 +50,10 @@ if ( scalar(@cust_credit_bill) == 0 if ( $cust_credit->cust_main->total_unapplied_refunds > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply to refund'), + 'label' => emt('apply to refund'), 'action' => "${p}edit/cust_credit_refund.cgi?". $cust_credit->crednum, - 'actionlabel' => mt('Apply credit to refund'), + 'actionlabel' => emt('Apply credit to refund'), 'width' => 392, ). ')'; @@ -68,7 +68,7 @@ if ( scalar(@cust_credit_bill) == 0 && scalar(@cust_credit_refund) == 1 && $cust_credit->credited == 0 ) { #applied to one refund - $desc .= mt(" refunded on [_1]", time2str($date_format, $cust_credit_refund[0]->_date) ); + $desc .= emt(" refunded on [_1]", time2str($date_format, $cust_credit_refund[0]->_date) ); } else { #complicated $desc .= '
'; @@ -79,7 +79,7 @@ if ( scalar(@cust_credit_bill) == 0 . $app->applied_to_invoice . '
'; } elsif ( $app->isa('FS::cust_credit_refund') ) { $desc .= '  ' . - mt("[_1][_2] refunded on [_3]", $money_char, $app->amount, + emt("[_1][_2] refunded on [_3]", $money_char, $app->amount, time2str($date_format, $app->_date) ) . '
'; } else { die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund"; @@ -87,16 +87,16 @@ if ( scalar(@cust_credit_bill) == 0 } if ( $cust_credit->credited > 0 ) { $desc .= '  ' . - mt("[_1][_2] unapplied", $money_char, $cust_credit->credited) . + emt("[_1][_2] unapplied", $money_char, $cust_credit->credited) . ''; if ( $curuser->access_right('Apply credit') ) { if ( $cust_credit->cust_main->total_owed > 0 ) { $apply = ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply'), + 'label' => emt('apply'), 'action' => "${p}edit/cust_credit_bill.cgi?". $cust_credit->crednum, - 'actionlabel' => mt('Apply credit'), + 'actionlabel' => emt('Apply credit'), %cust_credit_bill_width, %cust_credit_bill_height, ). @@ -105,10 +105,10 @@ if ( scalar(@cust_credit_bill) == 0 if ( $cust_credit->cust_main->total_unapplied_refunds > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply to refund'), + 'label' => emt('apply to refund'), 'action' => "${p}edit/cust_credit_refund.cgi?". $cust_credit->crednum, - 'actionlabel' => mt('Apply credit to refund'), + 'actionlabel' => emt('Apply credit to refund'), 'width' => 392, ). ')'; @@ -120,17 +120,17 @@ if ( scalar(@cust_credit_bill) == 0 # my $delete = ''; $delete = areyousure_link("${p}misc/delete-cust_credit.cgi?".$cust_credit->crednum, - mt('Are you sure you want to delete this credit?'), + emt('Are you sure you want to delete this credit?'), '', - mt('delete') + emt('delete') ) if ( $cust_credit->closed !~ /^Y/i && $curuser->access_right('Delete credit') ); my $unapply = ''; $unapply = areyousure_link("${p}misc/unapply-cust_credit.cgi?".$cust_credit->crednum, - mt('Are you sure you want to unapply this credit?'), + emt('Are you sure you want to unapply this credit?'), '', - mt('unapply') + emt('unapply') ) if ( $cust_credit->closed !~ /^Y/i && scalar(@cust_credit_bill) && $curuser->access_right('Unapply credit') ); diff --git a/httemplate/view/cust_main/payment_history/invoice.html b/httemplate/view/cust_main/payment_history/invoice.html index 29389ef77..d7ee0047a 100644 --- a/httemplate/view/cust_main/payment_history/invoice.html +++ b/httemplate/view/cust_main/payment_history/invoice.html @@ -7,9 +7,9 @@ my $conf = new FS::Conf; my $curuser = $FS::CurrentUser::CurrentUser; -my $invoice = mt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed); +my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed); $invoice = '' . - mt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) . + emt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) . '' if ( $cust_bill->owed > 0 ); @@ -21,9 +21,9 @@ my $link = $curuser->access_right('View invoices') my $delete = ''; $delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum", - mt('Are you sure you want to delete this invoice?'), - mt('Delete this invoice from the database completely'), - mt('delete') + emt('Are you sure you want to delete this invoice?'), + emt('Delete this invoice from the database completely'), + emt('delete') ) if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') ); @@ -36,7 +36,7 @@ if ( $cust_bill->num_cust_event ) { $events = qq!
( '.mt('View invoice events').' )'; + '">( '.emt('View invoice events').' )
'; } # diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html index 43f0afbb0..e0241cc8f 100644 --- a/httemplate/view/cust_main/payment_history/payment.html +++ b/httemplate/view/cust_main/payment_history/payment.html @@ -37,22 +37,22 @@ my $otaker = $cust_pay->otaker; $otaker = 'auto billing' if $otaker eq 'fs_daily'; $otaker = 'customer self-service' if $otaker eq 'fs_selfservice'; -my $payment = mt("Payment by [_1]",$otaker); +my $payment = emt("Payment by [_1]",$otaker); if ( scalar(@cust_bill_pay) == 0 && scalar(@cust_pay_refund) == 0 ) { #completely unapplied $payment = '' - . mt("Unapplied Payment by [_1]",$otaker) + . emt("Unapplied Payment by [_1]",$otaker) . ''; if ( $curuser->access_right('Apply payment') ) { if ( $cust_pay->cust_main->total_owed > 0 ) { $apply = ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply'), + 'label' => emt('apply'), 'action' => "${p}edit/cust_bill_pay.cgi?". $cust_pay->paynum, - 'actionlabel' => mt('Apply payment'), + 'actionlabel' => emt('Apply payment'), %cust_bill_pay_width, %cust_bill_pay_height, ). @@ -61,10 +61,10 @@ if ( scalar(@cust_bill_pay) == 0 if ( $cust_pay->cust_main->total_unapplied_refunds > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply to refund'), + 'label' => emt('apply to refund'), 'action' => "${p}edit/cust_pay_refund.cgi?". $cust_pay->paynum, - 'actionlabel' => mt('Apply payment to refund'), + 'actionlabel' => emt('Apply payment to refund'), 'width' => 392, ). ')'; @@ -79,7 +79,7 @@ if ( scalar(@cust_bill_pay) == 0 && scalar(@cust_pay_refund) == 1 && $cust_pay->unapplied == 0 ) { #applied to one refund - $desc .= mt(" refunded on [_1]", time2str($date_format, $cust_pay_refund[0]->_date) ); + $desc .= emt(" refunded on [_1]", time2str($date_format, $cust_pay_refund[0]->_date) ); } else { #complicated $desc .= '
'; @@ -90,7 +90,7 @@ if ( scalar(@cust_bill_pay) == 0 $app->applied_to_invoice . '
'; } elsif ( $app->isa('FS::cust_pay_refund') ) { $desc .= '  ' . - mt("[_1][_2] refunded on [_3]", $money_char, $app->amount, + emt("[_1][_2] refunded on [_3]", $money_char, $app->amount, time2str($date_format, $app->_date) ) . '
'; } else { die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund"; @@ -99,16 +99,16 @@ if ( scalar(@cust_bill_pay) == 0 if ( $cust_pay->unapplied > 0 ) { $desc .= '  '. '' . - mt("[_1][_2] unapplied", $money_char, $cust_pay->unapplied) . + emt("[_1][_2] unapplied", $money_char, $cust_pay->unapplied) . ''; if ( $curuser->access_right('Apply payment') ) { if ( $cust_pay->cust_main->total_owed > 0 ) { $apply = ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply'), + 'label' => emt('apply'), 'action' => "${p}edit/cust_bill_pay.cgi?". $cust_pay->paynum, - 'actionlabel' => mt('Apply payment'), + 'actionlabel' => emt('Apply payment'), %cust_bill_pay_width, %cust_bill_pay_height, ). @@ -117,10 +117,10 @@ if ( scalar(@cust_bill_pay) == 0 if ( $cust_pay->cust_main->total_unapplied_refunds > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => mt('apply to refund'), + 'label' => emt('apply to refund'), 'action' => "${p}edit/cust_pay_refund.cgi?". $cust_pay->paynum, - 'actionlabel' => mt('Apply payment to refund'), + 'actionlabel' => emt('Apply payment to refund'), 'width' => 392, ). ')'; @@ -132,10 +132,10 @@ if ( scalar(@cust_bill_pay) == 0 my $view = ' ('. include('/elements/popup_link.html', - 'label' => mt('view receipt'), + 'label' => emt('view receipt'), 'action' => "${p}view/cust_pay.html?link=popup;paynum=". $cust_pay->paynum, - 'actionlabel' => mt('Payment Receipt'), + 'actionlabel' => emt('Payment Receipt'), ). ')'; @@ -152,18 +152,18 @@ if ( $cust_pay->closed !~ /^Y/i ) { $refund = qq! (' . mt('refund') . ')'; + qq! TITLE="! .emt('Send a refund for this payment to the payment gateway') + . '">' . emt('refund') . ')'; } my $void = ''; my $voidmsg = $cust_pay->payby =~ /^(CARD|CHEK)$/ - ? ' (' . mt('do not send anything to the payment gateway').')' + ? ' (' . emt('do not send anything to the payment gateway').')' : ''; $void = areyousure_link("${p}misc/void-cust_pay.cgi?".$cust_pay->paynum, - mt('Are you sure you want to void this payment?'), - mt('Void this payment from the database') . $voidmsg, - mt('void') + emt('Are you sure you want to void this payment?'), + emt('Void this payment from the database') . $voidmsg, + emt('void') ) if ( $cust_pay->closed !~ /^Y/i && ( ( $cust_pay->payby eq 'CARD' @@ -180,18 +180,18 @@ $void = areyousure_link("${p}misc/void-cust_pay.cgi?".$cust_pay->paynum, my $delete = ''; $delete = areyousure_link("${p}misc/delete-cust_pay.cgi?".$cust_pay->paynum, - mt('Are you sure you want to delete this payment?'), - mt('Delete this payment from the database completely - not recommended'), - mt('delete') + emt('Are you sure you want to delete this payment?'), + emt('Delete this payment from the database completely - not recommended'), + emt('delete') ) if ( $cust_pay->closed !~ /^Y/i && $opt{'deletepayments'} && $curuser->access_right('Delete payment') ); my $unapply = ''; $unapply = areyousure_link("${p}misc/unapply-cust_pay.cgi?".$cust_pay->paynum, - mt('Are you sure you want to unapply this payment?'), - mt('Keep this payment, but dissociate it from the invoices it is currently applied against'), - mt('unapply') + emt('Are you sure you want to unapply this payment?'), + emt('Keep this payment, but dissociate it from the invoices it is currently applied against'), + emt('unapply') ) if ( $cust_pay->closed !~ /^Y/i && scalar(@cust_bill_pay) && $curuser->access_right('Unapply payment') ); diff --git a/httemplate/view/cust_main/payment_history/pending_payment.html b/httemplate/view/cust_main/payment_history/pending_payment.html index 6c7c103d0..113022d08 100644 --- a/httemplate/view/cust_main/payment_history/pending_payment.html +++ b/httemplate/view/cust_main/payment_history/pending_payment.html @@ -22,7 +22,7 @@ my %statusaction = ( my $edit_pending = $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments'); -my $status = mt("Status: [_1]",$cust_pay_pending->status); +my $status = emt("Status: [_1]",$cust_pay_pending->status); my $action = $statusaction{$cust_pay_pending->status}; @@ -32,11 +32,11 @@ if ( $action && $edit_pending ) { 'action' => $p. 'edit/cust_pay_pending.html'. '?paypendingnum='. $cust_pay_pending->paypendingnum. ";action=$action", - 'label' => mt($action), + 'label' => emt($action), 'color' => '#ff0000', 'width' => 655, 'height' => ( $action eq 'delete' ? 480 : 575 ), - 'actionlabel' => mt(ucfirst($action). ' pending payment'), + 'actionlabel' => emt(ucfirst($action). ' pending payment'), ); } diff --git a/httemplate/view/cust_main/payment_history/refund.html b/httemplate/view/cust_main/payment_history/refund.html index c73d51e01..f14713cda 100644 --- a/httemplate/view/cust_main/payment_history/refund.html +++ b/httemplate/view/cust_main/payment_history/refund.html @@ -13,26 +13,26 @@ my $payinfo = $payby eq 'CARD' : $cust_refund->payinfo; $payby = translate_payby_refund($payby,$payinfo); -my $refund = mt("Refund by [_1]",$cust_refund->otaker); +my $refund = emt("Refund by [_1]",$cust_refund->otaker); $refund = '' - . mt("Unapplied Refund by [_1]",$cust_refund->otaker) + . emt("Unapplied Refund by [_1]",$cust_refund->otaker) . '' if $cust_refund->unapplied > 0; my $view = ' ('. include('/elements/popup_link.html', - 'label' => mt('view receipt'), + 'label' => emt('view receipt'), 'action' => "${p}view/cust_refund.html?link=popup;". 'refundnum='. $cust_refund->refundnum, - 'actionlabel' => mt('Payment Receipt'), + 'actionlabel' => emt('Payment Receipt'), ). ')'; my $delete = ''; $delete = areyousure_link("${p}misc/delete-cust_refund.cgi?".$cust_refund->refundnum, - mt('Are you sure you want to delete this refund?'), - mt('Delete this refund from the database completely - not recommended'), - mt('delete') + emt('Are you sure you want to delete this refund?'), + emt('Delete this refund from the database completely - not recommended'), + emt('delete') ) if ( $cust_refund->closed !~ /^Y/i && $opt{'deleterefunds'} && $curuser->access_right('Delete refund') ); diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html index 3c2098d23..2f038be41 100644 --- a/httemplate/view/cust_main/payment_history/voided_payment.html +++ b/httemplate/view/cust_main/payment_history/voided_payment.html @@ -24,12 +24,12 @@ if ( $opt{'pkg-balances'} && $cust_pay_void->pkgnum ) { my $unvoid = ''; my $unvoidmsg = $cust_pay_void->payby =~ /^(CARD|CHEK)$/ - ? ' ('.mt('do not send anything to the payment gateway') .')' + ? ' ('.emt('do not send anything to the payment gateway') .')' : ''; $unvoid = areyousure_link("${p}misc/unvoid-cust_pay_void.cgi?".$cust_pay_void->paynum, - mt('Are you sure you want to unvoid this payment?'), - mt('Unvoid this payment from the database') . $unvoidmsg, - mt('unvoid') + emt('Are you sure you want to unvoid this payment?'), + emt('Unvoid this payment from the database') . $unvoidmsg, + emt('unvoid') ) if ( $cust_pay_void->closed !~ /^Y/i && $curuser->access_right('Unvoid') ); diff --git a/httemplate/view/elements/svc_edit_link.html b/httemplate/view/elements/svc_edit_link.html index a85d38077..b16261a87 100644 --- a/httemplate/view/elements/svc_edit_link.html +++ b/httemplate/view/elements/svc_edit_link.html @@ -1,15 +1,14 @@ % if ( $cancel_date ) { -Canceled <% time2str('%b %o %Y', $cancel_date) %> +<% mt("Canceled [_1]", time2str('%b %o %Y', $cancel_date) ) |h %> % } else { -Edit this <% $label %> | - -Unprovision this Service +<% mt("Edit this [_1]", $label) |h %> | +<% mt('Unprovision this Service') |h %> % } <%init> my %opt = @_; diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html index f4c83888d..4386a8318 100644 --- a/httemplate/view/svc_acct/basics.html +++ b/httemplate/view/svc_acct/basics.html @@ -1,112 +1,106 @@ <% &ntable("#cccccc") %><% &ntable("#cccccc",2) %> -<% include('/view/elements/tr.html', label=>'Service', value=>$part_svc->svc) %> -<% include('/view/elements/tr.html', label=>'Username', value=>$svc_acct->username) %> -<% include('/view/elements/tr.html', label=>'Domain', value=>$domain) %> +<& /view/elements/tr.html, label=>mt('Service'), value=>$part_svc->svc &> +<& /view/elements/tr.html, label=>mt('Username'), value=>$svc_acct->username &> +<& /view/elements/tr.html, label=>mt('Domain'), value=>$domain &> % if ( $opt{'communigate'} ) { - <% include('/view/elements/tr.html', label=>'Aliases', value=>$svc_acct->cgp_aliases) %> + <& /view/elements/tr.html, label=>mt('Aliases'), value=>$svc_acct->cgp_aliases &> %} % if ( $svc_acct->pbxsvc ) { - <% include('/view/elements/tr.html', label=>'PBX', value=>$svc_acct->pbx_title) %> + <& /view/elements/tr.html, label=>mt('PBX'), value=>$svc_acct->pbx_title &> %} % my $show_pw = ''; % my $password = $svc_acct->get_cleartext_password; % if ( $password =~ /^\*\w+\* (.*)$/ ) { % $password = $1; -% $show_pw .= '(login disabled) '; +% $show_pw .= '('. mt('login disabled') .') '; % } % if ( ! $password % && $svc_acct->_password_encryption ne 'plain' % && $svc_acct->_password % ) % { -% $show_pw .= '('. uc($svc_acct->_password_encryption). ' encrypted)'; +% $show_pw .= '('. uc($svc_acct->_password_encryption). ' '.mt('encrypted').')'; % } elsif ( $conf->exists('showpasswords') ) { % $show_pw .= '
'. encode_entities($password). '
'; % } else { -% $show_pw .= '(hidden)'; +% $show_pw .= '('. mt('hidden') .')'; % } % $password = ''; -<% include('/view/elements/tr.html', label=>'Password', value=>$show_pw) %> +<& /view/elements/tr.html, label=>mt('Password'), value=>$show_pw &> % if ( $conf->exists('security_phrase') ) { - <%include('/view/elements/tr.html', label=>'Security phrase', value=>$svc_acct->sec_phrase)%> + <& /view/elements/tr.html, label=>mt('Security phrase'), value=>$svc_acct->sec_phrase &> % } % if ( $svc_acct->popnum ) { % my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); - <% include('/view/elements/tr.html', label=>'Access number', value=>$svc_acct_pop->text) %> + <& /view/elements/tr.html, label=>mt('Access number'), value=>$svc_acct_pop->text &> % } % if ($svc_acct->uid ne '') { - <% include('/view/elements/tr.html', label=>'UID', value=>$svc_acct->uid) %> + <& /view/elements/tr.html, label=>mt('UID'), value=>$svc_acct->uid &> % } % if ($svc_acct->gid ne '') { - <% include('/view/elements/tr.html', label=>'GID', value=>$svc_acct->gid) %> + <& /view/elements/tr.html, label=>mt('GID'), value=>$svc_acct->gid &> % } % if ($svc_acct->finger ne '') { - <% include('/view/elements/tr.html', label=>'Real Name', value=>$svc_acct->finger) %> + <& /view/elements/tr.html, label=>mt('Real Name'), value=>$svc_acct->finger &> % } % if ($svc_acct->dir ne '') { - <% include('/view/elements/tr.html', label=>'Home directory', value=>$svc_acct->dir) %> + <& /view/elements/tr.html, label=>mt('Home directory'), value=>$svc_acct->dir &> % } % if ($svc_acct->shell ne '') { - <% include('/view/elements/tr.html', label=>'Shell', value=>$svc_acct->shell) %> + <& /view/elements/tr.html, label=>mt('Shell'), value=>$svc_acct->shell &> % } % if ($svc_acct->quota ne '' && ! $opt{'communigate'} ) { - <% include('/view/elements/tr.html', label=>'Quota', value=>$svc_acct->quota) %> + <& /view/elements/tr.html, label=>mt('Quota'), value=>$svc_acct->quota &> % } elsif ( $opt{'communigate'} ) { - <% include( 'communigate.html', %opt ) %> + <& communigate.html, %opt &> % } % if ($svc_acct->slipip) { - <% include('/view/elements/tr.html', - label=>'IP address', + <& /view/elements/tr.html, + label=>mt('IP address'), value=> ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' ) - ? "(Dynamic)" + ? "(".mt('Dynamic').")" : $svc_acct->slipip - ) - %> + &> % } -<% include('usage.html', - 'svc_acct' => $svc_acct, - ) -%> +<& usage.html, 'svc_acct' => $svc_acct &> % foreach my $attribute ( grep /^radius_/, $svc_acct->fields ) { % $attribute =~ /^radius_(.*)$/; % my $pattribute = $FS::raddb::attrib{$1}; - <% include('/view/elements/tr.html', label=>"Radius (reply) $pattribute", + <& /view/elements/tr.html, label=>mt("Radius (reply) [_1]",$pattribute), value=>$svc_acct->getfield($attribute) - ) - %> + &> % } % foreach my $attribute ( grep /^rc_/, $svc_acct->fields ) { % $attribute =~ /^rc_(.*)$/; % my $pattribute = $FS::raddb::attrib{$1}; - <% include('/view/elements/tr.html', label=>"Radius (check) $pattribute", + <& /view/elements/tr.html, label=>mt("Radius (check) [_1]",$pattribute), value=>$svc_acct->getfield($attribute) - ) - %> + &> % } -<% include('/view/elements/tr.html', label=>'RADIUS groups', - value=>join('
', $svc_acct->radius_groups) ) %> +<& /view/elements/tr.html, label=>mt('RADIUS groups'), + value=>join('
', $svc_acct->radius_groups) &> %# Can this be abstracted further? Maybe a library function like %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI diff --git a/httemplate/view/svc_acct/change_svc.html b/httemplate/view/svc_acct/change_svc.html index 33d44a713..ed4aadd5f 100644 --- a/httemplate/view/svc_acct/change_svc.html +++ b/httemplate/view/svc_acct/change_svc.html @@ -1,7 +1,7 @@ % if ( @part_svc || $opt{'showall'} ) { | - + % } -- 2.11.0